A
A
Alexey2017-08-10 00:41:56
JavaScript
Alexey, 2017-08-10 00:41:56

How to make dynamically loaded content on click on marker?

Hello! There are thousands of markers on the map, each click opens a window. The contents of all windows need to be transferred to the map from the server when the page is loaded, so there is a noticeable load on the server. How to make it so that each window is loaded by clicking on the marker ... It is the implementation on the side of the map that is of interest, and not the whole logic ... Probably somewhere here, instead of assigning the full code, you need to somehow make it clear to the map that when you click, execute ajax loading from the specified location:

var infowindow = new google.maps.InfoWindow({
          content: contentString
 });

To create a map, I used an example:
https://developers.google.com/maps/documentation/j...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Shashenkov, 2017-08-10
@dzheka3d

Like this
Read more here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question