Skip to content
Snippets Groups Projects
Commit 12abe1b4 authored by Olivia206's avatar Olivia206
Browse files

fixed js

parent c1e04548
No related branches found
No related tags found
No related merge requests found
......@@ -27,21 +27,16 @@ class BlockPartners {
}).addTo(map);
this.partnersList.forEach((partner) => {
this.setLocation(map, partner);
let latitude = parseFloat(partner.getAttribute('data-latitude')),
longitude = parseFloat(partner.getAttribute('data-longitude')),
mapLocation = [latitude, longitude];
if (!!latitude && !!longitude) {
this.newMarker(map, mapLocation, partner);
}
});
}
setLocation(map, partner) {
let latitude = parseFloat(partner.getAttribute('data-latitude')),
longitude = parseFloat(partner.getAttribute('data-longitude'));
if (!!latitude && !!longitude) {
this.mapLocation = [latitude, longitude];
}
this.newMarker(this.mapLocation, map, partner);
}
newMarker(mapLocation, map, partner) {
newMarker(map, mapLocation, partner) {
let marker = new L.marker(mapLocation, {
draggable: false,
icon: this.themeMarker
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment