i´m using gmap3 plugin for jquery and use 'get' to get a specific marker, i do get the right marker, as i can access marker.data
i defined as i init the map, but how do i get the position of the marker to let the map zoom to this position inside the callback function
$('#map').gmap3({
get: {
name:"marker",
tag:"${i}",
full:true,
callback: function(marker){
var center = marker.getPosition();
$('#getdistance').gmap3({
map:{
center:center,
options:{
zoom:17,
mapTypeControl: true,
mapTypeControlOptions: {
style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
},
navigationControl: true,
scrollwheel: true,
streetViewControl: true
}
}
});
}
}
});
trying so throws error :
marker.getPosition is not a function
so anyone has an idea ?
thanks in advance for any hint
marker.position
or similar. – Beetroot-Beetroot