Google Maps javascript API custom draggable marker using PNG not visible in Safari

This Google Maps Javascript API V3 code works properly in every other browser than Safari. In Safari the draggable PNG icon is invisible.

var image="http://maps.google.com/mapfiles/kml/pal3/icon20.png";

var locationmarker = new google.maps.Marker({
    position: myLatLng,
    map: map,
    title: 'Search Location',
    optimized: false,
    icon: image,
    draggable:true
   });

5 thoughts on “Google Maps javascript API custom draggable marker using PNG not visible in Safari”

  1. Looks like you are loading the PNG file over HTTP which causes CORS issue. Try to load it over HTTPS. Change the PNG file URL to https:// instead of http://:

    https://maps.google.com/mapfiles/kml/pal3/icon20.png
    
    Reply

Leave a Comment