Fix carte bug if user has not draw on map
This commit is contained in:
parent
24a33a3714
commit
3e4ba4715d
1 changed files with 4 additions and 2 deletions
|
@ -22,8 +22,10 @@ function initCarto() {
|
|||
$(document).on('turbolinks:load', initCarto);
|
||||
|
||||
function drawUserSelection(map) {
|
||||
var polygon = L.polygon(dossierJsonLatLngs, { color: 'red', zIndex: 3 }).addTo(map);
|
||||
map.fitBounds(polygon.getBounds());
|
||||
if (dossierJsonLatLngs.length > 0) {
|
||||
var polygon = L.polygon(dossierJsonLatLngs, { color: 'red', zIndex: 3 }).addTo(map);
|
||||
map.fitBounds(polygon.getBounds());
|
||||
}
|
||||
}
|
||||
|
||||
function defaultGestionnairePosition() {
|
||||
|
|
Loading…
Reference in a new issue