Skip to content

Commit

Permalink
feat(leaflet): add getLayers method
Browse files Browse the repository at this point in the history
New method getLayers returns all available layers
  • Loading branch information
mpfeil committed Dec 8, 2017
1 parent 8021790 commit 91006d9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/components/leaflet.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
setMap: setMap,
getMap: getMap,
getLayer: getLayer,
getLayers: getLayers,
setLayer: setLayer
};

Expand Down Expand Up @@ -67,5 +68,11 @@

return deferred.promise;
}

function getLayers () {
var deferred = $q.defer();
deferred.resolve(layers);
return deferred.promise;
}
}
})();

0 comments on commit 91006d9

Please sign in to comment.