> var image = new google.maps.MarkerImage(icon, null, null, null, new > google.maps.Size(32, 32)); > > The variable icon stores the path to the icon and the marker is shown > on the map, but instead of resizing the image to 32x32 it takes the > 32x32 pixels from the upper left corner of the original image.
Yup. The API has no idea what size your original image is, you might be using a sprite sheet with multiple images. So it assumes if you want a 32x32 display it is to take a 32x32 pixel chunk of the source sprite sheet. If your original was, say, 64x64 you could do ...(icon, new google.maps.Size(64,64), null, null, new google.maps.Size(32,32)).. The documentation is at http://code.google.com/apis/maps/documentation/javascript/reference.html#MarkerImage but isn't explained well -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to google-maps-js-api-v3@googlegroups.com. To unsubscribe from this group, send email to google-maps-js-api-v3+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.