Answer the question
In order to leave comments, you need to log in
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
he asked, he answered...
https://developers.google.com/maps/documentation/j...
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 questionAsk a Question
731 491 924 answers to any question