How can I add markers in offline mode using MBXMapKit? - ios

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/.

Related

How to handle data for large number of pins on mapview?

I am developing an App that shows a map with annotations. The annotations are in thousands and growing. There are data associated with the annotation pins. I get the data from web service. Should I download all the data for all the pins upfront? That obviously is bad. But how should I do it in an efficient way that when the user zooms in and out the map, there is no lag.
Thanks in advance!
Show pins according particular region zoom, instead of showing all pins at one time.

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)?

How do you allow the map to zoom more than the map actually has

We have an iPhone app that uses mapbox to display offline maps created using tilemill. In previous versions of Mapbox the user could zoom in as much as they wanted even though the map had only be created to a level 15 zoom. This was important to us as we overlay a GPX track and waypoints over the map and it is important we can zoom in to view that information. The map of course distorted but wasn't a major issue.
We have created various maps with tilemill however we are finding that to be able to zoom in to the level we require needs a map of 100s of megabytes which is not feasible for an iPhone app. In previous editions of Mapbox the user was able to zoom in further than the zoom set when creating the app.
Is there any way to zoom into the maps further? or are there any other alternatives to view offline maps on a mobile device?
Thanks.
Additional comment: Another option would be to hide all data at zoom levels above 17 so that the map would go blank above zoom 17. i.e. user can zoom in but once they past a certain point the map goes blank. Therefore not requiring the thousands of tile images above zoom level 17. How could we do that in Tilemill?

Adding Multiple Markers To Google Map on iPhone app

I am writing an iPhone application that uses google maps SDK to display a city. I need to add multiple markers on the map to identify certain locations.
I could loop through and add each marker upon the map load, but I don't believe this is a efficient technique(it seems very unnecessarily and resource heavy!!)?
Or is there some "Lazy loading" technique I could use to pull in the markers that are currently in view?
For that you can add it in map region wise, you have to add marker only for current displaying map region, but for this also you need to run loop.
So you can avoid other markers that would added to map.

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

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/

Resources