Snake
Snake

Reputation: 14638

Google map marker size change upon zoom Level change

Anyways I can allow for Google maps v2 markers to zoom in /zoom out when I I zoom the map? Basically like a circle, the size would change with the zoom level

Thanks

Upvotes: 1

Views: 1595

Answers (1)

Fahim
Fahim

Reputation: 12358

If you want to do something when zooming, you can create a custom Mapview which extends the original MapView, and just override dispatchDraw(Canvas canvas).

With adding a little listener, you can do whatever you want in the callback. Something like this;

@Override
 protected void dispatchDraw(final Canvas canvas){
 super.dispatchDraw(canvas);
 if (getZoomLevel() != lastZoomLevel) { 
if (listener != null) { 
listener.onZoom(lastZoomLevel, getZoomLevel());
 } 
lastZoomLevel = getZoomLevel(); 
} }

Upvotes: 2

Related Questions