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