Map keeps re centering

I have a map on my page. It zoom in to my location as a default. which is what I want. However, I would like the user to be able to move the map to select the actual location. Similar like Uber’s map.

However, when I had moved the map to desired location, the map centered back to original default current location.

What I want to do:

  1. Uuser type in the search box input (with geographic places as choice style), if address is not the same as current location, or use default current location.

  2. Then the map will center to location chosen in search box (or default location if search box is empty).

  3. Once the map is centered based on search box, I still want the user to be able to move the map and center it manually. However, after I centered in manually, after a few seconds it keeps going back to original location.

Any idea to solve this?

This topic was automatically closed after 70 days. New replies are no longer allowed.