better error management when loading file
parent
9c64f25f48
commit
2cefac0323
|
@ -34,7 +34,7 @@ GpxEdit :
|
||||||
- allows you to add extra symbols in Nextcloud(\*) admin settings (section : additional)
|
- allows you to add extra symbols in Nextcloud(\*) admin settings (section : additional)
|
||||||
- works with server-side encryption.
|
- works with server-side encryption.
|
||||||
- works with shared files.
|
- works with shared files.
|
||||||
- loads GPX, KML, unicsv CSV, geotagged JPG files (requires Gpsbabel to convert files and python-pil to import pictures)
|
- loads GPX, KML, unicsv CSV, geotagged JPG files (requires Gpsbabel to convert files and import pictures)
|
||||||
- loads tracks, routes and waypoints
|
- loads tracks, routes and waypoints
|
||||||
- saves tracks, routes and waypoints
|
- saves tracks, routes and waypoints
|
||||||
- supports waypoint symbols
|
- supports waypoint symbols
|
||||||
|
|
|
@ -1009,8 +1009,9 @@
|
||||||
OC.dialogs.alert('The file does not exist or it is not supported',
|
OC.dialogs.alert('The file does not exist or it is not supported',
|
||||||
'Load error');
|
'Load error');
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
parseGpx(response.gpx);
|
parseGpx(response.gpx);
|
||||||
|
try {
|
||||||
var bounds = gpxedit.editableLayers.getBounds();
|
var bounds = gpxedit.editableLayers.getBounds();
|
||||||
gpxedit.map.fitBounds(
|
gpxedit.map.fitBounds(
|
||||||
bounds,
|
bounds,
|
||||||
|
@ -1019,8 +1020,16 @@
|
||||||
paddingTopLeft: [parseInt($('#sidebar').css('width')), 0]
|
paddingTopLeft: [parseInt($('#sidebar').css('width')), 0]
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
hideLoadingAnimation();
|
|
||||||
}
|
}
|
||||||
|
catch (err) {
|
||||||
|
console.log('Impossible to fit to bounds \n'+err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
hideLoadingAnimation();
|
||||||
|
}).fail(function (){
|
||||||
|
OC.dialogs.alert('Failed to communicate with the server',
|
||||||
|
'Load error');
|
||||||
|
hideLoadingAnimation();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue