Constructor
new MagoViewer(viewer)
Parameters:
Name | Type | Description |
---|---|---|
viewer |
Viewer | Cesium Viewer instance |
- Source:
Example
const magoViewer = new MagoViewer(viewer);
magoViewer.test();
Classes
Methods
addPoint(lon, lat, cssColor, entitiesCollection) → {void}
Samples random points on the globe.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
lon |
number | longitude degrees | |
lat |
number | latitude degrees | |
cssColor |
String | #ffcc00 | CSS color string "#ff0000" |
entitiesCollection |
null |
- Source:
Returns:
- Type
- void
Example
magoViewer.addPoint(126.978388, 37.566610, "#ff0000")
addRandomPoint(cssColor, entitiesCollection) → {void}
Adds a point to the globe.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
cssColor |
String | #ff0000 | CSS color string "#ff0000" |
entitiesCollection |
null |
- Source:
Returns:
- Type
- void
Example
magoViewer.addPoint(126.978388, 37.566610, "#ff0000")
addRandomPoints(count, cssColor, entitiesCollection) → {void}
Samples random points on the globe.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
count |
number | ||
cssColor |
string | #00ff00 | CSS color string "#ff0000" |
entitiesCollection |
null |
- Source:
Returns:
- Type
- void
Example
magoViewer.addRandomPoints(1000, "#ffff00")
changeGlobeColor(cssColor) → {void}
Changes the color of the globe.
Parameters:
Name | Type | Description |
---|---|---|
cssColor |
string | CSS color string "#ff0000" |
- Source:
Returns:
- Type
- void
Example
magoViewer.changeGlobeColor("#ff0000")
(async) changeTerrain(url) → {Promise.<void>}
Changes the terrain provider of the
Parameters:
Name | Type | Description |
---|---|---|
url |
String |
- Source:
Returns:
- Type
- Promise.<void>
Example
changeTerrain('url')
createGridImageryProvider() → {void}
Creates a grid imagery provider on the globe.
- Source:
Returns:
- Type
- void
Example
magoViewer.createGridImageryProvider()
createModel(url, lon, lat) → {void}
Creates a 3D model on the globe.
Parameters:
Name | Type | Description |
---|---|---|
url |
String | |
lon |
number | |
lat |
number |
- Source:
Returns:
- Type
- void
Example
createModel('/assets/lowpoly-tree.glb', 126.978388, 37.566610)
createVworldImageryLayer(type, hybrid, extension, vworldKey) → {module:cesium.ImageryLayer}
VWORLD Imagery Layer Provider on the globe.
Parameters:
Name | Type | Description |
---|---|---|
type |
String | Base, Satellite, White, Midnight |
hybrid |
boolean | |
extension |
String | jpeg, png |
vworldKey |
String | 00000000-0000-0000-0000-000000000000 |
- Source:
Returns:
- Type
- module:cesium.ImageryLayer
Example
magoViewer.createVworldImageryLayer('Satellite', true, 'jpeg', '00000000-0000-0000-0000-000000000000')
createVworldImageryLayerWithoutToken(type, extension) → {module:cesium.ImageryLayer}
VWORLD Imagery Layer Provider on the globe.
Parameters:
Name | Type | Description |
---|---|---|
type |
String | Base, Satellite, White, Midnight |
extension |
String | jpeg, png |
- Source:
Returns:
- Type
- module:cesium.ImageryLayer
Example
magoViewer.createVworldImageryLayer('Satellite', true, 'jpeg', '00000000-0000-0000-0000-000000000000')
flyTo(lon, lat, height) → {void}
Samples random points on the globe.
Parameters:
Name | Type | Description |
---|---|---|
lon |
number | longitude degrees |
lat |
number | latitude degrees |
height |
number | height meters |
- Source:
Returns:
- Type
- void
Example
magoViewer.flyTo(126.978388, 37.566610, 10000)
initPosition(lon, lat, height) → {void}
Initializes the viewer to render points on a globe.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
lon |
number | 0 | longitude degrees |
lat |
number | 0 | latitude degrees |
height |
number | 0 | height meters |
- Source:
Returns:
- Type
- void
Example
magoViewer.initPosition(126.978388, 37.566610, 10000)
test() → {void}
Tests the MagoViewer class.
draws points on the globe.
- Source:
Returns:
- Type
- void
Example
const magoViewer = new MagoViewer(viewer);
magoViewer.test()