Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

maximum dimensions for google maps marker

I was just wondering what the maximum recommended dimensions are for a google maps marker.

I have an icon of 44x64

And, in order to comply with retina screens I downscale it to 22x32.

marker = new google.maps.Marker({
    position: new google.maps.LatLng(0, 0),
    map: map,
    icon: {
        url: 'http://path/to/marker.png',
        scaledSize : new google.maps.Size(22, 32),
        origin: new google.maps.Point(0,0),
        anchor: new google.maps.Point(11, 32)
    }
});

This works great. But, my question is really simple: what is the maximum size allowed for the google maps marker? Can't find it anywhere in the documentation.

like image 592
Jules Colle Avatar asked Dec 31 '25 19:12

Jules Colle


1 Answers

Icons (markers) may be up to 4096 pixels maximum size (64x64 for square images).

as stated here

https://developers.google.com/maps/documentation/static-maps/intro#CustomIcons

like image 75
betofarina Avatar answered Jan 04 '26 18:01

betofarina



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!