1

I am not able to create vector mbtiles files for my city region (Nashik, Maharashtra, India), I am using nutiteq SDK for displaying Offline Maps. I have tried creating mbtiles using Mobile Atlas creator, but the output .mbtile file does not works in Nutiteq SDK.

Please assist on this. I only want to display a specific region .mbtiles in my App.

Thank You in Advance.

Trideep
  • 396
  • 1
  • 2
  • 15
  • 1
    Please read [How to ask](http://stackoverflow.com/help/how-to-ask). – segarci Jan 20 '15 at 15:32
  • MBTiles contain raster images, not vector images. Have you tried using a different tool for creating MBTiles, for example TileMill? Have you read [Offline map tiles](https://github.com/nutiteq/hellomap3d/wiki/Offline-map-tiles) in the nutiteq wiki? If so, what have you tried so far and what doesn't work exactly? – scai Jan 20 '15 at 15:42

2 Answers2

1

MBTiles is general format which can contain also vector data (tiles), not only raster . Both TileMill and Mobile Atlas Creator can create only rasters, first one from vector data, and second one by scraping it from on-line APIs. You can use raster MBTiles with Nutiteq SDK, iOS sample:

// file-based local offline datasource
NSString* fullpathVT = [[NSBundle mainBundle] pathForResource:@"MBTILESFILENAME" ofType:@"mbtiles"];
NTTileDataSource* tileDataSource = [[NTMBTilesTileDataSource alloc] initWithMinZoom:0 maxZoom:19 path: fullpathVT];

// Initialize a raster layer with the previous data source
NTRasterTileLayer* rasterLayer = [[NTRasterTileLayer alloc] initWithDataSource:tileDataSource];

// Add the raster layer to the map
[[self getLayers] add:rasterLayer];

Android:

MBTilesTileDataSource tileDataSource = new MBTilesTileDataSource(
            0, 19, filePath);
RasterTileLayer rasterLayer = new RasterTileLayer(tileDataSource);
mapView.getLayers().add(rasterLayer);

TileMill and Mobile Atlas Creator (MOBAC) does not support creating vector mbtiles. All the sources from where MOBAC gets data are raster ones, so it is not possible in principle. So there is no easy and free source to download the files as far as I know. I can suggest two options:

  1. Use Nutiteq Maps service (subscription-based) which is currently in private beta. This works technically this way, that you define in your app which map package or packages can be loaded to the device, and SDK downloads directly your selected map.
  2. With Nutiteq Maps SDK Enteprise license you can use custom map packages and sources, and custom download control.

You should contact Nutiteq to get access to beta, or enterprise license. Disclaimer: I'm founder of Nutiteq.

JaakL
  • 4,107
  • 5
  • 24
  • 37
0

You can create MBTiles from any .osm.pbf file using this tool - https://github.com/systemed/tilemaker

  1. Download .osm.pbf file from Geofabric. To download for a custom area, you can use Protomaps or BBBike Extract

  2. Download tilemaker

  3. Execute the following command

tilemaker --input netherlands.osm.pbf --output netherlands.mbtiles --process resources/process-openmaptiles.lua --config resources/config-openmaptiles.json 

You can read more about it in this blog post - https://blog.kleunen.nl/blog/tilemaker-generate-map

vepzfe
  • 4,217
  • 5
  • 26
  • 46