This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Service to manage geoJSON layering with Leaflet.js' angular directive, which only allows 1 set of geoJSON data. | |
* | |
* Assuming you have a leaflet directive with its 'geojson' attribute set to `geojson`, usage is as follows: | |
* var layers = new GeoJSONLayers(); | |
* | |
* layers.addLayer('myLayer', geoJSON, function(feature) { return { fillColor: '#00F' }; }); | |
* $scope.geojson = layers.get(); | |
* | |
* layers.removeLayer('myLayer'); |