Merge pull request #685 from sgmap/fix_map_bug
Fix carte bug if user has not drawn on map
This commit is contained in:
commit
ff3120bf6c
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…
Add table
Reference in a new issue