T
T
taki1542015-01-29 09:27:25
Yandex maps
taki154, 2015-01-29 09:27:25

Yandex maps API: How to implement a mark of a place on the map by the user?

Good day!
Faced with such complexity, I will be grateful for the help.
We make a meeting creation service, the case is as follows:
1. On the page for creating a meeting, the user fills out a form, indicates the city \ street \ building number
2. Send a request to the geocoder on the .change () (jQuery) event - get the value - substitute into the Yandex Maps script received from geocoder coordinates. The preview result is displayed on the map, in the same place, on the editing page.
3.Because geocoding results cannot be stored and the user can change the address, for example, it is planned to "substitute" the address entered by the user each time - both on the meeting creation page and on the page of an already created meeting.
4. You cannot store the result of geocoding in the cache - the page is dynamic, comments appear on it, etc.
5. Dances with a tambourine occur around the script from here:
webmap-blog.ru/yandex-maps/dobavlyaem-metku-na-kar...
I will be grateful for advice!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vyacheslav, 2015-01-29
@nskarl

I think it's worth looking for a script that could generate X - Y coordinates from the address, and substitute it into an already loaded script on the page.
The only question is - is there such a script in the public domain?

A
Arman, 2015-01-29
@Arik

If I'm not mistaken, the geocoder can return more than one option, and the first one does not mean that it is correct. It is especially felt when small satellite towns become part of a big city, a bunch of streets and houses are duplicated. At the same time, for some reason, satellites often have a higher priority, so at the request of Lenin, Yandex maps return a street to me on the edge of the city, although this is a large street / avenue in the city center. For any it is necessary to give the user the opportunity to specify the place himself. And store this location along with the meeting record.

Because geocoding results cannot be stored
Why?

F
forgotten, 2015-02-03
@forgotten

Geocoding results can be cached by the Yandex.Maps PS API

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question