Search results for

Apple Maps Guides

149,833 results found

Post

Replies

Boosts

Views

Activity

Using Maps in App Intents
I want to use MapKit with App Intents, but the map does not show up.(See attached image) Can anyone help me solve this? import SwiftUI import MapKit struct ContentView: View { @State private var region = MKCoordinateRegion( center: CLLocationCoordinate2D(latitude: 37.334_900, longitude: -122.009_020), latitudinalMeters: 750, longitudinalMeters: 750 ) var body: some View { VStack { Map(coordinateRegion: $region).frame(width:300, height:300) .disabled(true) } } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } } import AppIntents import SwiftUI import MapKit struct test20220727bAppIntentsExtension: AppIntent { static var title: LocalizedStringResource = test20220727bAppIntentsExtension func perform() async throws -> some IntentResult { return .result(value: aaa, view: ContentView()) } } struct testShortcuts:AppShortcutsProvider{ @available(iOS 16.0, *) static var appShortcuts: [AppShortcut]{ AppShortcut( intent: test20220727bAppIntentsExtensio
2
0
1.2k
Jul ’22
How to get the nearest point on a depth map?
I achieved streaming depth map using ARKit by taking reference to this GitHub code: https://github.com/TokyoYoshida/ExampleOfiOSLiDAR/blob/main/ExampleOfiOSLiDAR/Samples/Depth/DepthMapViewController.swift Now I would like to find the point which is closest to the rear camera and show the point on the depth map. It is like the codes can automatically detect the closest point and label it when the app is running. How can I get the closest pixel point with ARKit and CVPixelBuffer?
0
0
556
Oct ’21
Putting buttons over SwiftUI map view
Has anyone gotten custom buttons to work on top of tvOS Map()? I've tried many variations of FocusState focusSection .defaultFocus() and as soon as the map appears at startup the buttons never get focus again. They are on a ZStack over the map. I could post code but truthfully nothing works for me. I'm wondering if anyone has successfully put focusable buttons on top of the map view.
0
0
212
Mar ’25
Reply to Max MKMapView Resolution/Zoom Level
Hello kkaverappa,The starting point for a suggestion to Apple's map team to cancel this limitation would be to file a Radar. There is no way to tell when or if they will implement it. MapKit is designed for Apple's needs primarily. If you need something it doesn't provide, there are other mapping solutions available. Apple's solution is the only free one however.
Mar ’17
Plotting map annotations from a JSON response
I'm trying to plot out map annotations from a JSON Response using MapKit. I've figured out some basic ways to plot out map points, but Im not sure entirely what MapKit is expecting for map points. In my JSON response my struct is // MARK: - Business struct Business: Codable, Identifiable { let id, alias, name: String let coordinates: Center } struct Center: Codable { let latitude, longitude: Double } Then my code looks like this, but I think I'm using CLLocationCoordinate2DMake incorrectly. @State var yelpbusinessdataMap: WelcomeBusiness? = nil var body: some View { Map(coordinateRegion: $region, interactionModes: MapInteractionModes.all, showsUserLocation: true, userTrackingMode: $userTrackingMode, annotationItems: yelpbusinessdataMap?.businesses ?? [] ) { places in var new2DCoord = CLLocationCoordinate2DMake(places.coordinates.latitude, places.coordinates.longitude) MapAnnotation( coordinate: new2DCoord, anchorPoint: CGPoint(x: 0.5, y: 0.5) ){ Circle() .stroke(Color.green
2
0
1.2k
Oct ’20
How can I zoom a map to fit a polyline
HiI have a mapview on which I'm drawing a polyline representing the users journey using location services. After the journey has been saved, and the user reopens it, I'm displaying the route that was taken. I would very much like to zoom the map to fit the entire polyline when the view is loaded. I've had no luck searching Google or the forums.Does anyone know how I can achive this?Thanks in advance...
3
0
4.8k
Feb ’18
how do I make scrollable map in game?
HiI would like to make a game similar to Clash of Clans in which the user can use thier fingers to scroll around a world map, zoom in, and zoom out. Yes, this is a beginner question, but I don't know where to start learning how to write Swift code for this idea.Please let me know if there are any good online video tutorials that teach how to build this concept.Thank you in advance!-David
2
0
2.6k
Jun ’17
Hiding the map layer in MKMapView
I want to use an MKMapView only for its capabilities to render geometries such as polylines and polygons. I want to hide all map features completely. Unfortunately there doesn't seem to be an easy way to do this. I tried using a custom tile renderer that just renders a gray tile, but I get a lot of artifacts when panning and zooming (see screenshot at https://ibb.co/VJZwbsN).Is there any better way to achieve this?
0
0
663
Jun ’20
Apple maps listing shows info for a completely different business even though everything is correctly setup
Our Apple maps listing shows that information for a completely different business including critical aspects like the website and photos. There's even a prompt to download the app of another business. There's nowhere in the Apple Business Register to change these things, where do I go? I already reported an issue but even there you can only request to change the website URL. It also incorrectly says we're permanently closed even though we have it marked as open in the Apple Business Register. The only correct things are the phone number and address. How do I fix this? Apple support hasn't gotten back to me in almost 2 weeks and this. is very urgent. Thank you!
0
0
627
Jan ’23
Looking for this Guide "Develop iOS Apps with Swift" in the latest Documentation
I have started working through this tutorial (https://developer.apple.com/library/archive/referencelibrary/GettingStarted/DevelopiOSAppsSwift/ConnectTheUIToCode.html), which was great explaining how Xcode is laid out, and how to work through building native apps, but the guide is outdated. I could not find it on the latest docs. Is there a similar guide?
2
0
455
Jul ’19