@hash/gis
Simulation
1
0
Public

GIS

This library includes three behaviors to help in constructing simulations using the Geospatial viewer.

This library contains behaviors designed to help build simulations which use the Geospatial view.

Longitude/Latitude to Position

The ll_to_pos.js behavior allows your geospatial agents to easily display in the 3D Viewer. Agents in the geospatial viewer have a lng_lat property defining their location, and this behavior will automatically set their position property as well.

Requirements

In addition to adding the ll_to_pos.js behavior to an agent, you'll need to set two properties in globals.json:

{
  // The lng_lat coordinate that will correspond to position [0, 0]
  "center_ll": number[2],
  // The scaling factor from the Geospatial view to the 3D Viewer. 
  // A lng_lat change of 1 equals a change of "scale_ll" in 3D
  "scale_ll": number
}

Request Route

Requirements

Follow Route