Questions tagged [mglmapview]

27 questions
0
votes
0 answers

How do I hide the logoView in the NavigationMapView for a NavigationViewController?

I can successfully hide the Mapbox logoView in an MGLMapView, but when I try to do the same for the NavigationMapView of a NavigationViewController, it doesn't work. Here's what I'm trying: @IBAction func startNavigation(_ sender: Any) { guard…
Dylan
  • 2,315
  • 2
  • 20
  • 33
0
votes
1 answer

How to disable user interaction for MGLAnnotation?

I am using mapbox and have a post made up of 2 annotations. One can and another cannot (should not) be selectable. How can I make a specific MGLAnnotation unselectable? I have looked here and here and did not find a solution.
user11182243
0
votes
0 answers

How do I extract an Int value from NSExpression?

I have a map view(mapbox) with some cluster points, the cluster is arranged and displayed based on a geojson, the logic of the cluster as if it has neighbours they will cluster when the map is zoomed out. This works great, however, I need to…
nerway
  • 1
  • 5
0
votes
1 answer

MGLPolyLine color change does not work - Swift 4, Mapbox

When I try to change the color of my MGLPolyline the app crashes and prints this fatal error (it also takes me : Assertion failed: (r_ <= 1.0f), function Color, file /Users/distiller/project/include/mbgl/util/color.hpp, line 18. I am using…
user10813210
0
votes
1 answer

Is it possible to make MGLPolyLines selectable? - Swift, MapBox

Is it possible to make an MGLPolyLine touchable/selectable/have user interaction? In my project, the user needs to touch the polyline. There was this question asked before but it is outdated by about 2 years. Have they (MapBox) updated this?
user10817680
0
votes
2 answers

How to change the color of a MGLPolyline?

How can I change the color of an MGLPolyline? I had looked here but the answer did not work. I also tried some other code but it was too dependant on apple maps. So how can I change the color of the line and preferably be able to edit other aspects…
user10813210
0
votes
1 answer

How can I set fill color depends on attribute value of polygon feature?

This is how I define polygon feature: let polygon = MGLPolygonFeature(coordinates: &coordinates, count: UInt(coordinates.count)) polygon.attributes = ["name": card.name, "identifier": card.identifier, "color": card.set.colorMode] //UIColor let…
Bartłomiej Semańczyk
  • 59,234
  • 49
  • 233
  • 358
0
votes
0 answers

MGLMapView - Mapbox annotations crash

I have crashes in Crashlytics tool and I don't know how to fix them. Screenshot of how it looks in Crashlytics: It seems that problem is in Mapbox source codes. Codes from my project: DispatchQueue.global(qos: .userInitiated).async { let…
Libor Zapletal
  • 13,752
  • 20
  • 95
  • 182
0
votes
0 answers

How to change the size of numbers of buildings on open street view map?

Next to right side there are gray numbers: 35, 37, 39, 41, 43. Is there a way to change its size somehow? This is what I have in code: let mapView = MGLMapView(frame: view.bounds) mapView.autoresizingMask = [.flexibleWidth,…
Bartłomiej Semańczyk
  • 59,234
  • 49
  • 233
  • 358
0
votes
1 answer

Swift - How to store MGLMapView in Core Data to display it on table view?

Hey guys I'm making a running app and I'm having trouble in saving my MGLMapView, that contains the ploylines drawn from the user running, in Core Data. I'm not getting any errors but decoding returns an empty MGLMapView with no ploylines as if it…
Daniel Espina
  • 614
  • 11
  • 24
-1
votes
2 answers

Centering a map annotation to the top quarter of the screen

so I'd like to go from image 1 to image 2 when an annotation is clicked (Mapbox): https://i.stack.imgur.com/OFIFa.png It's fairly easy to have the map center on the annotation, by calling mapView.setCenter() inside one of the Mapbox delegate…
nickcoding2
  • 142
  • 1
  • 8
  • 34
-1
votes
3 answers

When are swift functions called in programs where no function call is visible?

The example below is taken from Mapbox, and shows how to mark a location on a map with an annotation. I understand that viewDidLoad is called when the app starts and thats what runs everything inside the viewDidLoad function. I don't understand how…
Sam
  • 1,765
  • 11
  • 82
  • 176
1
2