MapView Android marker scaling when the user zooms in / out

I saw a few questions about this, but no solid answers.

I have a MapView that can generate up to 1600 locations on a map based on how much the user zooms in or out. At the moment, I have my marker just installed in my application. How can I determine if the user has zoomed in / out, and then mark the marker accordingly. I'm not interested in the scale part, but with the zoom listening part. Has anyone developed a solution to this little problem, or can point me in the right direction to create my own?

Also, as far as I know, the default token that Android offers is missing. Am I right about this? It would be nice if Android had a built-in marker that handles scaling based on zoom levels for you.

+4
source share
3 answers

Here is the scaling event information that should help you: In the scaling event

hope this helps

+1
source

Markers do not resize based on scaling. Use EarthOverlays if you want this effect. src

GoogleMap map = ...; // get a map. BitmapDescriptor image = ...; // get an image. LatLngBounds bounds = ...; // get a bounds // Adds a ground overlay with 50% transparency. GroundOverlay groundOverlay = map.addGroundOverlay(new GroundOverlayOptions() .image(image) .positionFromBounds(bounds) .transparency(0.5)); 

An overlay on the ground is an image that is tied to a map and scaled with the map scaled. See the API for more information.

See related entry: Scale Marker Scaling, Android

0
source

I use

 LatLng latLng = new LatLng(-16.50881576338701,-68.13492067606603); Bitmap bitmap = BitmapFactory.decodeResource(getResources(),R.raw.ic_car_1); BitmapDescriptor bitmapDescriptor = BitmapDescriptorFactory.fromBitmap(bitmap); googleMap.addGroundOverlay(new GroundOverlayOptions() .image(bitmapDescriptor) .position(latLng,100)); 

Documents on google maps docs GroundOverlayOptions

0
source

All Articles