-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Remove requirement for an Adapter on MarkerView #5214
Comments
Sounds amazing, this will make it much more handy! I couldn't even convert the icon's bitmap of the passed marker back to a drawable and use it for |
With the changes made you can achieve that as well ;) |
This is the code a developer needs to write to show a normal MarkerView: MarkerViewOptions options = new MarkerViewOptions();
options.title("United States");
options.icon(IconFactory.getInstance(mMapView.getContext())
.fromResource(R.drawable.ic_us));
options.position(new LatLng(38.899774, -77.023237));
options.flat(true);
markerView = mapboxMap.addMarker(options); Below you can see where I'm updating the Icon every 3 seconds through |
Good job 👍 Will it make it into the tomorrow's snapshot? Maybe you could also test the behaviour of the issues I have experienced concerning the removing and adding new markerviews (#5161). Moreover, you said that the View things will provide a fix to disappearing Icons/Markers during runtime. Did it fix it? |
I'm planning to do some general improvement to this system in #5076, this includes looking into above.
Yes this issue should be resolved by using this API. |
merged with 087cad0, closing |
Currently we require a developer to provide an
MarkerViewAdapter
to be able show aMarkerView
.Current game plan is to remove this requirement and handle the logic for them. Internally the base
MarkerView
will be backed up byImageMarkerViewAdapter
and will leverage theIcon
attribute in Marker.The text was updated successfully, but these errors were encountered: