StepMilestone | Milestone Listener | Mapbox iOS equivalent - ios

In Mapbox Android SDK, we can able to set/customize the StepMilestone ie we can able to get callbacks before reaching Maneuver of the current step.
Is there any equivalent options available in iOS Mapbox sdk for listening the StepMilestone progress?

Currently on iOS there isn't a direct equivalent, so this is not nearly as straightforward as it is on Android. (disclaimer: I currently work for Mapbox)
The best way to do this on iOS would be to use turf-swift's LineString.distance(from:to:)​ (which is bundled in the Navigation SDK) to find the closest coordinate on the route based on a given POI.
Then you can respond to NotificationName.routeControllerProgressDidChange by comparing that distance to RouteProgress.distanceTraveled. If the user has crossed you specified threshold, create a SpokenInstruction and tell the NavigationViewController’s voiceController to speak(_:) it. You can see a somewhat similar example of this last piece in this example: https://docs.mapbox.com/ios/navigation/examples/custom-voice-controller/
I hope that helps.

Related

Custom map navigation (turn by turn) in ios

I want to implement navigation map for drivers in my iOS app and know two different ways to do this:
Use URL scheme to open Apple Maps app.
Implement this feature inside my app.
The first case is not an option for me, so I decide to select a second. As I can see from Apple documentation, there are no such standard API. For now I can receive array of routes between source and destination points via MKDirectionsResponse object; also I can draw some route on my map. So the next step is to provide turn-by-turn navigation from source point to destination point according to the route and some following requirements:
Displaying next turns.
The navigation should be voice-guided.
The navigation should be on a 3d map.
The map should rotate in the direction of driving as you drive.
Should display ETA to final destination (the end point).
I thinks that all this features (may be, except item 2) can be reached by the way of using location and map services provided by CoreLocation and MapKit frameworks. But I'm ready to use third-party free / paid services. All that I found:
atlasct
navigenie
cloudmade
I can't find some references to source codes / SDK's (even limited demo if they are paid) for items 1 and 3. Item 2 also doesn't offer some demo SDK so I can't learn and evaluate Navigenie services quality.
So my question: does you know some third-party libs / frameworks / SDK's that can help me to resolve my problem? Does you know any solution to voice-guided navigation? Know you smth about wroted above instruments or may be you think that I must implement all features from the beggining?
Thanks!

How to restrict recognition of particular target in each particular iOS device?

We are working in cloud recognition. In this, we have to restrict recognition of the particular image target not more than 2 recognitions in each device.
We know, we have to use VWS API for that. But our question is how we can restrict recognition of image target only in particular device, but it has to recognize in other devices which is not exceeding 2 recognitions.
How we can achieve this?
I thought this was impossible, but then after updating to Vuforia 4, I noticed in their prefab scripts they have this function RequireComponent now this has a lot of interesting applications to deal with.
Vuforia basically uses it to make sure the device has a camera, so you can notice that in their prefab scripts you can see RequireComponent(typeof(Camera))
With respect to your problem you could do something like RequireComponent(iPhone) because while playing with it, I noticed that was an option they gave me for the brackets.
Check it out and let us all know. I haven't been able to try it out, so can't confirm the same.

iOS 7 find nearest shops around the actual position

I need to find a way to get an list of shops/bars etc. around the actual position of the device.
I know how to get the position. I also know about the Google API Places. But is there an way to solve this without using third party libraries?
You can use the MKLocalSearch API's in MapKit, but you can only do a search for one type of building at a time.
More details can be found in the MapKit Programming Guide - Enabling Search
Otherwise you would have to gather and store the data yourself and query your own system.

Providing Walking Directions in iOS 6 Using MapKit

I realise that iOS 6 is still under NDA so i'll keep my question succinct and to the point.
Is there a way to provide walking directions within my own application without using Maps.app? I know I can send requests to Maps.app to display directions but i'd like to be able to provide directions from my own application if at all possible?
There are a handful of new classes in iOS 6 that look like they might do what I want but i'm unable to test them currently. I'll have a looksee and try to implement something but I want to be sure it's even possible before wasting time.
Any information would be greatly appreciated.
Since iOS 6 is well and truly out of NDA now, I can safely say that providing walking directions in your own application is definitely not possible.
You can however open Maps.app with a properly formatted request to provide directions if required.

Change map colors in iOS MapView?

Is it possible to change map element colors in a MapView in the same way that you can with a Google Map? If so, how would I go about doing this.
I'm looking to change map element colors pretty substantially, so I don't think that adding an Annotation as described here is the right solution.
As an example, http://geo.rkn.la has a map that is skinned to be grayscale, and Google has documentation of how to do this for web maps here.
I gave CloudMade a try, and it wound up working reasonably well, but I decided against using them for two reasons:
1) Their support sucks. I shot an email to their support address about a week or two ago and have still not received any kind of response. Their most recent SVN commit is also close to a year old.
2) This issue raised on the Route Me repo, combined with their shoddy support, scared me away.
I did manage to find an SDK called MapBox that is also built on Route Me that was suitable for the task. Their git repo is in active development and they are available on freenode during normal business hours. I'd recommend them over CloudMade to anyone who has the same question I had initially.
It's not possible using UIMapKit.
I have used CloudMade before, which enable you to customise map colours quite extensively. As far as I know their maps use OpenStreetMap data.
No, it is not possible with the current MapKit.
Any substantial update like the one you describe would have to be performed when requesting tiles from Google, and at the moment only Apple does this, deep in the framework.

Resources