From e3e3ffb453b508825d64ce6555a252c2389ed193 Mon Sep 17 00:00:00 2001 From: "didier.amyot" Date: Fri, 18 Jul 2014 11:09:19 -0400 Subject: [PATCH] fixed bug. --- client/coffee/controllers/geojsonmapCtrl.coffee | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/coffee/controllers/geojsonmapCtrl.coffee b/client/coffee/controllers/geojsonmapCtrl.coffee index d0ac01a..b1ae009 100644 --- a/client/coffee/controllers/geojsonmapCtrl.coffee +++ b/client/coffee/controllers/geojsonmapCtrl.coffee @@ -58,7 +58,7 @@ transformListOfGeoJsonToGeometryCollection = (resData, routeParams) -> return ret -root.controllers.controller('geojsonmapCtrl', ['$scope', '$routeParams', '$location', 'util', ($scope, $routeParams, $location, util) -> +root.controllers.controller('geojsonmapCtrl', ['$scope', '$routeParams', '$location', '$rootScope', 'util', ($scope, $routeParams, $location, $rootScope, util) -> $scope.geojson = {} $scope.geojsonData = {} $scope.idx = Number($routeParams.idx) @@ -96,6 +96,11 @@ root.controllers.controller('geojsonmapCtrl', ['$scope', '$routeParams', '$locat $scope.setStyleOnFeature = (feature, element) -> if feature.properties and feature.properties.style element.setStyle(feature.properties.style) + element.on + click: (e) -> + $rootScope.$broadcast("leafletDirectiveMap.geojsonClick", feature, e) + + $scope.initSingleDocument = ()-> url = getSingleDataUrl($routeParams)