How can I change the blue circle icon of the default location in the Google Maps app to an icon made by me in Android?
For a native application using google maps, the marker is simply assigned a different icon.
One of the MarkerOptions options is precisely < a href="https://developers.google.com/android/reference/com/google/android/gms/maps/model/MarkerOptions.html#icon(com.google.android.gms.maps.model.BitmapDescriptor) "> .icon () :
MarkerOptions markerOptions = new MarkerOptions().icon(BitmapDescriptorFactory.fromResource(R.drawable.marker));
You can also assign an icon directly to the Marker using setIcon()
:
Marker m;
m = map.addMarker(new MarkerOptions().position(new LatLng(valueLat, valueLng)));
m.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.marker));
the image of the marker can be saved inside the folder /drawable
With this method you can define custom icons for your bookmarks:
You have to define the marker to use, an example:
var marker = new google.maps.Marker({
map: map,
position: position,
icon: 'images/mi-marcador.png'
});