MapService
MapService is an Angular Factory in the SVG module with the name map.js
. It provides an API to load geographical maps into SVG layers. To use this API, see the documentation on injecting Angular services.
Name | Summary |
---|---|
loadMapRegionInto | Searches for a map in a large datafile and loads a specific map region into to the SVG layer. |
loadMapInto | Load a map region into the SVG layer. |
Function Descriptions
loadMapRegionInto
Searches for a map in a large datafile and loads a specific map region into to the SVG layer. This assumes the map file you are providing has multiple maps in it.
Example Usage | Arguments | Return Value |
---|---|---|
var promise = ms.loadMapRegionInto(
Example:
|
'countryFilter': function reference that is a filter function to find the country in the file | a promise to load (asynchronously) the geo-map-data-file |
loadMapInto
Load a map region into the SVG layer. This assumes the map file you are providing only has one map in it.
Example Usage | Arguments | Return Value |
---|---|---|
ms.loadMapInto(mapLayer , id , opts ); |
| a promise to load (asynchronously) the geo-map-data-file |