I am trying to set custom icons on google maps. I I run it I get the error :
Uncaught TypeError: Cannot read property 'offsetWidth' of undefined
Here is my Javascript :
var map = Appery ('googlemap1');
var iconImage = 'https://maps.google.com/mapfiles/kml/...';
var myLatlng = new google.maps.LatLng(37.63, -122.424);
var mapOptions = {
zoom :17,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP,
};
alert('helloe');
alert('hello1');
var map = new google.maps.Map($('div[dsid="googlemap1"]').get(0), mapOptions);
var marker = new google.maps.Marker({
position: myLatlng,
map: map,
title: 'Blabber Spot',
icon:iconImage
});
alert('hello2');