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)
OSM Convert: http://wiki.openstreetmap.org/wiki/Osmconvert
Maperative: http://maperitive.net/
Infostreams mbtiles-php: https://github.com/infostreams/mbtiles-php
apache: http://httpd.apache.org/
ex:
- Download osm data (if needed clip out a region)
osmconvert world.pbf -b=-75.80,45.19,-75.7,45.23 >region.pbf
``
- 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)
- Download and extract nfostreams mbtiles-php source, then copy the example/server folder from the source to your htdocs or webfolder
- copy the generated mbtiles file from maperative/tiles and put it in the server folder
- 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({
url : ‘http://localhost/server/OpenStreetMap’
}),
baseLayerPicker : false
});
``