C
C
Cheizer2018-10-29 13:36:34
Google Maps
Cheizer, 2018-10-29 13:36:34

How to switch Google maps to different markers?

Friends, please tell me how switching to different addresses is done in this example using the link? https://www.globber.com/store
Which way to dig? How to do this, as I understand it, there is one map of the region, and it has markers, and by clicking on the addresses in the right list, the center of the map simply changes? Or what? Or does the switch follow the coordinates of the anchor? I do not understand how this option is implemented. Tell me please.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2018-10-29
@SergeiB

One map of the region with labels. When you click on the address, the map is centered on the coordinates of the selected marker + the zoom increases.
Something like:

map.setOptions({
  center: marker.getPosition(),
  zoom: 17
});

I recently answered a similar question .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question