avi karbol
avi karbol

Reputation: 83

Android problem with 2 annotation type in MapBox

I try to use two types of annotation in my app Symbol and Fill, after I declare SymbolManager as

  symbolManager = new SymbolManager(mMapView, mMapboxMap, style);

I want to declare FillManager as

fillManager= new FillManager(mMapView, mMapboxMap,style);

The problem is after and only when I declare the two types the listener addDragListener() stop working

I try to create a square with symbols on the edges and fill it with color the symbol I can drag to change the shape of the square and the fill area I can drag from location to location

if I define SymbolManager after FillManager the addDragListener of SymbolManager worked. But if I define FillManager after SymbolManager the addDragListener of SymbolManager doesn't work

if I don't define SymbolManager but define the FillManager I don't see the fill annotation

Upvotes: 1

Views: 251

Answers (1)

Adriana Babakanian
Adriana Babakanian

Reputation: 1299

It is likely the case that the listeners for whichever manager is declared last take precedence, since SymbolManager and FillManager both inherit from AnnotationManager.

That being said, it sounds like you are trying to implement something similar to the functionality demonstrated in this land select example in the Mapbox Android documentation. If so, I would recommend following the logic outlined there rather than trying to use a SymbolManager and FillManager in conjunction.

Upvotes: 1

Related Questions