Skip to content

wdtinc/skywise-swarm-maps-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Skywise (SWARM) Maps

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:

Usage

Ensure node.js and npm is installed

run the following commands inside the project directory:

npm install

npm run build

npm run start

Examples can be found in the examples directory.

Add your own keys to the examples/keys.js file:

Interface

SkywiseTiles

Parameters

  • a [Object] the main map object
  • b [String] Skywise app_id
  • c [String] Skywise app_key
  • d [Class] the renderer to use, found in renderers directory

add

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 unique
  • options layerOption object defining options for rendering the layer

remove

remove a layer from the map

Parameters

  • layer_id [String] identifier of the layer. If null, iterates through all layers (optional, default null)

Returns this

refresh

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, default null)

Returns this

next

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, default null)

Returns this

previous

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, default null)

Returns this

get

return the layer

Parameters

  • layer_id [String] identifier of the layer. If null, returns active_layer object (optional, default null)

Returns (activeLayer | Object<activeLayer>) returns either one active

hide

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, default null)

Returns this

show

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, default null)

Returns this

opacity

set opacity of a given tile layer identified by layer_id

Parameters

  • opacity Number value between 0 and 1
  • _op
  • layer_id [String] identifier of the layer. If null, iterates through all layers (optional, default null)

Returns this

About

Plugin to display Skywise Tiles on multiple mapping platforms

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published