mirror of
https://github.com/FoggedLens/iD.git
synced 2026-04-28 22:56:31 +02:00
Do not set NaN extent when there is no GPX
This commit is contained in:
@@ -224,8 +224,13 @@ iD.ui.Background = function(context) {
|
||||
.on('click', function() {
|
||||
d3.event.preventDefault();
|
||||
d3.event.stopPropagation();
|
||||
context.map()
|
||||
.extent(d3.geo.bounds(context.map().layers[1].geojson()))
|
||||
if (context.map().layers[1].geojson().type) {
|
||||
context.map()
|
||||
.extent(d3.geo.bounds(context
|
||||
.map()
|
||||
.layers[1]
|
||||
.geojson()));
|
||||
}
|
||||
})
|
||||
.append('span')
|
||||
.attr('class', 'icon geocode' );
|
||||
|
||||
Reference in New Issue
Block a user