From a21d0509fd4ba84f0c60f8dcacf70186eb0b0b55 Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Tue, 17 Dec 2019 03:12:45 +0000 Subject: [PATCH] Fix centering issue for hub map when dispatching a job order. #270 --- templates/job-order/cmb.form.html.twig | 2 +- templates/job-order/form.html.twig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/job-order/cmb.form.html.twig b/templates/job-order/cmb.form.html.twig index 2c10a73a..d527db9c 100644 --- a/templates/job-order/cmb.form.html.twig +++ b/templates/job-order/cmb.form.html.twig @@ -1486,7 +1486,7 @@ $(function() { selectedHub = id; // center the map - hmap.setCenter(lat, lng); + osm_hmap.flyTo(L.latLng(lat, lng)); } else { // unhighlight this row $(this).removeClass('m-table__row--primary'); diff --git a/templates/job-order/form.html.twig b/templates/job-order/form.html.twig index 5bfc8366..05b36628 100644 --- a/templates/job-order/form.html.twig +++ b/templates/job-order/form.html.twig @@ -1478,7 +1478,7 @@ $(function() { selectedHub = id; // center the map - hmap.setCenter(lat, lng); + osm_hmap.flyTo(L.latLng(lat, lng)); } else { // unhighlight this row $(this).removeClass('m-table__row--primary');