",'icon': '../s/img/attraction_icon.png','iconSize':[32, 38]}},
]
};
// add markers to map
geojson.features.forEach(function(marker) {
// create a DOM element for the marker
var el = document.createElement('div');
el.className = 'marker';
//el.style.backgroundImage = 'url(' + marker.properties.icon + '/)';
el.style.backgroundImage = 'url(' + marker.properties.icon + ')';
el.style.width = marker.properties.iconSize[0] + 'px';
el.style.height = marker.properties.iconSize[1] + 'px';
// add marker to map
var m = new mapboxgl.Marker(el)
.setLngLat(marker.geometry.coordinates)
.setPopup(new mapboxgl.Popup({ offset: 25 }) // add popups
.setHTML('
' + marker.properties.message + '
'))
.addTo(map);
markerArray.push(marker);
});
function showInfo(idx) {
var marker = markerArray[idx];
new mapboxgl.Popup()
.setLngLat(marker.geometry.coordinates)
.setHTML('
' + marker.properties.message + '
')
.addTo(map);
}
function my_encode(a){a=base64_encode(a);return strtr(a,"+/=","-_,")}
function strtr(a,d,f){var g="",c=0,b=0,k=0,e=0,h=!1,m="",n="",p="",c=[],b=[],l="",h=!1;if("object"===typeof d){h=this.ini_set("phpjs.strictForIn",!1);d=this.krsort(d);this.ini_set("phpjs.strictForIn",h);for(g in d)d.hasOwnProperty(g)&&(c.push(g),b.push(d[g]));d=c;f=b}k=a.length;e=d.length;m="string"===typeof d;n="string"===typeof f;for(c=0;c>18&63,f=c>>12&63,g=c>>6&63,c&=63,e[k++]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(d)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(f)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(c);
while(b