Maps and Location

RSS for tag

Build maps and location awareness capabilities into your apps.

Posts under Maps and Location tag

83 Posts
Sort by:
Post not yet marked as solved
0 Replies
32 Views
I am using Google Map SDK. I want to catch every moment when user changes his location, maybe from CLLocationManagerDelegate. Can anyone say which method can execute previous job? I tried to use func locationManager( _ manager: CLLocationManager, didUpdateLocations locations: [CLLocation])  but it doesnot work well. When I run application, after 3-4 seconds this method call then If I change my location it doesnot do nothing.
Posted
by Rezo_7.
Last updated
.
Post not yet marked as solved
0 Replies
76 Views
Hello, As per the Map action url document https://register.apple.com/resources/bls/specification/map_action/map_action.html External Requirements for Providers MUST define the format of a Map Action URL and register their URL scheme with Apple In which place these url scheme and designated web end point information should be submitted to apple? Regards & Thanks
Posted
by paras.
Last updated
.
Post not yet marked as solved
0 Replies
65 Views
I try to develop an indoor map program by IMDF. Before starting, I want to ask, does anyone know the development process? Mainly want to know at which stage the map data needs to be uploaded to the Apple server?(or unnecessary?) I mean, For the conversion between GeoJSON and IMDF, the data only be uploaded to the Apple server for conversion?
Posted
by Jian_G.
Last updated
.
Post not yet marked as solved
2 Replies
497 Views
I have given location permission for the app i'm developing. Now i need to reset location permission and want to see the permission pop-up. I have tried tccutil reset and /var/db/locationd/clients.plist is not accessible. Both are failing even with sudo. Please suggest any methods.
Posted Last updated
.
Post not yet marked as solved
3 Replies
103 Views
Apple please provide example code to use MapKit JS Autocomplete. You are using MapKit JS Autocomplete on this site on the user profile page! Should be easy enough to take 5 minutes and cut and past the code into a response. Another time Apple showed MapKit JS Autocomplete was at WWDC2018, during this presentation: https://developer.apple.com/videos/play/wwdc2018/212/ But the example code they provided was incomplete.
Posted Last updated
.
Post not yet marked as solved
0 Replies
98 Views
I'm working on a navigation app and I would like to snap the userLocation to the MKRoute's Polyline much like how Apple does in Apple Maps. I've added the route's MKPolyline to my MKMapView and it looks great, the user's location is just usually not centered on the road or is off to the side a bit even when using kCLLocationAccuracyBestForNavigation as the CLLocationManager's accuracy. I need it to be centered like Apple Maps as shown bellow. How would I go about doing this? Is there a way to snap MKAnnotation's to roads (or MKPloylines) and update with the CLLocationManager's userLocation?
Posted Last updated
.
Post marked as solved
6 Replies
839 Views
Can anyone explain why I need to provide location service capabilities to get BSSID info for the Wi-Fi network device? Here some notes from CWNetwork header language /*! @property @abstract Returns the basic service set identifier (BSSID) for the Wi-Fi network device, returned as UTF-8 string. @discussion Returns a UTF-8 string using hexadecimal characters formatted as XX:XX:XX:XX:XX:XX. @note BSSID information is not available unless Location Services is enabled and the user has authorized the calling app to use location services. @seealso CLLocationManager / @property(readonly, nullable) NSString *bssid NS_AVAILABLE_MAC(10_6);
Posted Last updated
.
Post not yet marked as solved
3 Replies
2.7k Views
Hello, (sorry for long log attached within) There has been concern (long story) that my secondary apple ID, phone was somehow linked or registered within an app developer or anything other then default and looking for clarification. This log is directly from the phone/apple ID and the log was generated with a credible source. The apple ID/phone should not be associated with anything and no APP dev account should be associated within the log. Additionally my phone/apple ID that this log is associated with I am wondering if someone can tell me if there is anything to support or speculate that the phone is being shared or bundled in some fashion of any kind to share data, location, apps, or if there is anything such as coding of any kind that is anything other then what your standard phone would look like right out of the box with default settings. It's my suspicion that the apple id/phone log would support the issues that's been present of many issues that can be explained later. Any help would be greatly [appreciated.]( Log of Apple ID/phone in question - https://developer.apple.com/forums/content/attachment/7c971c69-4a7c-43a4-b5e4-42e9e180d161 )
Posted
by Yoshi007.
Last updated
.
Post not yet marked as solved
1 Replies
118 Views
Does anyone know why the business name for this business is coming up as "Specialist Orthodontist Berwick"? The business name is actually SE Orthodontics. It is a concern for us as our own business down the road is called Berwick Orthodontic Specialists. Our patients are getting confused, calling the wrong business trying to change their appointment.
Posted Last updated
.
Post not yet marked as solved
1 Replies
165 Views
Hi, I have a controller where the user can search for map locations or points of interest by typing inside a search box. To retrieve the list of results I set the queryFragment parameter of a MKLocalSearchCompleter with the search content. This correctly gives me back a list of MKLocalSearchCompletion of locations and points of interest. When a user tap on one of this locations, I need to load the coordinates. In order to do that I do a MKLocalSearch passing the selected MKLocalSearchCompletion, like so: let item = items[indexPath.row] let request = MKLocalSearch.Request(completion: item) let search = MKLocalSearch(request: request) search.start { (response, error) in //Do stuff with the result. //For some specific items I receive an MKErrorDomain 4 error. } This works most of the time, but for some specific items the MKLocalSearch call return the error: Error Domain=MKErrorDomain Code=4 "(null)" UserInfo={MKErrorGEOError=-8} This error correspond to "placemarkNotFound", ie MapKit is not able to find a placemark for the specific MKLocalSearchCompletion. I just don't understant why this should be the case. The MKLocalSearchCompletion is returned by MapKit. If it is returned by MapKit then a corresponding placemark should exist, right? Why then is MapKit unable to perform a local search on it? The problem now is that I present the user with a list of completions returned by MapKit but tapping some of them nothing happens because I cannot determine their respective coordinates. Why is the search failing sometime? I miss something? Thank you
Posted
by DaleOne.
Last updated
.
Post not yet marked as solved
1 Replies
304 Views
If I enroll in Indoor Maps, and provide Apple with detailed wi-fi positioning from the building, will iOS users inside that building get more accurate GPS results? I mean, will Apple use the data we provided to give better positioning? Or only if I'm using the MapKit (we already have an interface built, and would NOT be using Apple's).
Posted
by Codezone.
Last updated
.
Post not yet marked as solved
0 Replies
177 Views
My app has a problem updating location after resetting location service to enable. So when the system location service is enabled, my app has no problem updating the location. But if I closed the app and disabled the system location service, then restart the app, it will show an alert to enable the system location service. After enabling location service, then going back to the app, its location has no updating at all. I have the longitude, latitude, heading..etc UIs to indicate whether the location is updated or not. Here are my view's code and location manager class, could someone help me out? Thanks View struct ContentView: View { @StateObject private var locationManager = LocationManager() @State var trackingInfo = ARViewContainer.TrackingInfo() @State var isLocationServiceOff = false var body: some View { ZStack { ARViewContainer(trackingInfo: $trackingInfo) .edgesIgnoringSafeArea(.all) .onAppear{ if CLLocationManager.locationServicesEnabled() { locationManager.checkIfLocationServicesIsEnabled() } else { isLocationServiceOff = true } } .alert(isPresented: $isLocationServiceOff) { Alert(title: Text("Location Service Disabled"), message: Text("Geospatial experience requires location service enabled"), primaryButton: .default(Text("Setting")){ if #available(iOS 10.0, *) { if let url = URL(string: "App-Prefs:root=Privacy&path=LOCATION") { UIApplication.shared.open(url, options: [:], completionHandler: nil) } } else { if let url = URL(string: "prefs:root=LOCATION_SERVICE") { UIApplication.shared.open(url) } } }, secondaryButton: .cancel(Text("Cancel"))) } } } } } LocationManager class LocationManager: NSObject, ObservableObject, CLLocationManagerDelegate { //User could turn location service off, so it's an optional. var locationManager: CLLocationManager? func checkIfLocationServicesIsEnabled() { if CLLocationManager.locationServicesEnabled() { locationManager = CLLocationManager() locationManager!.delegate = self } } private func checkLocationAuthorization() { guard let locationManager = locationManager else { return } switch locationManager.authorizationStatus { case .notDetermined: locationManager.requestWhenInUseAuthorization() case .restricted: print("Restricted location services due to parental controls") case .denied: print("You have denied this app location permission. Go into settings to change it") case .authorizedAlways, .authorizedWhenInUse: locationManager.desiredAccuracy = kCLLocationAccuracyBest locationManager.allowsBackgroundLocationUpdates = true @unknown default: break } } func locationManagerDidChangeAuthorization(_ manager: CLLocationManager) { checkLocationAuthorization() } }
Posted Last updated
.
Post not yet marked as solved
0 Replies
178 Views
Hi, I need to generate the image of a map at a specific resolution. I tried to use the following code: let options = MKMapSnapshotter.Options() options.size = CGSize(width: 300, height: 200) options.scale = 1.0 options.mapRect = mapRect let mapSnapshotter = MKMapSnapshotter(options: options) if let snapshot = try? await mapSnapshotter.start() { let image = snapshot.image } Since I specified the options.scale to be 1 I expect the image resolution to be exactly 300x200 pixel (and with a scale of 1). Unfortunately the resulting image has a scale factor of 3 (on an iPhone) and the actual resolution is 900x600 pixel. I also tried, instead of using the scale option, to set the traitCollection option, like this: options.traitCollection = UITraitCollection(displayScale: 1.0) but I still get a 3x scale image with a resolution of 900x600. Why is the scale option ignored? I miss something? Thank you
Posted
by DaleOne.
Last updated
.
Post not yet marked as solved
0 Replies
212 Views
Hello everyone, how can I change the standard pin icon to another? And how is it possible when I tap on the pin that an additional popup view opens in which the name of the city is at the top and that the associated image from the PhotoView is displayed? How could I best implement this? Thanks in advance MapView import MapKit import SwiftUI struct City: Identifiable {     let id = UUID()     let name: String     let coordinate: CLLocationCoordinate2D } struct MapView: View {     @State private var region = MKCoordinateRegion(center: CLLocationCoordinate2D(latitude: 46.62407, longitude: 8.03434), span: MKCoordinateSpan(latitudeDelta: 0.1, longitudeDelta: 0.1))          let annotations = [         City(name: "Alte Strasse(Zuhause)", coordinate: CLLocationCoordinate2D(latitude: 46.63649, longitude: 7.97512)),         City(name: "Stalden1", coordinate: CLLocationCoordinate2D(latitude: 46.63937, longitude: 7.97216)),         City(name: "Stalden2", coordinate: CLLocationCoordinate2D(latitude: 46.63873, longitude: 7.96684)),         City(name: "Scheideggstrasse(Wetterhorn)1", coordinate: CLLocationCoordinate2D(latitude: 46.63353, longitude: 8.07356)),         City(name: "Scheideggstrasse(Wetterhorn)2", coordinate: CLLocationCoordinate2D(latitude: 46.63293, longitude: 8.07380)),         City(name: "Scheideggstrasse(Wetterhorn)3", coordinate: CLLocationCoordinate2D(latitude: 46.63313, longitude: 8.07329)),         City(name: "Scheideggstrasse(Wetterhorn)4", coordinate: CLLocationCoordinate2D(latitude: 46.63456, longitude: 8.07337)),         City(name: "Obere Gletscherstrasse(Wetterhorn)", coordinate: CLLocationCoordinate2D(latitude: 46.63205, longitude: 8.07022)),         City(name: "Obere Gletscherstrasse(Hotel Blümlisalp)", coordinate: CLLocationCoordinate2D(latitude: 46.63173, longitude: 8.06699)),         City(name: "Itramenstrasse", coordinate: CLLocationCoordinate2D(latitude: 46.62060, longitude: 7.99514))     ]     var body: some View {         Map(coordinateRegion: $region, annotationItems: annotations) {             MapMarker(coordinate: $0.coordinate)             }         .onAppear {             MKMapView.appearance().mapType = .satellite         }             }     struct MapView_Previews: PreviewProvider {         static var previews: some View {             MapView()         }     } } PhotoView struct ContentView: View {     var images: [String] = ["noaa1", "noaa2", "noaa3", "noaa4", "noaa5", "noaa6", "noaa7", "noaa8", "noaa9", "noaa10", "noaa11", "noaa12", "noaa13", "noaa14", "noaa15", "noaa16", "noaa17", "noaa18"]          var columnGrid: [GridItem] = [GridItem(.fixed(180), spacing: 16), GridItem(.fixed(180), spacing: 16)]              var body: some View {         NavigationView {             ScrollView {                 LazyVGrid(columns: columnGrid, alignment: .center, spacing: 16) {                     ForEach(images, id: \.self) { image in                         NavigationLink (destination: ImageDetail(imageName: image)) {                             Image(image)                                 .resizable()                                 .scaledToFit()                                 .cornerRadius(10)                         }                     }                 }             }.navigationBarTitle(Text("Test"), displayMode: .inline)         }.navigationViewStyle(.stack)     } }
Posted
by iRIG.
Last updated
.
Post not yet marked as solved
1 Replies
272 Views
I'm not sure if this is the right place to post about this, so if it is not please direct me to where the right place would be. My mom complained about poor battery life on her iPhone 12 running the latest iOS at the time of this post (15.4.1). I noticed her phone was showing the blue indicator behind the time meaning an app was actively using its location. I clicked it and the Shopkick app opened. I made sure location access for the app was set to while using the app. I even changed it to ask each time and when i went back into the app give it location access once then left surely enough the blue status bar indicator reappeared. According to the App Privacy report on her phone the app was accessing the location of her phone once per minute and the only thing I could do was to set location access for the app to never or uninstall the app. I then restored a test iPhone (SE First Generation) with iOS 15.4.1 downloaded the Shopkick app, signed in and gave it the permissions it wanted including location access by tapping "Allow Once" and after opening and closing the app twice it did the same thing on that phone. I'm not sure if this is a problem with iOS or the developers of the Shopkick app are doing something to get around Apple's location permissions. I should add that background app refresh for app was off for all phones tested. This is also still a problem on iOS 15.5 Beta 3 (it doesn't seem to happen every time). However, on my iPhone 13 Pro Max running an older version of iOS 15, the app continues to receive my location only until I close it from the app switcher making me assume it's an iOS issue. Attached is an App Privacy Report (trimmed to fit the size limit) from the test device left overnight with the app force closed, background app refresh off, and location services for the app set to while using the app which shows the app receiving location info once per minute which I don't think is supposed to happen under those conditions unless i'm missing something. Thanks in advance! log-file
Posted
by Mighty_.
Last updated
.
Post not yet marked as solved
0 Replies
188 Views
Are there any solutions to convert floor plans to IMDF files for Indoor Mapping (or at least plans to create a conversion tool)? Most of the tools such as ERSI and Autodesk seem to be developed more for building engineers and architects. Is there anything for content managers to ingest floor plans (provided by our facilities dept), and create and update locations in buildings as they change, and publish to an in-app Apple map implementation? Thanks in advance, Scott
Posted Last updated
.
Post marked as solved
1 Replies
216 Views
Hello, how can I turn this standard map view into a Satellite map view? Thanks //  MapView.swift //  Grindelwald View // //  Created by Roman Indermühle on 15.04.22. // import MapKit import SwiftUI struct City: Identifiable {     let id = UUID()     let name: String     let coordinate: CLLocationCoordinate2D } struct MapView: View {          @State private var region = MKCoordinateRegion(center: CLLocationCoordinate2D(latitude: 46.62407, longitude: 8.03434), span: MKCoordinateSpan(latitudeDelta: 0.17, longitudeDelta: 0.17))               let annotations = [         City(name: "Burglauenen", coordinate: CLLocationCoordinate2D(latitude: 46.63649, longitude: 7.97512)),         City(name: "Stalden", coordinate: CLLocationCoordinate2D(latitude: 46.63937, longitude: 7.97216)),         City(name: "Stalden2", coordinate: CLLocationCoordinate2D(latitude: 46.63873, longitude: 7.96684))                       ]               var body: some View {         Map(coordinateRegion: $region, annotationItems: annotations) {             MapMarker(coordinate: $0.coordinate)                                   }                       }      } struct MapView_Previews: PreviewProvider {     static var previews: some View {         MapView()     } }
Posted
by iRIG.
Last updated
.
Post not yet marked as solved
1 Replies
288 Views
We are working with a DOT agency on their safety truck fleet. We would like to be able to report the safety truck location when it is working an incident on the roadway. We would like it to show up as a hazard on the maps interface. Is there an API interface to report the time and location of the safety truck? Or a contact to talk to about this?
Posted
by jeremypng.
Last updated
.