Offline Tile Server recommendation

2,442 views
Skip to first unread message

jon.o...@gmail.com

unread,
Aug 12, 2013, 8:42:37 AM8/12/13
to cesiu...@googlegroups.com
Anyone have a tile server recommendation that can supply the blue marble data to a Cesium map that has no connectivity to the internet?

Thanks in advance!
-J

Kevin Ring

unread,
Aug 12, 2013, 9:41:14 AM8/12/13
to cesiu...@googlegroups.com
Hi,

One easy way to do it is to grab the Blue Marble source data, tile it up with MapTiler (http://www.maptiler.org/) and then access the pile of static files MapTiler created using Cesium's TileMapServiceImageryProvider.  At that point you can use any standard web server to serve the imagery.

Kevin


--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



David Taylor

unread,
Aug 22, 2014, 4:47:17 PM8/22/14
to cesiu...@googlegroups.com
Is it possible to do something like that with the planet.pbf data from http://wiki.openstreetmap.org/wiki/Planet.osm ?

David Taylor

unread,
Aug 22, 2014, 6:18:38 PM8/22/14
to cesiu...@googlegroups.com
I've managed to use Maperitive to generate Tiles from .pbf but when I try to load that as the new source it says
tilemapresource.xml 404 (Not Found)
how can I generate an xml for my tiles? or what is the structure so I can create it myself?

David Taylor

unread,
Aug 22, 2014, 6:27:41 PM8/22/14
to cesiu...@googlegroups.com
Maperative generates a JSON file instead of an xml and this is its structure
{
    "tilejson":"1.0.0", 
    "name":"My Map", 
    "description":"Made with Maperitive", 
    "attribution":"Map data © OpenStreetMap contributors", 
    "tiles":
    [
        "tiles/{z}/{x}/{y}.png"
    ], 
    "minzoom":11, 
    "maxzoom":15, 
    "bounds":
    [
        4.5689989657938037, 
        51.201442305146031, 
        4.9943794818540823, 
        51.307795143935138
    ], 
    "center":
    [
        4.7816892238239426, 
        51.254618724540585, 
        11
    ]
}

Kevin Ring

unread,
Aug 25, 2014, 7:50:59 PM8/25/14
to cesiu...@googlegroups.com
Hi David,

It would be very straightforward to write a Cesium ImageryProvider to work with this tileset, but I don't think any of the out-of-the-box ones will work.  Take a look at TileMapServiceImageryProvider.js and see if you can adapt it.  The hardest part will probably be figuring out what to call the new ImageryProvider type. :)  Let me know if you have any questions, and we'd welcome a pull request if you're able to implement it cleanly.

Thanks,
Kevin


David

unread,
Aug 26, 2014, 1:38:51 PM8/26/14
to cesiu...@googlegroups.com
Ok I'll look into that, for now I've found that Maperative can create Mbtiles for OSM and Qgis can create a GeoJson from mbtiles if anyone is interested.


--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/Kq8wORqA09E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.

David Taylor

unread,
Sep 5, 2014, 5:23:55 PM9/5/14
to cesiu...@googlegroups.com
Quick Update: Simple Solution to Offline Map
OSM data: http://wiki.openstreetmap.org/wiki/Planet.osm (Download a region or planet, be sure to get '.pbf' compressed format)
ex: 
1) Download osm data (if needed clip out a region)
osmconvert world.pbf -b=-75.80,45.19,-75.7,45.23 >region.pbf
2) in Maperative open region.osm as map datasource (close all other datasources) and in maperative command line run command (the higher the max zoom and the larger your osm region the longer it will take)
generate-mbtiles minzoom=5 maxzoom=16
rename it to what you like (ex: OpenStreetMap.mbtiles)
3) Download and extract  nfostreams mbtiles-php source, then copy the example/server folder from the source to your htdocs or webfolder
4) copy the generated mbtiles file from maperative/tiles and put it in the server folder
5) then set your new server as the provider (url will be url:http://localhost/serverfolder/filenamewithoutextension)
ex:
var viewer = new Cesium.Viewer('cesiumContainer', {
    imageryProvider : new Cesium.OpenStreetMapImageryProvider({
    }),
    baseLayerPicker : false
});




To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/Kq8wORqA09E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.

Patrick Cozzi

unread,
Sep 6, 2014, 8:48:04 AM9/6/14
to cesiu...@googlegroups.com
David - thanks for the walk-through.  Do you have blog?  This would be a great post as a mini-tutorial.

Patrick

David

unread,
Sep 6, 2014, 9:52:48 AM9/6/14
to cesiu...@googlegroups.com
I don't, I have a makeshift mediawiki that isn't guaranteed to always be online.



To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David

unread,
Sep 6, 2014, 9:57:33 AM9/6/14
to cesiu...@googlegroups.com
You are more than welcome to host a tutorial with the provided information.

Patrick Cozzi

unread,
Sep 6, 2014, 10:30:18 AM9/6/14
to cesiu...@googlegroups.com
Thanks David.  I'll make a note of it.

Patrick
To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.

David Taylor

unread,
Sep 15, 2014, 2:00:38 PM9/15/14
to cesiu...@googlegroups.com
I was also able to get it to work without the php requirement, using only node js by replacing the mbtiles-php with https://github.com/mapbox/tilestream
that requires a rectangle when adding the provider, otherwise the map won't show up.

new Cesium.ImageryLayer(new Cesium.OpenStreetMapImageryProvider({
        rectangle: new Cesium.Rectangle.fromDegrees(-112.69, 39.89, -110.85, 41.22),
        minimumLevel: 0,
        maximumLevel: 15
    })

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/Kq8wORqA09E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/Kq8wORqA09E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Reply all
Reply to author
Forward
0 new messages