Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,21 @@
///
var openTopoMap = L.tileLayer("http://{s}.tile.opentopomap.org/{z}/{x}/{y}.png", {
minZoom: 12,
maxZoom: 16,
maxZoom: 17,
attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
'<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
'Kartendarstellung: © <a href="http://opentopomap.org/">OpenTopoMap</a>'
});

var osmMapnik = L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
minZoom: 12,
maxZoom: 16,
maxZoom: 19,
attribution: 'Map data © OpenStreetMap contributors'
});

var osmMapnikBlackWhite = L.tileLayer("http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png", {
minZoom: 12,
maxZoom: 16,
maxZoom: 18,
attribution: 'Map data © OpenStreetMap contributors'
});

Expand All @@ -83,7 +83,7 @@
"bench": benchs,
"hunting stand": huntingstands,
"entrance (cave, adit)": entrances,
"surveillance": surveillances,
"surveillance camera": surveillances,
"advertising": advertising,
"traffic sign": trafficsign
};
Expand All @@ -105,6 +105,7 @@
var debug = false;
var osmIds = {};
var defaultRadius = 150;
var cameraRadius = 30;
var defaultSegmentAngle = 45;

///
Expand Down Expand Up @@ -198,7 +199,7 @@
overpassUrl += 'node["amenity"="hunting_stand"]({{bbox}});';
overpassUrl += 'node["natural"="cave_entrance"]({{bbox}});';
overpassUrl += 'node["man_made"="adit"]({{bbox}});';
overpassUrl += 'node["camera:direction"]({{bbox}});';
overpassUrl += 'node["surveillance:type"="camera"]({{bbox}});';
overpassUrl += 'node["advertising"]({{bbox}});';
overpassUrl += 'node[traffic_sign][direction][direction!~"^(forward|backward)$"]({{bbox}});';
overpassUrl += ')';
Expand Down Expand Up @@ -250,9 +251,12 @@

var radius = defaultRadius;

// move camera:direction to direction
if ('camera:direction' in element.tags) {
element.tags.direction = element.tags["camera:direction"];
if (element.tags["surveillance:type"] === "camera") {
radius = cameraRadius;

if ('camera:direction' in element.tags) {
element.tags.direction = element.tags["camera:direction"];
}
}

if ('direction' in element.tags) {
Expand Down