Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing Marker Size in google maps [duplicate]

I'm trying to change the marker size, and no matter how I try they just disappear. I've tried this:

scaledSize: new google.maps.Size(100, 68)

var marker;
addressDetails = stringArray[x].split("&&&");
var lat = new google.maps.LatLng(addressDetails[1], addressDetails[2]);
//Create a new marker and info window
marker = new google.maps.Marker({
    map: map,
    position: lat,
    icon: 'http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=A|000000|FFF',
    content: addressDetails[0]
});
markersArray.push(marker);
like image 871
MasterWizard Avatar asked Oct 21 '25 11:10

MasterWizard


1 Answers

Use https://developers.google.com/maps/documentation/javascript/overlays#Markers for future reference

new google.maps.Size(42,68)

42 and 86 are pixel values. Those will scale the marker to whatever you want.

Source: Change marker size in Google maps V3

like image 98
Zone6 Avatar answered Oct 23 '25 01:10

Zone6