I
I
Ilia Malashko2021-11-29 15:18:52
JavaScript
Ilia Malashko, 2021-11-29 15:18:52

How to implement the choice of delivery address as on ozon.ru?

Hello.

Many sites have implemented such an address selection functionality, I will give an example on ozon.ru
5JpgUUQApAWdvA
Yes, for more clarity, here is a video .

That is, it is necessary that the marker be in the center all the time, when you click on the map or after the drag is completed, it gives the coordinates of the marker point.

Implemented most likely on the basis of this api

But this api still needs to be finalized before the result is needed.
Since the implementation is popular, I think there should be a finished result.

How to find this option in finished form?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
freeExec, 2021-11-29
@freeExec

Well, how, how, go to the ozone site and find it ready there.

G
Georgy Eremeev, 2021-12-09
@GogElf

  1. Create an element above the map with this image. We add css to it so that it does not interfere with the user's work with the map.event-pointer:none
  2. On the event of the map, actionbeginwe turn on the animation of the beginning of the movement of the point.
  3. On the map event, actionendwe lower the point on the map, take the center of the map map.getCenter(), use reverse geocoding, add the text of the calculated address to the point.
  4. Finishing with a file

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question