C
C
Cheizer2019-05-13 21:57:10
JavaScript
Cheizer, 2019-05-13 21:57:10

Google Maps Api how to add a popup with information with a lot of markers?

Friends, such a difficult question, I hardly figured out how to make city navigation for Google maps.
Now there is no way to make a tooltip with information displayed by clicking on each marker.
Like here: test.vitvad.com/gmap
Here I raised it, how I implemented navigation https://codepen.io/Cheizer/pen/QRKYaj
As I understand it, an additional foreach loop is needed, and an array with information for tooltips.
Where to dig? Can you please tell me if there are examples with many markers?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2019-05-13
@Cheizer

Create an infowindow: And show it when you click on the markers:

marker.addListener('click', function() {
  info.setContent('сюда засовываете свою информацию');
  info.open(map, marker);
});

https://codepen.io/anon/pen/MdjRrM?editors=1010

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question