Search results for

Apple Maps Guides

149,609 results found

Post

Replies

Boosts

Views

Activity

How do I map() an array of dictionaries
I'm querying core data to get back my entries like this:let request = NSFetchRequest(entityName: TeamPerson) request.resultType = .DictionaryResultType request.returnsDistinctResults = true request.predicate = NSPredicate(format: team == %@, team) request.propertiesToFetch = [person.first, person.last, person.sql_ident] if let results = team.managedObjectContext?.executeFetchRequest(request, error: nil) as? [[String : AnyObject]] {So now I have an array of dictionary objects as the results variable. Now I want to pass that through map so that I get back a tuple with a formatted name and an integer. I tried this: results.map { (dict: [String : AnyObject]) in let formatted = Person.formattedNameWithFirst(dict[person.first], last: dict[person.last]) (formatted, dict[person.sql_ident]) }But the compiler complains that Cannot invoke 'map' with an argument list of type '(([String : AnyObject]) -> _)'
1
0
219
Jul ’15
attenuation map covers over object
hi, I'm trying to create a virtual movie theater, but after running computeDiffuseReflectionUVs.py and applying attenuation map, I noticed the light falloff effect just covers over the objects. I used apple provided attenuation map (did not specify the attenuation map name on python script) with sample size of 6000. I thought the python script would calculate vertices and create shadow for, say, back of the chairs. Am I understanding this wrong?
1
0
74
Apr ’25
Core Data Mapping Model
I'm using iOS 11 beta 5. After adding a model version and creating a custom mapping model, the constructor public init?(from bundles: [Bundle]?, forSourceModel sourceModel: NSManagedObjectModel?, destinationModel: NSManagedObjectModel?)always returns nil due to a mismatch between the mapping and the source/destination models. I didn't modify any model version after creating the mapping. Does anyone experience the same issue?
0
0
669
Aug ’17
Get coordinates in the onLongPressGesture on the Map
I've asked this question at SO, but there are no replies there, so I decided to give it a try here. Basically, I want to be able to capture the coordinates of a long press on the Map component (not the geo-coordinates - that's a separate task - just local to the app coordinates). The problem is that the .onLongPressGesture doesn't provide the coordinates of where the long press happened. .onTapGesture does - but I don't want to register taps, I want to register long presses. One of the work-arounds suggested at SO was to leverage the DragGesture, and it kinda works for other views, but when applied to a Map, it breaks the default dragging functionality of the Map component (so that it becomes impossible to scroll the map region). Also this work-around provides the coordinates only when the finger is released (at the end of the .onLongPressGesture), but I want to capture the long-press location before the finger was released (but after some time of holding, for example 1 sec
3
0
3.1k
Jun ’23
.navigationTitle and List misbehaving with a Map()
When navigated to another view with a NavigationStack or NavigationView, the .navigationTitle modifying a List or Form containing a Map() gets quirky when trying to show the title. The back button is displayed correctly, but the title does not follow the same color scheme as the List of Form, rather it is white with a divider underneath it. It's like it is confusing the .inline with the .large navigation display modes. This doesn't just show up in the simulator, but on actual devices too. This is a test main view... import SwiftUI struct ContentView: View { var body: some View { NavigationStack { NavigationLink(destination: MapErrorView()) { Text(Map View) } } } } This is a test navigated view... import SwiftUI import MapKit struct MapErrorView: View { var body: some View { NavigationStack { Form { Section(header: Text(Map of the US States)) { Text(Map Error) Map() .frame(height: 220) } } .navigationTitle(Map Error) .navigationBarTitleDisplayMode(.large) }
3
0
135
Jul ’25
app native maps in italy
Are there any known restrictions of viewing native apps in a specific country?We have an app that displays a native map and works fine in the UK, but we do not see the map when some in Italy or Dubai is using the app.Is there a reason for this in the OS or is this a setting in the app we need to specify?
0
0
230
Oct ’16
Apple Maps Not responding to scrolling, zooming, or tap gestures on custom pins
Scrolling and zooming I have two apps that utilize the Apple Maps and since I updated my xcode to use IOS18, some of the functionalities have either been missing or glitching, and when I roll back to IOS17.5, everything seems to work fine. When I use MKMapView and use mapView.isZoomEnabled = true mapView.isScrollEnabled = true Scrolling and zooming is still not working on IOS18 but IOS17.5 works fine. Clicking on custom annotations When I press on a custom annotation I add to the MapView, the gesture is sometimes recognized and most of the times not recognized. If I have 20 annotations, there is a possibility only 2 of them respond to tap gestures. Below is how I define the annotation. Annotation(Pin, coordinate: CLLocationCoordinate2D(latitude: latitude, longitude: longitude), anchor: .bottom) { Button(action: {print (Pressed annotation){ CustomPin() } }
0
0
351
Oct ’24
iOS Maps App Route Sharing
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 Ap
0
0
526
Jan ’22
Google Map utility ios
I've added updated Google-Map-IOs-Utils library manually in project for marker clustering. In cluster manager array,cluster item is a object of Spot class having property marker.no error showing but custom marker and cluster both are showing and on tapping on cluster item it displays default map marker also.My code is on link-https://github.com/googlemaps/google-maps-ios-utils/issues/37 Any idea how do i solve this?
0
0
450
Sep ’16
Reply to Code iteration time out
(0 ..< numberOfQueries) .lazy .map { _ in Int(readLine()!)! } .map { array[(rotatedFirstIndex + $0) % endIndex] } .forEach { print($0) }0 ..< numberOfQueries is a CountableRange: a struct which you can think of as similar to an array of consecutive values, but for which there's no actual storage of these values. Its lazy property didn't need to be used, but I wanted to prevent an array being stored by each of the maps chained after it. You'll find information about lazy and forEach in the Swift Standard Library reference. The omission of parentheses around the closures provided to the map and forEach calls is known as trailing closure syntax, which is explained in The Swift Programming Language guide, and I strongly recommend you read that guide.The code could have been written as follows, but I wanted a little practice at writing in a more functional style.for _ in 0 ..< numberOfQueries { let queryIndex = Int(readLine()!)! let value = array[(rotatedFirstI
Topic: Programming Languages SubTopic: Swift Tags:
Feb ’17