问题
I have managed to place a marker for each item in my database using their stored title and coordinates.
I am now trying to change the content of each InfoWindow so that it shows information related to each place (other than the title and snippet)also each place have a different icon marker. how to give a custom icon and a different infowindow for each place? i create the different icons for marker. the information are loading in format json and the icon marker are also in my database.should i load them or put them in drawable folder.
回答1:
Google covers most of what you want to do in their Google Maps API v2 documentation.
Info Window Customization and Customizing a MArker have code example how-to's. For your marker icons, are they just a different colour marker or are they completely customized? Storing them in drawable is ok and can be accessed easily using
.icon(BitmapDescriptorFactory.fromResource(R.drawable.your_custom_marker))
when creating/adding the Marker.
来源:https://stackoverflow.com/questions/29431446/plot-a-different-marker-for-each-place-googlemap-v2-android