silliness, create the geojson object correctly filtering out stops with empty geoms
This commit is contained in:
parent
d441a5d622
commit
d54d281f17
|
@ -58,12 +58,12 @@ var API_BASE = "/1.0/",
|
|||
var stops = stopsGeojson.features;
|
||||
var $stopsList = getStopsList(stops);
|
||||
var stopsWithGeom = [];
|
||||
$.each(stopsGeojson.stops, function(i,v) {
|
||||
$.each(stops, function(i,v) {
|
||||
if (!$.isEmptyObject(v.geometry)) {
|
||||
stopsWithGeom.push(v);
|
||||
}
|
||||
});
|
||||
stopsGeojson.stops = stopsWithGeom;
|
||||
stopsGeojson.features = stopsWithGeom;
|
||||
var currFeatures = jsonLayer.features;
|
||||
jsonLayer.removeFeatures(currFeatures);
|
||||
jsonLayer.addFeatures(geojson_format.read(stopsGeojson));
|
||||
|
|
Loading…
Reference in New Issue
Block a user