I have a select element with some countries, when "change" is fired, I call a function to get the coords then add the marker. It's ok but when the marker is added, the marker isn't centered.
I'm using the latest version 5.0b.
// get coords
$gmap.gmap3({
getlatlng: {
address: complete_address,
callback: function(result){
if(result) {
var i = 0;
$.each(result[0].geometry.location, function(index, value) {
if(i == 0) { lat = value; }
if(i == 1) { lng = value; }
i++;
});
// add marker
$gmap.gmap3({
marker: {
address: complete_address,
options: {
draggable: false,
animation: google.maps.Animation.DROP
}
},
map:{
options:{
center:[lat, lng],
zoom: zoom
}
}
});
}
}
}
});
I get in the console: "Uncaught Error: Incorrect value for : 51.919438,19.14513599999998"
Any tips would by appreciate.
Regards