Questions tagged [mapbox-ios]
Use when developing iOS apps with a Mapbox SDK. Prefer to use a more specific SDK tag instead.
mapbox-ios
252
questions
23
votes
9
answers
19k
views
Cocoapods - Error installing Mapbox-iOS-SDK
I want to install last version of Mapbox with Cocoapods.
I configure .netrc file :
machine api.mapbox.com
login mapbox
password <MY_SECRET_TOKEN>
But when I launch pod install, I have this ...
14
votes
1
answer
541
views
How to draw polyline over map in apple watchOS
We have tried with apple map but apple map SDK does not allow us to draw polyline over the map so we have seen one application that is doing a similar thing using MapBox SDK. But unfortunately, Mapbox ...
10
votes
3
answers
6k
views
Mapbox iOS SDK installation using .netrc file
I'am facing following issue while installing pod.
[!] Error installing Mapbox-iOS-SDK
[!] /usr/bin/curl -f -L -o /var/folders/qn/l5lqh07s5sscfzbm1tklmzgr0000gn/T/d20200915-46243-1aqah9u/file.zip https:...
9
votes
2
answers
32k
views
How do you create a .netrc file?
I'm attempting to download the Mapbox Maps SDK for iOS but I'm having trouble understanding how to create a .netrc file. I'm supposed to store my secret token to download the SDK and I can't add the ...
8
votes
4
answers
4k
views
Mapbox-iOS-SDK 6.3.0 pod install error 403 Forbidden
download Mapbox example, run pod install, error: 403 Forbidden, why? please help, thank you!
pod 'Mapbox-iOS-SDK', '~> 6.3.0'
➜ ios-sdk-examples-298e050be7352eb28cee6f03e02945593140c1f3 pod
...
7
votes
2
answers
1k
views
Mapbox Navigation in iOS with in my mapView controller
I want to integrate Mapbox navigation in iOS, I can easily get the direction/route between two coordinate also to get the navigation path from mapbox we can use below code
let options = ...
6
votes
3
answers
2k
views
Xcode builds successfully a corrupted archive, not showing in organizer, as soon as cocoapods installs react-native-mapbox-gl from Podfile
The problem seems not new, as here, but the solutions proposed didn't work.
I tried also several other approaches to understand what's going on (see here).
To replicate, this is the process:
I have a ...
6
votes
1
answer
2k
views
Mapbox multicolored polyline
I'm moving my app over to Mapbox and one of the things that I'm stuck on is creating a multicolored polyline where the segment color is set dynamically by speed. The closest thing I've been able to ...
5
votes
1
answer
3k
views
Swift: If traitCollection.userInterfaceStyle == .unspecified, how do I determine if it's in light or dark mode?
In the settings of my app, the user can choose between 3 system themes: light, dark, or default (which matches the phone's theme).
I do this by finding the keyWindow and setting ...
5
votes
1
answer
2k
views
Mapbox iOS clustering works, but circle style layer and numbers layer aren't appearing/reflecting the marker density of the cluster
I am using Mapbox to create an iOS application. The application gets makes a request to my API that returns a number of events going on within the map's bounding box in JSON format.
I was previously ...
4
votes
2
answers
2k
views
Error: mapbox-maps-ios could not be resolved
I am trying to follow MapBox iOS SDK on my project through Swift package Manager dependency. Facing issue in setup.
Followed MapBox Guidelines :
https://docs.mapbox.com/ios/maps/guides/install/
Error: ...
4
votes
1
answer
995
views
Set FillColor of MGLFillStyleLayer by color feature attribute
we are developing an iOS-App and have a problem with setting the fill color of the MGLFillStyleLayer (MapBox iOS SDK).
We have a large .geojson-file which is parsed and added to the standard MapBox ...
4
votes
1
answer
578
views
MGLMapViewDelegate Not working in the V10.2.0 SwiftUI
I have implemented the MapBox v6.3.0. Currently i'm updating the MapBox to latest version with V10.2.0. In the latest version MapBox delegate update with events. i have added all events according to ...
4
votes
1
answer
1k
views
Animate polyline on Mapview Mapbox iOS
I am replacing GoogleMaps SDK with Mapbox SDK for my iOS app.
I am stuck at a point where my app has a feature where I animate polyline(already added) on map like Uber app.
But I cant seem to make it ...
4
votes
1
answer
434
views
Does Mapbox Geocoding API iOS reverse geocode on large bodies of water (Oceans)?
I am using Mapbox's Geocoding API on iOS (Swift) to reverse geocode coordinates. I have been able to make it work for any land coords, but when on the ocean my code does not run (or print the ...
4
votes
0
answers
223
views
Mapbox iOS - vector tiles projection
mapbox ios sdk version 6.2.1
Hi, I am trying to display fires vector tiles layer on mapbox but I can't make it show on correct position.
I add fire layer like this:
let source = MGLVectorTileSource(...
3
votes
1
answer
824
views
How to dynamically update MGLPointFeature attribute value of MGLShapeSource for Mapbox on iOS?
My application stores data, which includes coordinates and other info, in a local database. Due to the number of data points, the application uses clustering to display the data with Mapbox on iOS. ...
3
votes
2
answers
1k
views
Validate geojson before creating a Mapbox MGLShape
I'm using the iOS Mapbox SDK to create a MGLShapeCollectionFeature from a goejson FeatureCollection data that comes from a 3rd party API.
guard let feature = try? MGLShape(data: jsonData, encoding: ...
3
votes
2
answers
696
views
iOS MapBox fit camera to multiple coordinates [latitude and longitude] or annotations
in MapBox documentation for android there is LatLngBounds, but for iOS there are nothing, is there any way todo it for iOS
3
votes
2
answers
1k
views
Trying to install Mapbox pods for xCode breaks existing pods
I am playing with a navigation app in swift to learn mapbox. I ran into an issue while adding a Textbox which is supposed to use the MapboxSearchUI pod, because I can't install it. My Terminal gives ...
3
votes
2
answers
762
views
Filter a Layer By a Value Contained in a Stringified JSON Array Property
One of the tables in one of our Mapbox tilesets has a stringified JSON array property of ids:
"string_ids":"[\"a\",\"b\"]"
I would like to filter features using this property, but can't seem to find ...
3
votes
1
answer
477
views
Mapbox FillLayer not rendering
In MapBox, I am trying to highlight an area of GeoJSON in the map, for example this 'Manhattan, NYC' GeoJSON I found as an example. Below is my ViewDidLoad() function, but the FillLayer doesn't seem ...
3
votes
0
answers
132
views
Dragging AnnotationView and update MGLShapeSource
We create a polygon (MGLPolygon) and we are trying to change (simultaneously) the position of the polygon base on the draggable gesture in an annotation view.
When doing this the polygon and the ...
3
votes
0
answers
85
views
Xcode 12 throwing new C++ errors when compiling mapbox-gl-native
I have always been able to compile a custom copy of mapbox-gl-native, but with the installation of Xcode 12 this has broken. I am getting the following errors:
No matching function for call to 'get'
...
3
votes
0
answers
206
views
Will MapBox supports for Indoor Navigation implementation in Xamarin.Forms (Android/IOS/UWP)?
I just started checking for MapBox. I could not find any information about Indoor Navigation Implementation with the following requirements:
IPS (Indoor Positioning System by displaying "Blue ...
3
votes
2
answers
275
views
MGLUserLocationAnnotationView subclass does not take the pitch perspective of the camera
I have styled the user location icon according to these docs:
https://docs.mapbox.com/ios/maps/examples/user-location-annotation/
It works, but although I worked with camera and pitch, it is displayed ...
3
votes
0
answers
189
views
How to fix custom route steps not being updated in Mapbox iOS
I'm working on a route navigation app that draws a route on the map. Now I've found out that whenever I'm using a Mapbox simulator the route steps aren't being updated. For example: Just after ...
3
votes
1
answer
756
views
New Mapbox iOS SDK generating problem, When I install any pod they show problem
I'm using Mapbox SDK, and when installing new pods, It is pod will be showing errors. I change pods and it showing error again and again. I was using these pods, pod 'Mapbox-iOS-SDK', '~> 5.1' pod '...
2
votes
1
answer
651
views
Change userLocation puck color using MapBox v10
I’m working on migrating my MapBox version from v6.4 to v10.
I have been able to migrate almost everything, only issue I have at the moment is changing the userLocation puck tintColor.
What I was ...
2
votes
1
answer
1k
views
iOS MapboxMaps v10 and MapboxSearch SKD incompatibility issues
We have an iOS app that uses mapbox maps and mapbox search, and we are trying to port to v10 of mapbox maps.
Our original cocoa podfile looked like this (all working fine):
pod 'Mapbox-iOS-SDK'
...
2
votes
1
answer
362
views
How do I combine Mapbox mgl_interpolate and MGL_Match in an NSExpression?
I'm having difficulty figuring out how to apply a match to contour index values in conjunction with different zoom levels using Swift in iOS to style different line widths, depending on the index ...
2
votes
1
answer
1k
views
iOS Mapbox SDK - How to add MGLPointAnnotation markers into a map layer
I need to find a way to convert markers from MGLPointAnnotation to MGLShapeSource or similar, in order to add the markers to a map layer and have full control over how to display and cluster them on ...
2
votes
1
answer
138
views
StepMilestone | Milestone Listener | Mapbox iOS equivalent
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 ...
2
votes
1
answer
840
views
Mapbox WMS support for iOS
Is mapbox supporting WMS services? I found nothing in iOS documentation but in Android section I found this: https://docs.mapbox.com/android/maps/examples/add-a-wms-source/ .
I've thired apply this ...
2
votes
1
answer
151
views
Mapbox on iOS - drawing icons dynamically according to attributes in source layer
Does anyone has a sample of implementation of dynamically drawing icons according to location and feature attributes in the source?
I can not make it work.
NSExpression is not giving the correct ...
2
votes
1
answer
156
views
Mapbox MGLAnnotations not rendering on MapView for Mapbox iOS
I have been testing out using MapBox for my SwiftUI application but I've run into issues where my annotations are not appearing on my MapView even though they appear to have been added. My code for my ...
2
votes
3
answers
191
views
Color clustered features based on clustered point counts
I'm developing an app using Xamarin.iOS and Mapbox iOS SDK (Naxam.Mapbox.iOS NuGet package here.
And i'm following this example in MapBox iOS SDK website: https://docs.mapbox.com/ios/maps/examples/...
2
votes
1
answer
476
views
How to show polylines added in the source in mapbox ios?
I'm trying to show the polylines taken from a GeoJson then added to the same source but with poor results.
NSString *jsonString = @"{\"type\": \"FeatureCollection\",\"features\": [{\"type\": \"...
2
votes
0
answers
185
views
How to cluster point annotations in map box v10
I am having a hard time finding examples for mapbox sdk iOS v10 annotation clustering. Everything seems to be outdated. Using print statement it seems that the annotations are now clustering, but ...
2
votes
0
answers
241
views
Mapbox - Failed to resolve tileset descriptors: Loading request canceled
I have the following code for download map regions. This function is called on multiple regions asynchronously. In debug/development mode I rarely get this error. But in production release app I get ...
2
votes
0
answers
239
views
Mapbox Tile Source issue while internet is off
I'm working on an offline map. I updated Mapbox SDK 6.2 to 10.7 Style pack and tile region are downloading successfully.
Step 1 - Download the style and a tile source on the home screen
Step 2 - Turn ...
2
votes
0
answers
125
views
How do I get my implementation of a NavigationServiceDelegate function to be called?
I'm building an iOS app with SwiftUI and am using Mapbox's NavigationViewController to provide turn-by-turn navigation instructions. I'd like to have custom code run when the visual instructions are ...
2
votes
0
answers
317
views
Mapbox Warning, maps-ios/ResourceOptions: Empty access token
I am using the MapBox sdk version 10.9.1 and I specifically do not want to declare my access token in info.plist I want to declare it programmatically. I have my token defined in AppDelegate.swift as:
...
2
votes
0
answers
487
views
SyntaxError with file in node_module Unexpected token, expected "," (4:7) when integrate rnmapbox/maps
I have integration rnmapbox/maps#main via repo github in iOS and have some error from node_module.
I have create issues in github too via that link but if anyone face that issues before. Please feel ...
2
votes
0
answers
378
views
Mapbox iOS - loading 3D object within 3D building layer
Re-examining Mapbox's native SDK, it's clear that loading 3D models isn't as easy as Mapbox GL JS.
I was able to show 3D buildings by adding layers from this example, as well as a 3D model using ...
2
votes
1
answer
441
views
Mapbox migrating to v10.1 offlineManager.loadStylePack does not complete or return any progress
Following migration example provided but loadStylePack never completes or returns the progress. At the same time, TileStore.default.loadTileRegion from the same example works and returns progress just ...
2
votes
0
answers
1k
views
Pods are missing in Targets Xcode iOS
I'm working with MapBox Search API. To avail MapBox libraries -
Create a new Project in Xcode
Close that project and open that project folder in terminal
Run pod init
Add these to my Podfile -
...
2
votes
0
answers
146
views
MapBox Snap Map Cities boundaries update for SnapChat
I would like to know how we can contact Mapbox team to correct cities boundaries that are not correctly defined. We tried in Snap Map settings MapBox option but that redirects to their main website. ...
2
votes
0
answers
149
views
Is there a PixiOverlay alternative for mapbox?
I'm developing 3 map-based apps - the first one is a web app (using React.js) and the others are Android and iOS apps (using mapbox).
I'm using Leaflet library with mapbox tiles for the web app, and ...
2
votes
0
answers
60
views
Is there a way to have a single icon along a way?
I'm using a MGLSymbolStyleLayer to render icons on a way on my mapbox instance on iOS.
My problem right now is the frequency that icon is drawn: I tried all the values of MGLSymbolPlacement as value ...