How can I customize the default navigation details provided by Mapbox? - ios

I have followed the sample example to implement navigation feature in my app. In the app, the user is navigated to two locations: pickup and delivery. Following is the screenshot of the map.
The Mapbox SDK provides details of the navigation like distance, time remaining etc (as indicated by red rectangle in the screenshot above). The SDK is considering the overall route and generating these information, by default.
Is there a way to customise these details? Initially, I would like to show the distance and time remaining to the first location. And with the arrival of the user to the first location, I would like to update the information with that of the next route. Is this doable?

Related

Detect tap on a label in Mapbox map on iOS

I'd like to know if there is a way to best detect a users tap on a label?
The new iOS15 Maps app allows a tap on e.g. a cities name and then shows informations about that city.
I am now wondering if something similar can be done with mapbox?
I know that there is a mapView.visibleFeatures(in: myRect) function that can somehow help here. So I can convert my finger location to a rect and then get all features there.
BUT... my city e.g. might have a label that is let's say 200 px wide. So I would need to have a quite large rect to find the point of my city label. And then I will also get all kinds of other labels that might be there. Maybe even not visible, but in the dataset.
Is there no way to ask the map what the frontmost element was when I tapped? So that when I tap on the far end of the label, I still get that ONE feature?
I am still using Mapbox V6.3... the latest before their last major update.
But if it's not possible with that version, an answer about the latest V10.something would also be great.
For v10, this example demonstrates how to identify features near a click. While the overall example is to a different end, the onMapClick functions shows the method to find a feature and then build an annotation.
https://docs.mapbox.com/ios/maps/examples/view-annotation-marker/

Prevent Roomle Camera from resetting

As can be seen in the example provided in the tutorial the Roomle configurator demonstrates different behaviors when zoomed in and a parameter is changed:
If the user clicks on the component and then scrolls to zoom in, the parameters of the component can be changed and the camera will stay in place.
If the user does not select the component first and just zooms in, the camera will reset to its original position if a parameter is changed.
I want to programmatically control camera movement and parameter selection without direct user interaction with the Roomle configurator (custom GUI) and this 2nd behavior is very annoying as the camera always jumps around.
I've tried using RoomleConfigurator._sceneHelper._cameraControl.lock() which successfully prevents manual camera movement but it will still reset on a parameter change.
How can I achieve the 1st behavior, where the camera is locked in place?
It is currently not possible to deactivate this behaviour (camera reset on parameter change).
Also a word of warning regarding the code RoomleConfigurator._sceneHelper._cameraControl.lock(). Functions which start with an underscore (_) are private and may be subject to change in a future release.
Here you can find the documentation on how to move the camera using the official API:
https://docs.roomle.com/web/guides/tutorial/configurator/07_recipes.html#move-camera

Swift 3 - Sharing pinned locations in Map Kit

I am currently working through the Ray Wenderlich book called iOS Apprentice, specifically the tutorial called MyLocations. In this tutorial, the user of the app is able to get the coordinates and address of their current location, categorize the location (i.e. a landmark), add a description, and then pin the location to a map.
I am curious if it is possible to create a back-end, perhaps through Firebase, where the pinned locations are able to be shared with other users of the app. In other words, if I opened the map to see my previously pinned locations, I would also be able to see other users' pinned locations and the description that they added when they categorized the location.
Is this possible? If so, any suggestions would be appreciated.

IOS | Display several self-chosen locations on a map

I'm working on my first IOS app and I need to display a map where the user can see their current location and several locations specified by me in the form of pins or so.
Would also be cool if they could immediately plan a route to these locations.
Can anyone point me in the right direction?
You display a map on iOS with MKMapKit, an official library that allows you to add Apple Maps to your app. You can also set pins (MKPointAnnotation) and do routing (MKDirections API) with that.
There is a Ray Wenderlich tutorial covering the basics of MapKit here:
http://www.raywenderlich.com/21365/introduction-to-mapkit-in-ios-6-tutorial

iOS - Auto and manual Map routing with user motion and area calculation

I am working on an iOS app whose functionality is to show google map with user current location. I successfully shown user location on map, now I need to draw a route as user moves from current location to another and then to next. Finally at the end on a button click I have to connect very fist location to last location. At the end I need to calculate the drown area in acres.
So I summarize my questions as follows :
How to draw user movement on map?
How to direct connect first and last location on a button click?
How to calculate user moved area?
If I want to draw route from last point to current point on manual click, how to do that?
Please provide any suitable code as well. I would appreciate your efforts.

Resources