I am developing an iPhone application in html5 and am building with Phonegap. The application has a Google map with custom markers, the way to create marker icons is as follows:
var image = new google.maps.MarkerImage("hat.png", null, null, null, new google.maps.Size(20,30)); var shadow = new google.maps.MarkerImage("shadow.png", null, null, null, new google.maps.Size(20,30)); var marker = new google.maps.Marker({ map: map, position: latlng, index: markers.length, icon: image, shadow: shadow, animation: google.maps.Animation.DROP, html: htmlContent });
The actual size of the icon is double the size compared to the sizes defined in the code. This is to ensure that the icons are displayed in high resolution on the Retina screen. The code above has worked until today, but now the following happens.
When the icons drop out using google.maps.Animation.DROP, the icon is displayed in high resolution on the way down, but when the icon "lands" on the map, the icon switches to the low resolution version.
Has anyone ever experienced the same thing?
Thanks...
UPDATE It turned out that if I specify the version of the Google map, for example:
http://maps.googleapis.com/maps/api/js?v=3.0
So, I assume this is a bug in the latest Goolge API.
html html5 google-maps cordova
andkjaer
source share