proper train display
This commit is contained in:
parent
798cdb4d0a
commit
ace90fe432
@ -43,10 +43,14 @@ var AbstractGeoJsonOverlay = L.LayerGroup.extend({
|
|||||||
return geoJsonLayer;
|
return geoJsonLayer;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getMaxDisplayedZoom: function(){
|
||||||
|
return 7;
|
||||||
|
},
|
||||||
|
|
||||||
reDraw: function(){
|
reDraw: function(){
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
if (this.map.getZoom() < 10) {
|
if (this.map.getZoom() < this.getMaxDisplayedZoom()) {
|
||||||
this.clearLayers();
|
this.clearLayers();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -137,7 +137,7 @@ var TrainOverlay = L.LayerGroup.extend({
|
|||||||
var mapLayer = this.layerMgr.getCurrentLayer()
|
var mapLayer = this.layerMgr.getCurrentLayer()
|
||||||
|
|
||||||
this.trains.forEach(function(train){
|
this.trains.forEach(function(train){
|
||||||
if (!self.isPlayerInCurrentLayer(train)){
|
if (!self.isTrainInCurrentLayer(train)){
|
||||||
//not in current layer
|
//not in current layer
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,16 @@ var TrainlineOverlay = AbstractGeoJsonOverlay.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
pointToLayer: function (feature, latlng) {
|
pointToLayer: function (feature, latlng) {
|
||||||
|
|
||||||
|
var geojsonMarkerOptions = {
|
||||||
|
radius: 8,
|
||||||
|
fillColor: "#ff7800",
|
||||||
|
color: "#000",
|
||||||
|
weight: 1,
|
||||||
|
opacity: 1,
|
||||||
|
fillOpacity: 0.8
|
||||||
|
};
|
||||||
|
|
||||||
return L.circleMarker(latlng, geojsonMarkerOptions);
|
return L.circleMarker(latlng, geojsonMarkerOptions);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user