I’m working on a map where I display markers with a custom image.
The images are displayed correctly, but for some reason when opening the site in IE8 the images aren’t resized accordingly.
My images are 64x64px and I want them to be 24x24px.
This is the code I’m using:
var icon = new google.maps.MarkerImage(iconUrl);
icon.size = new google.maps.Size(24,24);
icon.scaledSize = new google.maps.Size(24,24);
var marker = new google.maps.Marker({ position: position, title: title, icon: icon });
marker.setMap(mb.map.mapObject);
It works perfectly on Chrome, but IE8 simply ignores the scaledSize property.
I’ve also tried using the constructor, but I get the same results.
Has anyone seen this problem before? is it a known bug? what can I do besides hacking the CSS and setting the size there.
Thanks!
EDIT: I just tested it on IE9 and it works with no problems.
I realized the same problem today when using IE8. MarkerImages are not scaled anymore… I have already sent a bug report to Google.
Possible Workaround: Try to use an older version of Google Maps (not the current version 3.7). Here is the code:
<script type="text/javascript" src="http://maps.google.com/maps/api/js?v=3.6&sensor=false"></script>