Commit fd899f45 authored by Yohan Boniface's avatar Yohan Boniface

Do not fail if umap raw data does not contain geometry

parent 6778c885
......@@ -752,7 +752,7 @@ L.Storage.Map.include({
layer;
if (type === 'umap') {
this.once('postsync', function () {
this.setView(this.options.center, this.options.zoom);
this.setView(this.latLng(this.options.center), this.options.zoom);
});
}
if (layerId) layer = map.datalayers[layerId];
......@@ -819,7 +819,7 @@ L.Storage.Map.include({
}
}
this.options.center = this.latLng(importedData.geometry);
if (importedData.geometry) this.options.center = this.latLng(importedData.geometry);
var self = this;
importedData.layers.forEach( function (geojson) {
var dataLayer = self.createDataLayer();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment