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
2 Replies
523 Views
I know macOS doesn't allow running multiple instances of an application in normal circumstances. However, for macOS native applications, there is a work around of using -n in the command line. Unfortunately, this option doesn't seem to work for iOS applications running on iOS. Also, I have been having issues with locations services working correctly when running such an instance. For example, if a game requires doing a GPS location check, it does not seem to be able to do it correctly when running the application in macOS, the app doesn't freeze, but it gets stuck and needs to be restarted. I have looked around online and searched around in settings for quite a bit of time with no success. Any ideas?
Posted
by
Post not yet marked as solved
1 Replies
289 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
Post not yet marked as solved
0 Replies
241 Views
Why locationManager did disconnect in this circumstance? Always after START -> STOP -> START service. locationManager = [[CLLocationManager alloc] init]; locationManager.delegate = self; locationManager.desiredAccuracy = kCLLocationAccuracyBest; locationManager.distanceFilter = 5; // meters locationManager.allowsBackgroundLocationUpdates = YES; locationManager.pausesLocationUpdatesAutomatically = NO; if (@available(iOS 14.0, *)) {     if (locationManager.authorizationStatus == kCLAuthorizationStatusAuthorizedWhenInUse){       [locationManager startUpdatingLocation];     } else {       shouldStart = false; [locationManager requestWhenInUseAuthorization];     }   } else {     // Fallback on earlier versions   } --- resume log --- {"msg":"#sbim client arrow state changed", "clientKey":"it.trainingcamp.app", "entityClass":"Application", "oldArrowState":"ReceivingLocationInformation", "newArrowState":"RequestingLocationInformation", "dueToDeauthorization":0} client 'it.trainingcamp.app' authorized for location; starting shortly client 'it.trainingcamp.app' authorized for location; starting now, desiredAccuracy, -1.0, distanceFilter, 5.0, operatingMode 0, dynamicAccuracyReductionEnabled 0, allowsAlteredAccessoryLocations 0, activityType 0 [application<it.trainingcamp.app>:9023] Suspending task. Calculated state for application<it.trainingcamp.app>: running-suspended (role: None) Process runningboardd.34 Released SystemIsActive "application<it.trainingcamp.app>34-77-203313:Location subscription" age:00:00:31 id:51539648441 [System: SysAct] -CMSessionMgr- CMSessionMgrHandleApplicationStateChange: Client it.trainingcamp.app with pid '9023' is now Background Suspended. Background entitlement: YES ActiveLongFormVideoSession: NO WhitelistedLongFormVideoApp NO -CMSessionMgr- CMSessionMgrHandleApplicationStateChange: Sending stop command to it.trainingcamp.app with pid '9023' because client is background suspended and there is no AirPlay video session for it [application<it.trainingcamp.app>:9023] Setting process task state to: Suspended
Posted
by
Post not yet marked as solved
0 Replies
247 Views
Hi, Our application needs to receive and process positions, even in background. The associated UIBackgroundMode is activated, and everything was working well until I updated a test tablet to 15.3.1. The application was switching to background (with position correctly feeds - as expected), but never to suspended. Now it keeps background mode for few seconds or minutes (GPS working at this moment) and then switches to suspended where no more events are triggered. Is there any recent changes on this subject that could explain ? (that's critical for our application)
Posted
by
Post not yet marked as solved
2 Replies
500 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
by
Post not yet marked as solved
2 Replies
397 Views
Hi all, I'm working on an app which requires the most accurate AGPS available, so it requires a device with cellular capabilities even if the network is going over wifi, and even if the cellular modem is turned off. The IP-based location services in a non-cellular device (like a wifi-only iPad or an iPod touch just isn't accurate enough for what I'm doing. I know I can put that in the description in the app store, but I'm wondering if there's a way I can account for it in my code, too. Something like the user interface idiom or iOS version checks you can do, but instead specifically isCellularCapable or some such. I just want it to be clear whenever someone fires up the app with an iPod touch or a non-cellular iPad that they're going to have a less-than-ideal experience. I still remember when my kid's friend tried to do Pokemon Go with a non-cellular iPad tethered to my phone, and the device just couldn't figure out where it was supposed to be. I don't want people using my app to have the same experience.
Posted
by
Post not yet marked as solved
0 Replies
218 Views
I am working on an app that requires location to work in the background constantly. I am using CLLocationManager. Whats happening is after sometime the location service stops working in the background. We have seen the location services stop with in 30 seconds of being in the background, as well as up to 20 hours of location working in the background then it stops. Usually the app doesn't crash, but at times we have seen a crash (very rarely). Currently we: Enabled the background location in info.plist Requests always authorization Start location updates in the foreground allowsBackgroundLocationUpdates is set to true pausesLocationUpdatesAutomatically is set to false. when a car is detected the desired accuracy is set to kCLLocationAccuracyBestForNavigation Any help would be great.
Posted
by
Post not yet marked as solved
0 Replies
203 Views
Is there a way to display the temperature only at a users location in SwiftUI please?? I have been browsing for a solution but can't locate anything that seems to suit this purpose. I have an API with Openweathermap.org.
Posted
by
Post not yet marked as solved
0 Replies
368 Views
I am able to load KML on Google map with below code. But now I want to show .KMZ file on Google map. I did unarchived it & added Folder containing doc.kml & Files folder which comntains 1 image, & tried to show doc.kml file on Google map.But didn't succeeded. func showKMLFile(kmlfileurl:URL) { print("fileURL in show is \(kmlfileurl)") var renderer: GMUGeometryRenderer! var kmlParser: GMUKMLParser! if self.mapView != nil { kmlParser = GMUKMLParser(url:kmlfileurl) kmlParser.parse() renderer = GMUGeometryRenderer(map: self.mapView, geometries: kmlParser.placemarks, styles: kmlParser.styles) renderer.render() } } & I am calling this function like let fileManager = FileManager.default do { let docsArray = try fileManager.contentsOfDirectory(atPath: docsPath) print("docarray is \(docsArray)") for obj in docsArray{ if obj == "doc.kml" { self.showKMLFile(kmlfileurl: URL(fileURLWithPath: docsPath + "/" + "FAIRMEAD LF" + "/" + obj)) } } } catch { print(error) }
Posted
by
Post not yet marked as solved
0 Replies
202 Views
Hello All! We are building an app and want to have the user's navigation status and route be shared with our app. Is there currently a way to do this on iOS? For Example, if a user starts navigation within Apple Maps, we want to observe the location, route, and end destination from our app. Very similar to share ETA, but sharing with another app instead of another person. For context, we want our app to know where a user is going and if they are currently using Apple Maps to navigate. Our app will (hopefully) be able to alert users of potential carpool riders they could pick up, once they have started navigation with Apple Maps. On Android there are system APIs that share navigation event details with other apps, but I can't find anything on iOS. Other than building some type of service that a user could share their ETA with, which would be clunky as it would need to be an SMS send to a contact in their phone, is there a system API, or iOS Maps App API I'm missing?
Posted
by
Post not yet marked as solved
0 Replies
307 Views
I initialize the mapView following the line: MKMapView *mapView = [[MKMapView alloc] init]; and never crash when debugging, but it has occured some times for my users. Here is the stack frame FATAL_SIGNAL SIGSEGV fault_address:0x0000000000000000 Thread 0 name: com.apple.main-thread 0 VectorKit std::__1::__hash_table<std::__1::__hash_value_type<std::__1::shared_ptr<md::LabelImageKey>,std::__1::__list_iterator<md::LabelImageLoader::CachedItem, void*> >,std::__1::__unordered_map_hasher<std::__1::shared_ptr<md::LabelImageKey>,std::__1::__hash_value_type<std::__1::shared_ptr<md::LabelImageKey>,std::__1::__list_iterator<md::LabelImageLoader::CachedItem, void*> >,md::LabelImageLoader::LabelImageCacheHash, true>, std::__1::__unordered_map_equal<std::__1::shared_ptr<md::LabelImageKey>,std::__1::__hash_value_type<std::__1::shared_ptr<md::LabelImageKey>, std::__1::__list_iterator<md::LabelImageLoader::CachedItem, void*> >, md::LabelImageLoader::LabelImageCacheEq, true>,geo::StdAllocator<std::__1::__hash_value_type<std::__1::shared_ptr<md::LabelImageKey>,std::__1::__list_iterator<md::LabelImageLoader::CachedItem, void*> >,mdm::Allocator> >::__rehash(unsigned long) (in VectorKit) 1 VectorKit md::LabelImageLoader::LabelImageLoader(md::LabelManager&) (in VectorKit) 2 VectorKit md::LabelManager::LabelManager(md::WorldType, VKMapPurpose, VKSharedResources*, std::__1::shared_ptr<md::TaskContext>, ggl::RenderTargetFormat const&, float) (in VectorKit) 3 VectorKit std::__1::__shared_ptr_emplace<md::LabelManager, std::__1::allocator<md::LabelManager>>::__shared_ptr_emplace<md::WorldType, VKMapPurpose&,VKSharedResources*&,std::__1::shared_ptr<md::TaskContext>&, ggl::RenderTargetFormatconst&,float&>(md::WorldType&&, VKMapPurpose&, VKSharedResources*&,std::__1::shared_ptr<md::TaskContext>&, ggl::RenderTargetFormat const&, float&) (in VectorKit) 4 VectorKit md::LabelsLogic::LabelsLogic(float,VKMapPurpose, VKSharedResources*, objc_objectobjcproto14MDRenderTarget*,std::__1::shared_ptr<md::TaskContext>) (in VectorKit) 5 VectorKit md::MapEngine::MapEngine(float, float, float, bool, std::__1::shared_ptr<md::TaskContext> const&,VKMapPurpose,std::__1::unique_ptr<md::AnimationManager, std::__1::default_delete<md::AnimationManager> >,geo::linear_map<md::MapEngineSetting, long long,std::__1::equal_to<md::MapEngineSetting>,std::__1::allocator<std::__1::pair<md::MapEngineSetting, long long> >,std::__1::vector<std::__1::pair<md::MapEngineSetting, long long>,std::__1::allocator<std::__1::pair<md::MapEngineSetting, long long> > > > const&, unsigned long long,GEOApplicationAuditToken*) (in VectorKit) 6 VectorKit md::MapEngine::interactiveMapEngine(float, bool, geo::linear_map<md::MapEngineSetting, long long,std::__1::equal_to<md::MapEngineSetting>,std::__1::allocator<std::__1::pair<md::MapEngineSetting, long long> >,std::__1::vector<std::__1::pair<md::MapEngineSetting, long long>,std::__1::allocator<std::__1::pair<md::MapEngineSetting, long long> > > > const&, unsigned long long,GEOApplicationAuditToken*) (in VectorKit) 7 VectorKit -[VKMapView initShouldRasterize:inBackground:contentScale:auditToken:] (in VectorKit) 8 MapKit -[MKBasicMapView initWithFrame:andGlobe:shouldRasterize:] (in MapKit) 9 MapKit -[MKMapView _commonInitFromIB:gestureRecognizerHostView:locationManager:showsAttribution:showsAppleLogo:] (in MapKit) 10 MapKit -[MKMapView initWithFrame:] (in MapKit) Thanks for answer.
Posted
by
Post marked as solved
1 Replies
272 Views
My team is working on a social networking application that will suggest connections to users based on their locations. The users will be able to adjust their search radius in miles. Is there a minimum distance radius allowed by Apple Developer for applications? Example 15 miles or 30 miles
Posted
by
Post not yet marked as solved
1 Replies
430 Views
Greetings, I am implementing an app and it has a label that shows user current speed when driving in a car. I did everything to setup location manager and I have made it sure user has provided all the necessary permissions. Apart from that I have set desiredAccuracy as kCLLocationAccuracyBestForNavigation. Now the problem is when am travelling in a car with a much higher speed for example 50 km/hr it shows me the speed is 14 km/hr I have used below code in didUpdateLocations Multiline         var speed: CLLocationSpeed = CLLocationSpeed()         speed = locationManager.location?.speed ?? 0 * 3.6                   if speed > 0{             let speedTxt = String(format: "%.0f km/h", speed)             print(speedTxt)             kmBtn.setTitle("(speedTxt)", for: .normal)         }else{             kmBtn.setTitle("0 Km/h", for: .normal)         } BlockQuote NOTE : Here I have multiplied the speed with 3.6 to convert the value from meterPerSecond to KilometerPerHour Why its not returning the accurate speed and how to get that ?
Posted
by
Post not yet marked as solved
1 Replies
375 Views
In SwiftUI, when creating an annotation on a Map, there's no way to move an existing Annotation after it's been placed on a Map. Example: import SwiftUI import MapKit struct AnnotationItem: Identifiable { var id: UUID var coordinate: CLLocationCoordinate2D } struct MapTest: View { @Binding var annonations: [AnnotationItem] var body: some View { Map( coordinateRegion: $region, annotationItems: annotations ) { annotation in MapAnnotation( coordinate: annotation.coordinate ) { Circle() .foregroundColor(.blue) .frame(width: 12, height: 12) } } } .frame(width: 500, height: 500) } } extension MapTest { class ViewModel: ObservableObject { @Published var annotations: [AnnotationItem] = [ AnnotationItem( id: UUID(), coordinate: .init(latitude: 0, longitude: 0) ) ] // Doesn't move the annotation func moveTest1() { annotations.first?.coordinate = .init(latitude: 1, longitude: 1) } // Moves the annotation with a flicker func moveTest2() { annotations = [ AnnotationItem( id: UUID(), coordinate: .init(latitude: 0, longitude: 0) ) ] } } } In this example, the function move1() doesn't have any affect on the annotation, even though I think it should. The function move2() moves the annotation, but has a flicker effect because it's creating a new AnnotationItem with a new UUID and replacing the old one. Is this a bug? Or is there no way to smoothly animate an annotation from one location to another?
Posted
by
Post not yet marked as solved
1 Replies
279 Views
https://developer.apple.com/ibeacon/ indicates "Once you accept the iBeacon license agreement, you’ll receive: Works with Apple iBeacon Badges Works with Apple iBeacon Guidelines Proximity Beacon Specification" But the download link "Download Artwork and Specifications" includes no "Proximity Beacon Specification". Where can we download the "Proximity Beacon Specification"? Thank you.
Posted
by
Post not yet marked as solved
0 Replies
273 Views
I need an expert to chime in with a solution. I currently find myself with a doubt regarding the Google Map iOS SDK, it's an iOS Front-End Problem. Problem: We need to fetches places around map region. There can be 1000s of places and each place needs to be plotted on map using ground overlay (GMSOverlay). Each place has icon with particular border and marker needs to render both icon and border. Apart from this, each marker is animatable. They can pulsate when they meet certain criteria. Issue we are having: Plotting multiple overlays on map is making app slow. Z-index of the overlay is not working on tap. Even though their visibility is based on z-index, tap action is not performing as expected. I posted the code snippet on the Google Maps iOS Github, check link: https://github.com/googlemaps/maps-sdk-for-ios-samples/issues/118 Here is a video where I describe the slow/stuttering issue in more detail: https://www.youtube.com/watch?v=qJhFrL1QbNg&feature=youtu.be
Posted
by