Skip to content

OnMapClick events broken  #815

Closed

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions