I have installed geoserver, qgis-server and I am serving raster tiles styling them using openlayers on a local network. Now I need to serve 3d-maps... Can I run cesium on a standalone local network for this(no internet connectivity)?
4 Answers
Cesium offers an Offline Demo that shows how to turn off the things that talk to external networks by default.
var viewer = new Cesium.Viewer("cesiumContainer", {
imageryProvider: new Cesium.TileMapServiceImageryProvider({
url: Cesium.buildModuleUrl("Assets/Textures/NaturalEarthII"),
}),
baseLayerPicker: false,
geocoder: false,
});
Primarily, the baseLayerPicker
and geocoder
should be turned off, as they use external services. The imageryProvider
shown here is Natural Earth II, but you can swap that out with your own imagery service.
Alternately, the baseLayerPicker
can be left enabled, but you can empty out its contents and replace them with your own local-network imagery provider selections.
-
Thanks a ton. I was able to add my WMS imagery layers from QGIS-Server on to cesium. How do I use my own terrian(dem files) to present the elevation data.– rssOct 26, 2021 at 7:43
-
Glad it helped! If you have an additional question, such as the one about dem files in the comments, do a quick search to see if this site already has the same question posted. If not, go ahead and post that as a new question, along with code showing what you've tried and what's not working.– emackeyOct 26, 2021 at 13:44
To complement emackey's answer, you may have a local OpenStreetMap to serve your base map (https://github.com/Overv/openstreetmap-tile-server) .
var viewer = new Cesium.Viewer("cesiumContainer", {
imageryProvider: new Cesium.UrlTemplateImageryProvider({
url: '<YOUR_OSM_SERVER>/tile/{z}/{x}/{y}.png',
maximumLevel: 25,
hasAlphaChannel: false,
enablePickFeatures: false
}),
baseLayerPicker: false,
geocoder: false,
});
The result is very cool.
-
Thanks I was able to overlay my raster tiles as flat WMS imagery on cesium. Now I want to use my own terrain data(DEM files) to get the 3D effect, suggestions please .– rssOct 26, 2021 at 7:47
-
Yeap! It is a bit simple at first but I need to you to create a new question so I can explain. And you will need a LOT of disk space. Half of South America eats 700GB of my disk.– Magno COct 26, 2021 at 12:54
You can try here and even produce your custom terrain.
You can preview and download server software for free aswell
https://portal.terrainserver.com
Note: I am the provider for that service
-
1@GforGIS please do not edit out disclosure of affiliation. It is a requirement for posts that recommend services the author is affiliated with: "However, if you mention your product, website, etc. in your question or answer (or any other contribution to the site), you must disclose your affiliation in your post."– Ryan MSep 12 at 7:17
-
@RyanM. I do agree with you. I understand that self promoting products was not encouraged as well. I will keep that in mind in the future.– GforGISSep 12 at 7:22
You can check out https://techmaven.net/portabletileserver/windows-tile-server/ Windows Tile Server to serve data to Cesium/OpenLayers other maps It delivers both WMTS and XYZ and also serves COG GeoTIFF and Static GIS Files (GeoJSON, KML, GPX, csv, WKT,CZML, etc)
it' includes an advanced 2D Map Viewer accessible to any device on the network /map
-
1Avoid overt self-promotion. The community tends to vote down overt self-promotion and flag it as spam. Post good, relevant answers, and if some (but not all) happen to be about your product or website, that’s okay. However, you must disclose your affiliation in your answers.. In practice this means any answer that recommends your own product must include something like "Disclosure: I am the [position] of [company] that develops/distributes this software".– PolyGeo ♦May 14, 2022 at 4:24