Maps & Location

RSS for tag

Learn how to integrate MapKit and Core Location to unlock the power of location-based features in your app.

Maps & Location Documentation

Posts under Maps & Location subtopic

Post

Replies

Boosts

Views

Activity

Apple maps trail / local path only becomes visible on very close zoom
I'm using apple maps to build a feature so users can create and save running/cycling/hiking routes. Currently the map only shows trails and similar local paths after zooming in to what is basically an extreme level. I want the trails and local paths to be more visible on a further, broader level of zoom. APPLE MAPS JS EX: https://trkbucket.s3.amazonaws.com/media/shoe_images/Screenshot_2024-10-23_at_10.52.17AM.png https://trkbucket.s3.amazonaws.com/media/shoe_images/Screenshot_2024-10-23_at_10.52.04AM.png APPLE MAPS iOS EX: https://trkbucket.s3.amazonaws.com/media/shoe_images/IMG_9DDF5C9A320D-1.jpeg Also strange that on iOS the path is visible while more zoomed out whereas JS does not. Please advise how to show these map items at a broader zoom.
1
0
581
Oct ’24
MapKit UseAnnotation
using the UseAnnotation in the map content does not show the blue user location. I added the info.plist info. Error message: CLLocationManager(<CLLocationManager: 0x300e60d40>) for <MKCoreLocationProvider: 0x303e0e6d0> did fail with error: Error Domain=kCLErrorDomain Code=1 "(null)"
0
0
318
Jan ’25
Location Push Service Extension in Limbo
Hi everyone, I submitted a request for the Location Push Service Extension entitlement back in November. I received an acknowledgment email from Apple confirming they had received my request, but I never heard back. Assuming the November request might have been lost in the shuffle, I submitted another request in January. It's been a week since then, and I still haven’t received any response. To follow up, I contacted Apple Support with my case number. Unfortunately, it seems they didn’t review the case properly, as the support assistant just sent me generic links about what to do when an app is rejected—which doesn’t apply here. Has anyone else experienced similar delays with this entitlement? Could there be specific reasons for such delays? Any tips on how to escalate this or get it addressed effectively would be greatly appreciated. Thank you in advance for your help!
0
0
342
Jan ’25
Reverse geocoding rate limit of MKReverseGeocodingRequest compared to CLGeocoder
The documentation for CLGeocoder states Geocoding requests are rate-limited for each app, so making too many requests in a short period of time may cause some of the requests to fail. (When the maximum rate is exceeded, the geocoder returns an error object with the CLError.Code.network error to the associated completion handler.) And it provides helpful guidance on how and when to submit geocoding requests. The documentation for MKReverseGeocodingRequest does not mention requests are rate-limited. Does this mean it is not rate-limited? If it is rate-limited, is it similar to CLGeocoder, what is its behavior? It is important to understand behavior of the API in order to understand impact on my app’s use case and how users will be affected should I change the implementation. Thanks!
0
0
81
Aug ’25
How can I change the color and stroke width of a given route?
I have just a thin blue line as the route polyline and it is quite different not to think that this ist just a small river? Does anyone have an idea how to change the color and the strike width (line width) of the polyline (between Essen and Dortmund). The solution by Gemini and ChatGPT is not working... Thanks for your help, Markus <script src='https://cdn.apple-mapkit.com/mk/5.x.x/mapkit.core.js' crossorigin async data-callback='initMapKit' data-libraries='full-map,services,overlays,annotations' data-token='TOKEN></script> <script type='module'> const setupMapKitJs = async() => { if (!window.mapkit || window.mapkit.loadedLibraries.length === 0) {await new Promise(resolve => { window.initMapKit = resolve }); delete window.initMapKit;}}; const main = async() => { await setupMapKitJs(); var map = new mapkit.Map('map-container', { center: new mapkit.Coordinate(51.5, 6.9), showsZoomControl: true, colorScheme: 'light', showsMapTypeControl: true, }); map.cameraDistance = 30000; ![]("https://developer.apple.com/forums/content/attachment/8e8433c5-9f43-4ddc-80e5-43d15f215c3f" "title=Bildschirmfoto 2025-08-12 um 13.38.06.png;width=590;height=281") const directions = new mapkit.Directions(); directions.route({ origin: 'Essen', destination: 'Dortmund' }, (error, response) => { if (error) { console.error(error); return; } const route = response.routes[0]; const routePolyline = route.polyline; routePolyline.lineWidth = 20; map.addOverlay(routePolyline); }); }; main(); </script>
0
0
27
Aug ’25
mapkit js erro 401 Unauthorized
Hello Apple Developers, I encountered a 401 Unauthorized error when developing a web map. I asked the developer to check whether my key authorization is normal. This is the test website: https://pro.kyeasy.com/#/user/map Test account: +33 0625823391 Test password: jinghui111 Domain pro.kyeasy.com Token Type MapKit JS Restriction Type Domain Restricted Token eyJraWQiOiJKNzZSNkpSM0FLIiwidHlwIjoiSldUIiwiYWxnIjoiRVMyNTYifQ.eyJpc3MiOiIzSzQ4UEE2MjRNIiwiaWF0IjoxNzU0ODA3MTc2LCJvcmlnaW4iOiJwcm8ua3llYXN5LmNvbSJ9.ZQLVPpn2Zbm5uHhT_YaA6T2eyaYNKYL5X1Z3DIC17vo4FlOLAKJnXUdB_0zOLDufVDT-CNZWK08_5KkjI5pAKA Creation Date 08/10/25 Expiration Date None Status Active Created by Jinghui Yang info java develop team id: 3K48PA624M Key ID DNRWXXA4L2 Created by Jinghui Yang on 2025/08/10 06:08 am bunld id 3K48PA624M.maps.com.kyeasy p8 DNRWXXA4L2.p8
7
0
118
Aug ’25
iOS 18: startRangingBeacons Stops When Display is Off in Background (Worked on iOS 17.2.1)
Issue Summary After calling startRangingBeacons, the didRangeBeacons delegate method does not receive iBeacon scan data when the device display is turned off in the background. Expected Behavior On iOS 17.2.1 (iPhone 14), beacon ranging continues in the background even when the display is turned off. The same behavior is expected on iOS 18, but it is not working as intended. Observed Behavior On iOS 18, once the display turns off, beacon ranging stops, and the didRangeBeacons method is not triggered until the display is turned back on. • Location permission is set to “Always Allow.” • Background Modes are correctly configured (Location Updates enabled). Steps to Reproduce Ensure location permission is set to Always Allow. Enable Background Modes → Location Updates in Xcode settings. Call startRangingBeacons(in:) in the app. Put the app in the background and turn off the display. Observe that didRangeBeacons is not triggered while the display is off. Additional Notes • The issue does not occur on iOS 17.2.1 (iPhone 14), where beacon ranging continues even with the display off. • This behavior change is observed on iOS 18 across multiple devices. Could you confirm if this is an intended change in behavior or a bug? If this is expected behavior, what alternative approach is recommended to maintain continuous beacon ranging when the display is off in the background?
2
0
458
Feb ’25
Google maps with beta 18
Having multiple issues with google maps via wireless apply car play. 1.: maps freezing 2.:The direction I’m heading seems to be off and searching some times 3.: The most annoying, the audio doesn’t work when I’m using google maps for a trip.
1
0
326
Dec ’24
Unexpected Immediate Delivery of Multiple UNLocationTrigger Notifications
Hello, I'm encountering an issue with UNLocationNotificationTrigger in my iOS app. I've scheduled three local notifications using UNLocationNotificationTrigger, each tied to a distinct geographic region. These regions are significantly distant from one another and should not trigger simultaneously under normal movement conditions. However, during testing, the user received all three notifications within one second, despite being physically located near only one of the regions. This behavior is unexpected and defeats the purpose of using location-based triggers. Could you please clarify why this might be happening? Is there a known issue with UNLocationTrigger, or is there a possibility that iOS preemptively triggers all scheduled location notifications? Any guidance or recommended practices to avoid this behavior would be greatly appreciated. Thank you!
5
0
99
Jun ’25
"hotels" query brings me to an hotel in Ramallah
When trying the request "hotels" on MapKitJS with searchRegionPriority=default, it will return an hotel in Ramallah even if the searchRegion is very far from there. It can happen if your search region is very broad in most place (above Europe if you zoom out a lot, over Turkey and Middle East even if the bounding box is narrower), but on specific places it happens even with a small search region (like in Tripoli, Lebanon, whatever the zoom level). With searchRegionPriority=required, many hotels can be found in the same area. Reproduce with: https://maps-api.apple.com/v1/search?q=hotels&searchRegion=34.45512816097114,35.849070061159864,34.428418939926146,35.80795182731595&lang=en&searchRegionPriority=default
0
0
512
Nov ’24
Rotate mapkit.ImageAnnotation
Hello I'd like to be able to rotate an mapkit.ImageAnnotation. From this post on Stack Overflow https://stackoverflow.com/questions/78686475/need-to-style-a-mapkit-js-marker-annotation/78702266#78702266 I understand that it's possible, for example, to the following: map.annotations[0].element.style.cursor = "pointer"; and this works for me. However, I need to do something like the following, but it doesn't work: map.annotations[0].element.style.transform = "rotate(90deg) "; Any ideas how a mapkit.ImageAnnotation and mapkit.MarkerAnnotation can be rotated? Thanks in advance Sam
0
0
367
Jan ’25
Simulator Location Authorization Issue: Authorization Status Remains notDetermined After Denying and Changing in System Settings
Hello everyone, I'm encountering a strange location authorization issue in the iOS simulator, and I'm hoping someone can help me analyze it. Problem Description: When my app runs for the first time in the simulator, it requests location permissions. I select "Deny" for the authorization. Then, I go to the simulator's "Settings" -&gt; "Privacy &amp; Security" -&gt; "Location Services" and enable location permissions for my app. However, when I return to the app, CLLocationManager.authorizationStatus still returns .notDetermined, and the authorization request pop-up does not appear again. This issue persists even after resetting the simulator settings multiple times. import CoreLocation @Observable final class LocationManager: NSObject, CLLocationManagerDelegate { var locationManager = CLLocationManager() var currentLocation: CLLocationCoordinate2D? override init() { super.init() locationManager.delegate = self } func locationManagerDidChangeAuthorization(_ manager: CLLocationManager) { let status = manager.authorizationStatus print("Authorize Status: \(status)") switch status { case .authorizedWhenInUse, .authorizedAlways: locationManager.startUpdatingLocation() case .denied, .restricted: stopLocation() case .notDetermined: locationManager.requestWhenInUseAuthorization() print("Location permission not determined.") @unknown default: break } } func requestLocation() { let status = locationManager.authorizationStatus if status == .authorizedWhenInUse || status == .authorizedAlways { locationManager.requestLocation() } else { locationManager.requestWhenInUseAuthorization() } } func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { guard let newLocation = locations.first else { return } currentLocation = newLocation.coordinate print("Updated location: \(newLocation.coordinate)") } func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) { print("Location update failed with error: \(error.localizedDescription)") currentLocation = nil } func stopLocation() { locationManager.stopUpdatingLocation() print("Stopped updating location") } }
0
0
446
Feb ’25
WeatherKit always returns 401 NOT_ENABLED despite correct setup
Hi everyone, I’m trying to use WeatherKit REST API in my iOS app, but for several days now I always get the same response: WeatherKit capability is enabled in my App ID WeatherKit is enabled in App Services (in Certificates, Identifiers & Profiles) WeatherKit REST API is enabled in my developer account JWT is correctly signed with private key from AuthKey_XXXXX.p8 Token contains correct iss, kid, sub, exp, and scope Request is sent to https://weatherkit.apple.com/api/v1/weather/en/50.45/30.52 with Authorization: Bearer Still, the response is always 401 NOT_ENABLED. This is not a temporary issue — I’ve been testing this for over 5 days, regenerating keys, JWTs, and checking the setup. Everything seems correct — but WeatherKit just won’t respond with actual data. Has anyone experienced something similar? Is there something missing in the setup not documented? Thanks in advance!
0
0
50
Jun ’25
MapPolygon
I recently converted over my map from Mapbox Maps to MapKit Map. I have been able to add my polygons on the Map using MapPolygon. The issue I am having is being able to select the Polygon to be able to view information about the polygon. Has anyone been able to figure out a way to tap on the Polygon? I have tried selection but the Polygon doesn't recognize the tap. I would really appreciate it if anyone could point me in the right direction of how I can accomplish this.
1
0
350
Feb ’25
Bachelor Thesis -Geolocation
Hello, I write a Bachelor-Theses about Geolocation on an iPhone. I have a Signal-generator from R&S to simulate GPS-Data. I write an App on an Android-Phone and can readout the GPS-ID and the strength from the signal and the time and Position for Geolocation zb. Island or Africa like this. Now my thesis is about the iPhone and I write an App for get the location manager Geolocation and to save it to a sqlite-database with longitude, latitude and time. But the App recognizes only the real world for geolocation on GPS (LTE and Wlan are disabled!). With my Radio-Generator it would not recognize any Geolocation like the Android phone.? So I need some fast help for my thesis, where are my problems? I allready have a function like this: func updateAccuracy(highAccuracy: Bool) { locationManager.desiredAccuracy = highAccuracy ? kCLLocationAccuracyBestForNavigation : kCLLocationAccuracyHundredMeters print("🎯 GPS-Genauigkeit geändert: (highAccuracy ? "Hoch" : "Plane-Genauigkeit")") } but nothing happens? Best regards
1
0
313
Feb ’25