rudimental support for providing gpx-files via urls

see #1965 (esp: https://github.com/systemed/iD/issues/1965#issuecomment-29045054)
This commit is contained in:
tyr
2013-11-22 13:21:20 +01:00
parent 79b5adf106
commit a3d44789f6
+9
View File
@@ -228,5 +228,14 @@ iD.Background = function(context) {
if (overlay) background.toggleOverlayLayer(overlay);
});
var gpx = q.gpx;
if (gpx) {
d3.text(gpx, function(err, gpxTxt) {
gpxLayer.geojson(toGeoJSON.gpx(toDom(gpxTxt)));
dispatch.change();
context.map().pan([0, 0]);
});
}
return d3.rebind(background, dispatch, 'on');
};