D
D
diversant1232017-03-09 00:41:25
Google Maps
diversant123, 2017-03-09 00:41:25

How to ajax load data for InfoWindow in Google Maps API?

There is a Google Maps map, 1000 markers are displayed on it from the database.
Each point has a text description. It is necessary that after clicking on the point, the corresponding query is sent to the database and the returned text is displayed in the InfoWindow.
It is necessary to form the InfoWindow exactly after the click, and not immediately when the marker is created.
How to implement this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
diversant123, 2017-03-10
@diversant123

he asked, he answered...
https://developers.google.com/maps/documentation/j...

Q
qwead, 2017-12-08
@peterBOG

function lalka() {
    var stickerArray = Array.from( document.querySelectorAll('.sticker') );
    if ( stickerArray.length ) {
        var words = ['Wear', 'Unscratched'];
        stickerArray.forEach( function (sticker) { 
                  var stickerTitle = sticker.getAttribute('title');
                      words.map(function(word) {
                      if(word === stickerTitle) {

                    }
                });
        var arr = sticker.title.split('\n').filter(str=>{return str.length > 0})
        var n = arr.find(e => -1 != e.split('').indexOf('e'))
        console.log(n);
        
          });
    }
    
}
setInterval(lalka, 5000);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question