A
A
Alexi_l2017-02-24 00:41:11
JavaScript
Alexi_l, 2017-02-24 00:41:11

How to remember the user-selected coordinates and scale of Google maps for the duration of the stay on the site?

There is a page of the site with a Google map, which contains many objects. The user finds the object he needs on the map and goes to the page with the description of this object. It is necessary that when the user returns back to the page with the map, the scale and area (coordinates of the center of the map) selected by him earlier are saved, i.e. so that the user does not have to re-search for the right place on the map. The question is how best to store this data (coordinates and scale) until the user has left the site (after leaving the scale and the coordinates should return to default). What is better to use? Cookies, sessions?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2017-02-24
@Alexi_l

local storage

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question