I am dynamically loading images to use in google maps.
I do so with the following code
var markerImage = new google.maps.MarkerImage('../myurl');
var marker = new google.maps.Marker({ position: latlng, map: map, icon: markerImage, title: values[2] });
The problem is if that url is not valid, no errors are thrown, there are no exceptions. Also I cant check against the value (null or anything).
If the url is invalid the image doesnt show up. If the is valid it does show up.
I tried the get.Icon method on marker but that just shows
anchor: undefined,
origin: undefined,
scaledSize: undefined,
size: undefined,
url:”../myurl”
Try loading an image using your url and listening for
onloadandonerrorbefore passing it to thegoogle.maps.MarkerImageconstructor: