set map icons when map is loaded
This commit is contained in:
parent
da38f5e932
commit
1d7dfe72c2
|
@ -146,12 +146,16 @@ import router from './router/router';
|
|||
}
|
||||
|
||||
function setupEtapeMapPopup(store) {
|
||||
setTimeout(() => {
|
||||
jQuery(document).bind('leaflet.map', function(event, map, lMap) {
|
||||
|
||||
//setTimeout(() => {
|
||||
const icons = document.querySelectorAll('.leaflet-map-divicon');
|
||||
for (let icon of icons) {
|
||||
const colorContainer = icon.querySelector('.couleur');
|
||||
const colorDiv = colorContainer.querySelector('div > div:nth-of-type(4)');
|
||||
const color = colorDiv.innerText.substring(colorDiv.innerText.indexOf('>') + 1, colorDiv.innerText.indexOf('<', colorDiv.innerText.indexOf('>') + 1)).trim();
|
||||
console.log(color);
|
||||
|
||||
|
||||
const nid = icon.querySelector('.nid');
|
||||
const nidValue = nid.querySelector('div > div').innerText;
|
||||
|
@ -178,7 +182,8 @@ import router from './router/router';
|
|||
icon.style.transform = icon.style.transform.split(' ')[0] + icon.style.transform.split(' ')[1] + icon.style.transform.split(' ')[2];
|
||||
})
|
||||
}
|
||||
}, 500);
|
||||
// }, 500);
|
||||
});
|
||||
}
|
||||
|
||||
init()
|
||||
|
|
Loading…
Reference in New Issue