This is a mapping library for SWARM Tiles, it is built based on the Documentation found at: https://skywise.wdtinc.com/root/swarm-docs.html, it features mapping interfaces to the following libraries:
Ensure node.js and npm is installed
run the following commands inside the project directory:
npm install
npm run build
Examples can be found in the examples directory.
Add your own keys to the examples/keys.js file:
-
Skywise Keys: https://skywise.wdtinc.com
-
Google Maps Key: https://developers.google.com/maps/documentation/javascript/get-api-key
-
Mapbox Auth Token: https://www.mapbox.com
Parameters
a[Object] the main map objectb[String] Skywise app_idc[String] Skywise app_keyd[Class] the renderer to use, found in renderers directory
add a layer to the map. layer_id. Product list can be found at https://skywise.wdtinc.com/root/swarm-docs.html#product_list
Parameters
layer_id[String] identifier of the layer to be added. must be uniqueoptionslayerOption object defining options for rendering the layer
remove a layer from the map
Parameters
layer_id[String] identifier of the layer. If null, iterates through all layers (optional, defaultnull)
Returns this
call valid frames and check if the current frame is current. If not, update layer to most recent frame.
Parameters
layer_id[String] identifier of the layer. If null, iterates through all layers (optional, defaultnull)
Returns this
For a given layer_id, update the current frame to the next available timestep. If at the last timestep, will loop to the first
Parameters
layer_id[String] identifier of the layer. If null, iterates through all layers (optional, defaultnull)
Returns this
For a given layer_id, update the current frame to the previous available timestep. If at the first timestep, will loop to the last
Parameters
layer_id[String] identifier of the layer. If null, iterates through all layers (optional, defaultnull)
Returns this
return the layer
Parameters
layer_id[String] identifier of the layer. If null, returns active_layer object (optional, defaultnull)
Returns (activeLayer | Object<activeLayer>) returns either one active
set the opacity to 0 of a given tile layer identified by layer_id
this can be used in conjuction with show
Parameters
layer_id[String] identifier of the layer. If null, iterates through all layers (optional, defaultnull)
Returns this
set the opacity to the layer opacity of a given tile layer identified by layer_id
this can be used in conjuction with hide
Parameters
layer_id[String] identifier of the layer. If null, iterates through all layers (optional, defaultnull)
Returns this
set opacity of a given tile layer identified by layer_id
Parameters
opacityNumber value between 0 and 1_oplayer_id[String] identifier of the layer. If null, iterates through all layers (optional, defaultnull)
Returns this