-
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
436d379
commit f722647
Showing
47 changed files
with
2,945 additions
and
321 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export default class CRS { | ||
options: any; | ||
transformation: any; | ||
projection: any; | ||
_scales: number[]; | ||
R: number; | ||
constructor(code: string, proj: string, options: any, radius: number); | ||
project(latlng: any): any; | ||
unproject(point: any, zoom: any): any; | ||
pointToLatLng(point: any, zoom: any): any; | ||
scale(zoom: number): number; | ||
} |
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
Empty file.
Empty file.
Empty file.
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
declare const Paths: { | ||
buildPath: (format: string, basePath: string, tD: any, projection: any, tileResolution: number, options?: any, asObject?: boolean) => any; | ||
wmsExtension: { | ||
defaultWmsParams: { | ||
SERVICE: string; | ||
REQUEST: string; | ||
FORMAT: string; | ||
TRANSPARENT: boolean; | ||
VERSION: string; | ||
wmsVersion: any; | ||
WIDTH: any; | ||
HEIGHT: any; | ||
}; | ||
extensionOptions: { | ||
crsCode: string; | ||
uppercase: boolean; | ||
}; | ||
buildPath: (basePath: string, xyz: any, projection: any, tileResolution: number, options: any) => string; | ||
}; | ||
}; | ||
export default Paths; |
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,106 @@ | ||
<!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: 0, | ||
zoom: 0, | ||
}, | ||
majorRadius: 1737400, | ||
customParsers: { | ||
All500: (tilePath, layerObj) => { | ||
return new Promise((resolve, reject) => { | ||
const tileDimension = 32 | ||
resolve( | ||
new Array(tileDimension * tileDimension).fill( | ||
500 | ||
) | ||
) | ||
}) | ||
}, | ||
}, | ||
//opt | ||
tileMapResource: { | ||
//bounds: [-868700, -868700, 868700, 868700], | ||
//origin: [-868700, -868700], | ||
bounds: [-1737400, -1737400, 1737400, 1737400], | ||
origin: [-1737400, 1737400], | ||
crsCode: 'IAU2000:30166,0,0', | ||
proj: | ||
'+proj=stere +lat_0=0 +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=1737400 +b=1737400 +units=m +no_defs', // proj4 string describing the global tileset projection: string (opt) | default wgs84 | ||
resunitsperpixel: 6786.71875, | ||
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: 'Global WAC', | ||
order: 1, //Orders are ordered only within the layer type | ||
on: true, | ||
path: | ||
'https://viperserv.jpl.nasa.gov/lunaserv/?layers=luna_wac_global', | ||
demPath: null, | ||
format: 'wms', // 'wmts' || 'wms' // wms requires a tileMapResource to be set to help compute tile bboxes | ||
formatOptions: {}, | ||
demFormat: 'wms', // | ||
demFormatOptions: {}, | ||
opacity: 1, | ||
minZoom: 0, | ||
maxZoom: 18, | ||
}) | ||
|
||
Litho.addControl('myLayers', Litho.controls.layers) | ||
Litho.addControl('myCompass', Litho.controls.compass) | ||
Litho.addControl('myCoords', Litho.controls.coordinates, { | ||
//existingDivId: 'myCustomCoordDiv', | ||
}) | ||
</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
Oops, something went wrong.