I have several markers with different colors, every color is used for specific purpose(like user's location etc). for each color I want to add short description of marker on the map.Is it possible to add short description of color on google map in right side corner?
In your layout file of map you can add any thing apart from MapFragment. but ensure that in your xml add other views after Mapfragment then they will appear above map fragment.
Related
I have implemented google map in my application, I want to animate my marker like below.
How can I achieve this?
Check this link,https://github.com/aarsy/GoogleMapsAnimations
GoogleMapsAnimations" is an awesome first of its type android library for showing a ripple and radar animations on a google map, e.g show catchment area of an earthquake where ripples have been felt, give prominence to certain markers which need to be highlighted. Also add a ripple when your user is moving on the map and give a #PokemonGo type ripple effect and also add a radar type effect to show users that you are searching in certain area
This link should help you :
https://developers.google.com/maps/documentation/android-api/marker
Then just use the image you have posted as the marker
I have used database to retrieve images and then converted to BitmapDescriptorFactory for setting up as google map marker. Now I am trying to retrieve these images to show them in a dialog/modal. can anyone suggest me the approach on retrieving the already set custom map markers and then show these in a dialog/ modal.
It does not look like you can get the icon from a marker that is already on a map. However, you could make a Map(data structure) of markers to icons when you generate the markers, so you can find the right icon that way.
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.
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.
I'm working on application with Google maps so i want to define a custom marker for each custom place, For example (gas station- Hotel- Hospital.. ) ! i have a overlays class with the latitude and longitude of many places and i want just how to give a custom icon!
With the new Maps Api Setting the Icon for a Marker is done with the following Code:
MarkerOptions markerOptions = new MarkerOptions().icon(BitmapDescriptorFactory.fromResource(R.drawable.icon_location));
The icon can not be changed after a Marker was created. To change an icon remove the marker and readd it with a new image.
with the APi v2, you can do (markerObject).setIcon(BitmapDescriptor) to change/set the marker image.
OverlayItem.setMarker seems like the method you're looking for.
Note that there is (or used to be) a gotcha you need to be aware of; you first need to use Drawable.setBounds to set the visible boundaries of the drawable before it can be rendered properly. Some fiddling might be needed to get it to centre; see this answer.
I have a map application that follows the user and what I want to know is how to add a marker that follows the user. how close is it to just adding a marker at a set place? Can I switch the overlay to track somehow?
Thanks
mapView.getOverlays.clear() to remove the old overlay. And then place it again the way you placed the first overlay with the position you want. Place the overlay and the overlay item.