mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-20 15:34:49 +02:00
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:
@@ -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');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user