Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var points = L.geoJson(dtr_points, {
- onEachFeature: function (feature, layer) {
- var link_url = "<a href='" + feature.properties.Link + "' target='_blank'>" + feature.properties.Name + "</a>"
- console.log(link_url);
- layer.bindPopup(link_url);
- if(feature.properties.Type == "beer") {
- layer.setIcon(beer);
- };
- if(feature.properties.Type == "bar") {
- layer.setIcon(bar);
- };
- if(feature.properties.Type == "restaurant") {
- layer.setIcon(restaurant);
- };
- if(feature.properties.Type == "music") {
- layer.setIcon(music);
- };
- if(feature.properties.Type == "culture") {
- layer.setIcon(culture);
- };
- if(feature.properties.Type == "cafe") {
- layer.setIcon(cafe);
- };
- if(feature.properties.Type == "occult shop") {
- layer.setIcon(occult);
- };
- }
- }).addTo(map);
- L.control.zoom({
- position:'bottomright'
- }).addTo(map);
- L.control.layers(points).addTo(map);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement