From 91006d9fb14e864880278562d6e4a78fceb005ed Mon Sep 17 00:00:00 2001 From: Matthias Pfeil Date: Fri, 8 Dec 2017 17:24:55 +0100 Subject: [PATCH] feat(leaflet): add getLayers method New method getLayers returns all available layers --- app/components/leaflet.service.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/components/leaflet.service.js b/app/components/leaflet.service.js index 2e5571f0..abdc4b29 100644 --- a/app/components/leaflet.service.js +++ b/app/components/leaflet.service.js @@ -15,6 +15,7 @@ setMap: setMap, getMap: getMap, getLayer: getLayer, + getLayers: getLayers, setLayer: setLayer }; @@ -67,5 +68,11 @@ return deferred.promise; } + + function getLayers () { + var deferred = $q.defer(); + deferred.resolve(layers); + return deferred.promise; + } } })();