Post

Replies

Boosts

Views

Activity

Satellite Imagery on WatchOS 10
Has anyone used satellite imagery on WatchOS 10? I am trying to set the mapStyle ... .mapStyle(.imagery(elevation: .automatic)) ... for the map and it doesn't seem to have any effect, the map is just the standard map style. The documentation for mapStyle indicates that it is available. Any help would be appreciated. Ultra 2, WatchOS 10.4, Xcode 15.3
1
1
346
May ’24
MapKit JS mapkit.init authorizationCallback
I have created a script to return a valid jwt token for mapkitjs. I have attempted to use both the fetch and xhr methods to call the script, and both methods receive the token, which I can display using a javascript alert call. I know the token is a good token because I can copy the token from the alert and brute force it into the code and the map is displayed. However, I cannot figure out what is wrong with the token in terms of the "expected pattern." I receive this error in the javascript console: "Unhandled Promise Rejection: SyntaxError: The string did not match the expected pattern." I return a simple string that is only the token itself. I have tried returning a json object like {"jwt":"the token"} or {"JWT":"thetoken"}. I tried changing res.test() to res.json(), although probably not at the some time as when I returned the json object. But then, I don't think that is the real problem, because Apple's description on using the token would not be ... then(res => res.text()). Naturally, I assumed that a text string exactly like is quoted using ... 'const jwt = "thetoken"' was what I was supposed to return to the fetch call. Can someone please tell me what I don't understand about the "expected pattern?"
4
0
859
May ’23
mapkitjs resource websites cannot be found
I am trying to use mapkitjs. I have used mapkit on ios extensively, but would like to use mapkitjs, as well. When I load a simple webpage, the page generated by the dashboard when I generated a token on the dashboard, the javascript console shows that the resources are not loading because the webpages cannot be found by Safari. One page, for instance, is: https://mw-ci1-mapkitjs.geo.apple.com/admin/source-maps/5.75.101/source-maps/libs/mapkit.core.f5d12d.js.map There are several others, as well. The map does display correctly, I am able to declare a coordinate and region and have the map display the map showing that region. However, attempting to add an annotation does not work, as the variable MarkerAnnotation can not found. The error is: [Error] Unhandled Promise Rejection: ReferenceError: Can't find variable: MarkerAnnotation I have tried changing the library from "map" to "full-map" and that does not seem to help. I do not understand why all the mapkitjs libs cannot be found by Safari. Is it because at this early stage I am just hardcoding the token in the page? Nothing indicates this is a problem.
3
0
947
May ’23
visionKit
I might be mistaken, but I believe visionKit has been made integral to ios16 and/or xCode14. My app now has a lot of visionKit entries in the log. I have a sense that this is expensive on a scrolling tableview of videos. First, how is it possible to simply prevent the prying eyes of visionKit from performing their invasive tasks? Second, am I mistaken about the added weight, especially once the kit gets its teeth into a video? Third, is this why the controls do not show up, because no displayed controls is very confusing to the app user? TIA
1
0
802
Sep ’22