Skip to content

OnMapClick events broken  #815

@tobrun

Description

@tobrun

With below code the click listeners aren't called

  @Override
  public void onStyleLoaded(@NonNull Style style) {
    symbolManager = new SymbolManager(mapView, mapboxMap, style);
    symbolManager.setIconAllowOverlap(true);
    symbolManager.setTextAllowOverlap(true);

    mapboxMap.addOnMapLongClickListener(point -> {
      addSymbol(point);
      return true;
    });
    mapboxMap.addOnMapClickListener(point -> {
      addSymbol(point);
      return true;
    });
  }

Moving the registering of these listeners before SymbolManager creation solves the issue but the time of invocation should matter.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions