Answer the question
In order to leave comments, you need to log in
How to get marker coordinates?
Hello!
I use the Yandex Maps API:
it is necessary for the user to enter the address, get the marker, (if necessary, move it on the map (specified the position manually)) and get the coordinates and the request itself in the JS variable (for example, country, city, street)
Here's what now I have: codepen.io/qovalenko/pen/KWOLMv
Thank you!
Answer the question
In order to leave comments, you need to log in
var mySearchResults = new ymaps.GeoObjectCollection(null, {
draggable: true,
hintContentLayout: ymaps.templateLayoutFactory.createClass('$[properties.name]')
});
mySearchResults.events.add('dragend', function(e){
console.log(e.get('target').geometry.getCoordinates());
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question