Android Question Google Maps: How to hightlight a marker

toby

Well-Known Member
Licensed User
Longtime User
There are a few markers shown on the map and when a user makes a selection on a separate list, I want to notify him/her which marker is related to his/her selection. How it can be done?

My test app is based on the Google Map Tutorial example

TIA
 

DonManfred

Expert
Licensed User
Longtime User
You did created all the markers. You should remember them in a Map/List.
You also can use the Markers in the Map/List to position the Map based on the Location of the relevant marker.
 
Upvote 0

TILogistic

Expert
Licensed User
Longtime User
You can use the following, when user select from the list and the map shows the selected marker.

Dim CameraPosition1 As CameraPosition = GoogleMap1.CameraPosition
Dim NewCameraPosition As CameraPosition
NewCameraPosition.Initialize2(mLatitude, mLongitude, CameraPosition1.Zoom, CameraPosition1.Bearing, CameraPosition1.Tilt)
GoogleMap1.AnimateCamera(NewCameraPosition)

also you can if you want you can indicate the zoom level.

changing this CameraPosition1.Zoom to a variable mZoom
 
Upvote 0
Top