Enable a few linting rules
This commit is contained in:
parent
5d8442a473
commit
3fbc8a3d32
7 changed files with 28 additions and 22 deletions
|
@ -65,9 +65,8 @@ OSM.initializeContextMenu = function (map) {
|
|||
function getDirectionsEndpointCoordinatesFromInput(input) {
|
||||
if (input.attr("data-lat") && input.attr("data-lon")) {
|
||||
return input.attr("data-lat") + "," + input.attr("data-lon");
|
||||
} else {
|
||||
return $(input).val();
|
||||
}
|
||||
return $(input).val();
|
||||
}
|
||||
|
||||
var updateMenu = function updateMenu() {
|
||||
|
|
|
@ -121,7 +121,7 @@ OSM.initializeDataLayer = function (map) {
|
|||
},
|
||||
error: function (XMLHttpRequest, textStatus) {
|
||||
dataLoader = null;
|
||||
if (textStatus === "abort") { return; }
|
||||
if (textStatus === "abort") return;
|
||||
|
||||
function closeError() {
|
||||
$("#browse_status").empty();
|
||||
|
|
|
@ -115,17 +115,16 @@ OSM.Query = function (map) {
|
|||
}
|
||||
}
|
||||
|
||||
if (tags.name) {
|
||||
return tags.name;
|
||||
} else if (tags.ref) {
|
||||
return tags.ref;
|
||||
} else if (tags["addr:housename"]) {
|
||||
return tags["addr:housename"];
|
||||
} else if (tags["addr:housenumber"] && tags["addr:street"]) {
|
||||
return tags["addr:housenumber"] + " " + tags["addr:street"];
|
||||
} else {
|
||||
return "#" + feature.id;
|
||||
for (const key of ["name", "ref", "addr:housename"]) {
|
||||
if (tags[key]) {
|
||||
return tags[key];
|
||||
}
|
||||
}
|
||||
|
||||
if (tags["addr:housenumber"] && tags["addr:street"]) {
|
||||
return tags["addr:housenumber"] + " " + tags["addr:street"];
|
||||
}
|
||||
return "#" + feature.id;
|
||||
}
|
||||
|
||||
function featureGeometry(feature) {
|
||||
|
@ -285,10 +284,11 @@ OSM.Query = function (map) {
|
|||
.hide();
|
||||
|
||||
if (marker) map.removeLayer(marker);
|
||||
marker = L.circle(latlng, Object.assign({
|
||||
marker = L.circle(latlng, {
|
||||
radius: radius,
|
||||
className: "query-marker"
|
||||
}, featureStyle)).addTo(map);
|
||||
className: "query-marker",
|
||||
...featureStyle
|
||||
}).addTo(map);
|
||||
|
||||
runQuery(latlng, radius, nearby, $("#query-nearby"), false);
|
||||
runQuery(latlng, radius, isin, $("#query-isin"), true, compareSize);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue