First I init gmap3 with this code.
var center = [48.8620722, 2.352047];
$('.map').gmap3({
center: center,
zoom: 17,
mapTypeId : google.maps.MapTypeId.ROADMAP
});
That works great. Then I try to add a overlay when I click a button but nothing happens.
$('.map').gmap3({
action: 'addOverlay',
content: '<div style="color:#000000; border:1px solid #FF0000; background-color: #00FF00; width:200px; line-height:20px; height: 20px; text-align:center">Hello World !</div>',
latLng: [48.8620722, 2.352047],
offset: {
y: -32,
x: 12
}
});
Can someone please tell me what the problem is?
I guess you're mixing something up. I'm not familiar with gmap3 plugin, but after a look into the api documentation, it seems that gmap3 doesn't offer
actionas an option. It offers only googleMaps native options.It would be also helpful, if you could make a jsbin code-example for your problem.