This file contains hidden or 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
var viewer = new Cesium.Viewer('cesiumContainer'); | |
//Normally you would define the default styles | |
//in CSS, but for the example it's easier to | |
//just do it here. | |
var geoOverlay = document.createElement('div'); | |
viewer.container.appendChild(geoOverlay); | |
geoOverlay.style.display = 'none'; | |
geoOverlay.style['background-color'] = 'white'; | |
geoOverlay.style.position = 'absolute'; |
This file contains hidden or 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
//Call this once at application startup | |
Cesium.Material._materialCache.addMaterial('Wallpaper', { | |
fabric : { | |
type : 'Wallpaper', | |
uniforms : { | |
image : Cesium.Material.DefaultImageId, | |
anchor : new Cesium.Cartesian2(0, 0) | |
}, | |
components : { | |
diffuse : 'texture2D(image, fract((gl_FragCoord.xy - anchor.xy) / vec2(imageDimensions.xy))).rgb', |
This file contains hidden or 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
Command to convert S-57 file to PostGIS data: | |
ogr2ogr -f "PostgreSQL" PG:"dbname=<dbname> user=<user> password=<password>" "<path_to_s57>" | |
Convert a shp file to GeoJSON | |
ogr2ogr -f "GeoJSON" usa.geojson "<path_to_file.shp>" | |
Command to serve http-server as https: | |
openssl req -nodes -new -x509 -keyout server.key -out server.cert | |
http-server -S -C server.cert -K server.key |