From 135019f987919901f3f5b404fdc5f9ab8f5076fe Mon Sep 17 00:00:00 2001 From: Megala Date: Tue, 27 Sep 2016 13:33:12 +0530 Subject: [PATCH] Fixing EMM-1626 --- .../app/units/mdm.unit.device.view/public/js/load-map.js | 2 +- .../devicemgt/app/units/mdm.unit.device.view/view.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/public/js/load-map.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/public/js/load-map.js index 895f75b94..c09ab8ddb 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/public/js/load-map.js +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/public/js/load-map.js @@ -45,7 +45,7 @@ $(document).ready(function () { var url = $(this).prop("href"); var hash = url.substring(url.indexOf("#") + 1); - if (hash == "device_location") { + if (hash == "device_location_tab") { if (!map) { loadLeafletMap(); } diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/view.js b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/view.js index 2fee10e12..3e737a894 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/view.js +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.view/view.js @@ -77,6 +77,10 @@ function onRequest(context) { deviceInfo = info; if (device["deviceInfo"]) { + viewModel["location"] = { + latitude: device["deviceInfo"]["location"]["latitude"], + longitude: device["deviceInfo"]["location"]["longitude"] + }; viewModel["deviceInfo"] = true; viewModel["model"] = device["deviceInfo"]["deviceModel"];