-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8c1ce09
commit 795c84a
Showing
10 changed files
with
2,320 additions
and
72 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>LithoSphere Demo</title> | ||
|
||
<script src="../dist/lithosphere.js"></script> | ||
<style> | ||
html, | ||
body { | ||
width: 100%; | ||
height: 100%; | ||
margin: 0; | ||
background: black; | ||
} | ||
#container { | ||
width: 100%; | ||
height: 100%; | ||
overflow: hidden; | ||
} | ||
#myCustomCoordDiv { | ||
position: absolute; | ||
top: 10px; | ||
left: 50%; | ||
transform: translateX(-50%); | ||
background: white; | ||
color: black; | ||
padding: 2px 4px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="container"></div> | ||
<!--<div id="myCustomCoordDiv"></div>--> | ||
<script> | ||
const Litho = new LithoSphere.default('container', { | ||
initialView: { | ||
lng: 0, // default 0 | ||
lat: -89.9, | ||
zoom: 0, | ||
}, | ||
majorRadius: 1737400, | ||
tileMapResource: { | ||
// minx, miny, maxx, maxy | ||
bounds: [-1095700 - 1095600, 1095600, 1095700], | ||
origin: [-1095700, -1095600], | ||
crsCode: 'IAU2000:30166,0,-89.9', | ||
proj: | ||
'+proj=stere +lat_0=-89.9 +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs', // proj4 string describing the global tileset projection: string (opt) | default wgs84 | ||
resunitsperpixel: 128000, | ||
reszoomlevel: 0, | ||
}, | ||
//radiusOfTiles: 3, | ||
useLOD: false, | ||
//wireframeMode: true, | ||
starsphere: { | ||
url: | ||
'https://miplmmgis.jpl.nasa.gov/public/images/eso0932a.jpg', | ||
color: '#444444', | ||
}, | ||
atmosphere: { | ||
color: '#222227', | ||
}, | ||
}) | ||
|
||
console.log(Litho) | ||
|
||
Litho.addLayer('tile', { | ||
name: 'Mars', | ||
order: 1, //Orders are ordered only within the layer type | ||
on: true, | ||
path: | ||
'http://localhost:8889/Missions/Projections/Layers/Basemap/MarsDEM/LRO_WAC_Mosaic_SPole60_100m_v2/{z}/{x}/{y}.png', | ||
demPath: null, | ||
format: 'tms', // 'wmts' || 'wms' // wms requires a tileMapResource to be set to help compute tile bboxes | ||
formatOptions: {}, | ||
demFormat: 'tms', // | ||
demFormatOptions: {}, | ||
opacity: 1, | ||
minZoom: 0, | ||
maxZoom: 10, | ||
}) | ||
|
||
Litho.addControl('myLayers', Litho.controls.layers) | ||
Litho.addControl('myCompass', Litho.controls.compass) | ||
Litho.addControl('myCoords', Litho.controls.coordinates) | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters