3

I have an .mbtiles file and I am using it for offline map (iOS MapBox SDK). But my .mbtiles doesn't have enough data (just simple green rectangle). I want to draw some lines(roads) between points (I download it from my rest API). I found the solution to use RMShape, but I want to use already drawn map. I create my .mbtiles from osm and TileMill. Help me out please.

Artem Z.
  • 1,243
  • 2
  • 14
  • 36

1 Answers1

0

WhirlyGlobe-Maply SDK can help you achieve this.

  1. It has a mapview and a globe view which you implement on your viewcontroller.

  2. Then you create a layer using your mbtile file as shown below:

    let tileSource = MaplyMBTileSource(mbTiles: "your-mbtile-filename")

  3. You add this layer on the globe or map to display the tiles.

  4. And using SDK's function like addShapes(), you can add, circles, vectors, labels, text and icons on the map/globe.

I tried adding lat and long lines programatically. Also tried adding some labels and spheres. This is how it looks ->

WhirlyGlobe-Maply using mbtile and drawing on top of it

Jason Roman
  • 8,146
  • 10
  • 35
  • 40