How to change marker size in Google Maps API v3 with Android?

google maps change marker icon
google maps custom marker html
google maps marker icons list
google map marker
google map icons
change size marker google maps android
change marker size google maps
google map icon change

I have added a few markers on my map but when I run my app, I see the markers to be very small. I have created a custom icon with the mdpi, hdpi, xhdpi and xxhdpi dimensions but I still see them small.

This is how add the markers to the map:

LatLng latLng = new LatLng(lat, lng);
MarkerOptions markerOptions = new MarkerOptions().position(latLng).title("My Marker");
markerOptions.icon(BitmapDescriptorFactory.fromResource(R.drawable.my_pin));
Marker marker = googleMap.addMarker(markerOptions);

And this is how my map looks like:

And this is what I want to achieve:

How to change marker size a little bit to be more visible?

First, choose the larger image and make an image asset for all sizes. For that Right click on the drawable folder and select new -> Image Asset -> select appropriate options and select image. finish and it will automatically create all size of images. Use this image as the marker.

So, now at the end, you have the only solution is that use large size image into the marker.

Android Google Maps API v2 - how to change marker icon, How do I change the marker size on Google Maps? Setting a marker's draggable property to true allows the user to change the position of the marker. Use a long press to activate the ability to move the marker. By default, when a user taps a marker, the map toolbar appears at the bottom right of the map, giving the user quick access to the Google Maps mobile app. You can disable the toolbar. For more information, see the guide to controls. Getting started with markers

I use Gimp and the extension Script Fu Save Android icons to create all my mipmap or icons in my apps.

After install the script, you get this menu in the menu bar:

After click on "Save Android Icons...", you'll get this window:

The extension exports all icons according with Android Icon's Sizes:

After generate all icons, just move them to your project folder

Resize Google Maps marker icon image, JavaScript API, complex icons were defined as MarkerImage objects. I am using this explanation of how to color a google maps marker by setting the icon using a MarkerImage, and the coloring works well.But I can't make the scaledSize argument change the size of the marker.

try this if hope it will help you if not tell me to delete the answer ...!

public Bitmap resizeBitmap(String drawableName,int width, int height){
Bitmap imageBitmap = BitmapFactory.decodeResource(getResources(),getResources().getIdentifier(drawableName, "drawable", getPackageName()));
return Bitmap.createScaledBitmap(imageBitmap, width, height, false);
}

then

googleMap.addMarker(new MarkerOptions()
        .title("New Marker").position(yourGivenPosition).icon(BitmapDescriptorFactory.fromBitmap(resizeBitmap("your drawable name",72,64))));

How to Change Marker Colors in Google Maps, How do I add a custom marker to Google Maps? The image below displays a Google maps marker with the default red icon. You can change this icon to an image of your choice. The table below explains the code that customizes the default marker to use an icon for parking lots. Adds the icon property to the MarkerOptions object, to change the marker’s icon.

How to change marker size in Google Maps API v3 with Android , How do you change the color of the labels on Google Maps? Here Mudassar Ahmed Khan has explained how to center and zoom Google Map on markers in such a way that all markers can be fitted using Google Maps API V3. The map is centered and the zoom is adjusted based on the markers and their positions and the best possible view of Google Map is shown to the user.

Markers | Maps JavaScript API, I have added a few markers on my map but when I run my app, I see the markers to be very small. I have created a custom icon with the mdpi  The Simpliest way to create android maps apps using Android Studio and Google Map API - Duration: 10:03. Mohammad Iqbal 28,791 views

Customizing a Google Map: Custom Markers, Google Maps Platform You can allow users to move a marker on the map by setting the marker's The Maps JavaScript API will size the icon automatically. If you wish to manage a set of markers, you should create an array to hold the markers. Using this array, you can then call setMap () on each marker in the array in turn when you need to remove the markers. You can delete the markers by removing them from the map and then setting the array's length to 0,

Comments
  • what is your images size?
  • increase image size
  • @masoudvali mdpi -> 24x24, hdpi -> 32x32, xhdpi -> 48x48 and xxhdpi -> 64x64.
  • @ClickSolApps You say that I need to create bigger images? What are the recommended sizes?
  • as per your requirement how big you want to display..
  • Thanks for your answer but is there any way to achieve this using my requirements?
  • Yes, the only way is that you can create the custom marker and set it.
  • There isn't another way, by set the dimensions programmatically or change the image size, as @ClickSol Apps recommended?
  • So, now at the end, you have the only solution is that use large size image into the marker.
  • I will try it. Thanks!
  • Thanks Carlos for this answer.