How to use a custom image in MapBox instead of any map? - ios

I'm looking for making a iPhone map application for indoor navigation in our office using mapbox.
I'm not talking about custom icon image on marker or cacheing map for offline use.
Is this possible to create a simple iPhone app with MapBox which uses my own building map as image source?

Yes, this is possible. You want to use TileMill to create a map from the image, either hosting it online or exporting it to an MBTiles file (essentially a SQLite file full of tiles) that you can read directly in the app using RMMBTilesSource.
Here is a guide on making the map: http://mapbox.github.io/tilemill/docs/guides/reprojecting-geotiff/

Related

Use PNG as custom map iOS

I need to use a PNG as custom map of an indoor place. I don't need navigation but some places should be clickable like what we have in built in map. In android this is possible with MapView but I didn't find anything for iOS to do that. Can someone help me out how to start and do this?
A while back Apple added the ability to provide custom map overlay tiles. It isn't as simple as providing a PNG. You will need to create a database of map tiles at different scales, following a specific naming convention, and then provide a tiled map overlay.
I suggest looking at this blog post:
Custom and Offline Maps Using Overlay Tiles from VIGGIOSOFT
It goes into quite a bit of detail on what's required.

How to add big image as overlay in latest MapBox version(v3.2.2)?

I read here that it's possible to add big custom image as part of MapBox.
But now i'm trying to find out how it can be implemented in latest SDK version, and it's seems like there is no such option.
Is it possible to achieve this?
It is possible. You will need to modify your own Mapbox GL Style.
One way to do it is from Klokantech
This project from github.com/klokantech can show you how to structure your Mapbox GL Style.
Mapbox also has some great resources
Option 1 — upload your raster to Mapbox Studio
Option 2 - Please check out the example from Mapbox. Custom raster style. Use legacy raster tiles on a map.
This screen cap gives an example of how I've done it in the past for iOS. This example serves up local PNG's in an iOS app.
If you’re looking to place a geo-rectified image onto a map, that isn’t possible yet with the Mapbox iOS SDK.
Using annotations for this purpose (view-based or GL-based) isn’t quite supported yet, either. Once view-based annotations completely support flatness and ignore map rotation, that may be an adequate workaround. Look for those features in v3.3.0+.

Save offline map with MapKit?

In iOS app is there a chance to save map tile for offline use (not third part map or bitmap but the one used from Apple)?

Convert Image To Map Tiles In-App

I want to be able to convert a given image uploaded in the app and convert it to map tiles to be overplayed in a MapView. This could be a photo downloaded from the web or simply a photo taken from the device's camera.
I have so far come across GDAL2Tiles and MapTiler but I want to be able to do this in the app instead of preparing them beforehand. These are command line and desktop applications that will do the conversion, but this is all that I can find so far.
Is there a built-in feature for iOS that allows me to do this? If not, is there a third-party library that does, or is it just not possible?

How can I add markers in offline mode using MBXMapKit?

I am working on iOS Application which requires offline map feature.
When I am trying to fetch markers in offline mode it displaying no image for any marker
even it is not calling method
[self asyncLoadMarkerIconURL:(NSURL *)markerURL point:point];
As it is only call if data successfully retrieve from URL
and so it is not update marker array for display markers.
So is there any solution to display markers as I created on my map box project in offline map (without internet)?
Two possible solutions. Mapbox marker imagery is requested from online, which is why you are seeing this behavior.
First have an internet connection so that the marker imagery is cached for later offline use.
The other approach is to manually fetch the marker imagery ahead of time to bundle with your app. Here is the section where marker URLs are formed based on desired size, color, and imagery:
https://github.com/mapbox/mbxmapkit/blob/d87e1465d196a9948381919da0c1eb8d72a242bf/MBXMapKit/MBXRasterTileOverlay.m#L124
See also standalone markers at https://www.mapbox.com/developers/api/static/.

Resources