Closed devParry closed 5 years ago
Try to use 'eventDragEnd' instead of 'eventDrag'. Reference : #97
Hi there,
You nearly have it right, your just not accessing the markers object of the map:
Try the following:
console.log(mapsData[0].markers);
}```
Helper for Google map lat long use in marker[Here] 'eventDragEnd' =>"(document.getElementById('lat').value=(event.latLng.lat())); (document.getElementById('long').value=(event.latLng.lng()))"
Hi,
I am new in laravel. I am using googlemapper i have successfully display map on my view page. now ihave to get long and lat and display into the text box. while user drag the marker on google map but i am not able to get it please help me to fix this. Please have a look on my code
Mapper::map(0, 0)->marker(53.381128999999990000, -1.470085000000040000, ['markers' => ['symbol' => 'circle', 'scale' => 1000, 'animation' => 'DROP'] , 'draggable' => true, 'eventDrag' => 'getMapData(maps)' ]);
and my callback function is :
`function getMapData(mapsData){ console.log(mapsData);
}`
Please have a look on my console screen-short :