Search results for

Apple Maps Guides

151,868 results found

Post

Replies

Boosts

Views

Activity

Where is the living auto-layout guide now located?
The Auto Layout Guide has been archived and is no longer being updated. This is the old link https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/AutolayoutPG/index.htmlBut the webpage says IMPORTANTThis document is no longer being updated. For the latest information about Apple SDKs, visit the documentation website.However, where is the auto-layout information? I don't see the auto-layout documentation in https://developer.apple.com/documentation.
3
0
1.1k
Jul ’18
MapKit JS - Center Map Around Coordinates
I'm working with MapKit JS for the first time. I'm using the 'Annotations With a Custom Callout' sample code as my starting point as my map will need to work in a similar way to this one. I've got the basics working but I would now like to specify the center coordinates for the map but can't get this to work and not sure of the correct syntax. For example if I wanted that map to centre around these coordinates: (37.8184493, -122.478409) I'm not sure where/how to specify these. I've tried adding: var center = new mapkit.Coordinate(37.8184493, -122.478409); after: const map = new mapkit.Map(map); but this doesn't change how the map is displayed. Appreciate if someone can show me where/how to specify the center coordinates for this type of map.
0
0
730
Mar ’23
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.3k
Jul ’22
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
226
Mar ’25
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
675
Jun ’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
Tap on maps to get coordinates
Hey guys, I recently started using Swiftui and would like to make a small app for my dad to use as a travel journal as my first project. He can create trips and then create multiple steps in a trip. When creating a step he should be able to set a location. Finding the location from the user is no problem. But now I also want to have the function to tap on the map and set a pin at a random location to get the coordinates (like google maps for example). Unfortunately I can't figure out from the documentation if there is a simple way to do this. import SwiftUI import MapKit struct StepLocationView: View { @EnvironmentObject var locationManagement: LocationDataManager @State private var position: MapCameraPosition = .automatic var body: some View { VStack { Map(position: $position) { UserAnnotation() } .navigationTitle(Search your location) .navigationBarTitleDisplayMode(.inline) .toolbarBackground(.visible, for: .navigationBar) .toolbarBackground(.ultraThinMaterial, for: .navigationBar
3
0
3.8k
Jul ’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
464
Jul ’19
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
568
Oct ’21
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
636
Jan ’23
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
MKMapKit inset - how can I show the United States on a large map and Alaska and Hawaii on two smaller MKMapKit maps
Hi,I am trying to show the 48 states on a large central map for an iPad (working fine) but I want to show Alask and Hawaii on two smaller MKMapKits on smaller inset windows.I have Alaska working but the zoom level is too close ... and when I try to zoom out, it does not zoom.Are there examples of multiple maps of varying sizes for this type of problem ?Thanks !
6
0
717
Jan ’16