Hello I would like to add a dynamic display with a number in my point.
As in the picture, I already have the icons on the map.
Adding the numbers in point?
Hello I would like to add a dynamic display with a number in my point.
As in the picture, I already have the icons on the map.
Adding the numbers in point?
You may use android-maps-utils to achieve such effect.
Simply create 9-patch out of your pin with empty rectangle above and make rectangle be the content.
Then use IconGenerator
to create a Bitmap
with your text and 9-patch like here:
IconGenerator factory = new IconGenerator(context);
factory.setBackground(your9PatchDrawable);
factory.setContentView(textViewWithWith3Point600String);
Bitmap icon = factory.makeIcon();
Then use this Bitmap
to set Marker
s icon:
map.addMarker(new MarkerOptions().icon(BitmapDescriptorFactory.fromBitmap(icon)...);