Compare commits
No commits in common. "2f02ca1d2a0d489ec65619a8d64c3deb76af2694" and "1292c1a57377a0e8fb8f80a7f4869880d0fc26ca" have entirely different histories.
2f02ca1d2a
...
1292c1a573
@ -45,28 +45,9 @@ streetLabelsRenderer._getDynamicFontSize = function (layer) {
|
||||
return 2**(zoom - 9) * 11;
|
||||
break;
|
||||
case "Polygon":
|
||||
var size;
|
||||
if (zoom >= 4)
|
||||
size = 30;
|
||||
else
|
||||
size = 20;
|
||||
switch (layer.properties.type) {
|
||||
case "city":
|
||||
break;
|
||||
case "town":
|
||||
size *= 2/3;
|
||||
break;
|
||||
case "village":
|
||||
size *= 1/3;
|
||||
break;
|
||||
case "district":
|
||||
size *= 2/3;
|
||||
break;
|
||||
default:
|
||||
size *= 0.5/3;
|
||||
break;
|
||||
}
|
||||
return size;
|
||||
return 30;
|
||||
return 20;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -186,8 +167,6 @@ function load_geojson(name, url, iconname, iconcolor, active=1, style={}) {
|
||||
switch (iconname) {
|
||||
case "street":
|
||||
onEachFeature = function(feature, layer) {
|
||||
layer.myTag = iconname;
|
||||
layer.myName = name;
|
||||
layer.on("click", function (e) {
|
||||
current_feature = feature;
|
||||
});
|
||||
@ -496,11 +475,11 @@ function update_street_width() {
|
||||
w = 2**zoom * 0.016 * 2;
|
||||
}
|
||||
var myStyle = {weight: w, opacity: 0.7};
|
||||
mymap.eachLayer( function(layer) {
|
||||
if ( layer.myTag && layer.myTag === "street") {
|
||||
layer.setStyle(myStyle);
|
||||
for (var i = 0; i < layers._layers.length; i++) {
|
||||
if (!layers._layers[i].layer._layers)
|
||||
continue;
|
||||
layers._layers[i].layer.setStyle(myStyle);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function update_outline_visibility() {
|
||||
|
Loading…
Reference in New Issue
Block a user