MapKit JS

RSS for tag

Embed interactive Apple maps on your website, annotate points of interest, and perform geo-related searches using MapKit JS.

MapKit JS Documentation

Pinned Posts

Posts under MapKit JS tag

27 Posts
Sort by:
Post not yet marked as solved
0 Replies
212 Views
Hello everyone, how can I change the standard pin icon to another? And how is it possible when I tap on the pin that an additional popup view opens in which the name of the city is at the top and that the associated image from the PhotoView is displayed? How could I best implement this? Thanks in advance MapView import MapKit import SwiftUI struct City: Identifiable {     let id = UUID()     let name: String     let coordinate: CLLocationCoordinate2D } struct MapView: View {     @State private var region = MKCoordinateRegion(center: CLLocationCoordinate2D(latitude: 46.62407, longitude: 8.03434), span: MKCoordinateSpan(latitudeDelta: 0.1, longitudeDelta: 0.1))          let annotations = [         City(name: "Alte Strasse(Zuhause)", coordinate: CLLocationCoordinate2D(latitude: 46.63649, longitude: 7.97512)),         City(name: "Stalden1", coordinate: CLLocationCoordinate2D(latitude: 46.63937, longitude: 7.97216)),         City(name: "Stalden2", coordinate: CLLocationCoordinate2D(latitude: 46.63873, longitude: 7.96684)),         City(name: "Scheideggstrasse(Wetterhorn)1", coordinate: CLLocationCoordinate2D(latitude: 46.63353, longitude: 8.07356)),         City(name: "Scheideggstrasse(Wetterhorn)2", coordinate: CLLocationCoordinate2D(latitude: 46.63293, longitude: 8.07380)),         City(name: "Scheideggstrasse(Wetterhorn)3", coordinate: CLLocationCoordinate2D(latitude: 46.63313, longitude: 8.07329)),         City(name: "Scheideggstrasse(Wetterhorn)4", coordinate: CLLocationCoordinate2D(latitude: 46.63456, longitude: 8.07337)),         City(name: "Obere Gletscherstrasse(Wetterhorn)", coordinate: CLLocationCoordinate2D(latitude: 46.63205, longitude: 8.07022)),         City(name: "Obere Gletscherstrasse(Hotel Blümlisalp)", coordinate: CLLocationCoordinate2D(latitude: 46.63173, longitude: 8.06699)),         City(name: "Itramenstrasse", coordinate: CLLocationCoordinate2D(latitude: 46.62060, longitude: 7.99514))     ]     var body: some View {         Map(coordinateRegion: $region, annotationItems: annotations) {             MapMarker(coordinate: $0.coordinate)             }         .onAppear {             MKMapView.appearance().mapType = .satellite         }             }     struct MapView_Previews: PreviewProvider {         static var previews: some View {             MapView()         }     } } PhotoView struct ContentView: View {     var images: [String] = ["noaa1", "noaa2", "noaa3", "noaa4", "noaa5", "noaa6", "noaa7", "noaa8", "noaa9", "noaa10", "noaa11", "noaa12", "noaa13", "noaa14", "noaa15", "noaa16", "noaa17", "noaa18"]          var columnGrid: [GridItem] = [GridItem(.fixed(180), spacing: 16), GridItem(.fixed(180), spacing: 16)]              var body: some View {         NavigationView {             ScrollView {                 LazyVGrid(columns: columnGrid, alignment: .center, spacing: 16) {                     ForEach(images, id: \.self) { image in                         NavigationLink (destination: ImageDetail(imageName: image)) {                             Image(image)                                 .resizable()                                 .scaledToFit()                                 .cornerRadius(10)                         }                     }                 }             }.navigationBarTitle(Text("Test"), displayMode: .inline)         }.navigationViewStyle(.stack)     } }
Posted
by
Post not yet marked as solved
3 Replies
207 Views
Hey there, after updating my Ionic app from Angular 12 to 13, I am suddenly getting an error with Mapkit JS which entirely blocks using it. I tried the latest version of Mapkit JS with 5.72.67 but other versions result in the same issue: Cannot set tint of [object object] which has only a getter Thank you for any kind of advice, Manuel
Posted
by
Post marked as solved
3 Replies
205 Views
Hi, I was wondering what the possibilities are to use the 3D data accessible in Maps. I would like to analyze the building heights, and/or get the 3D visualization to be shown as an option in a JS app. Is it possible to retrieve building heights from Maps data, and what are the odds to visualize Maps 3D data in my own app? Bests Thomas
Posted
by
Post not yet marked as solved
2 Replies
262 Views
There appears to be an issue with satellite map tile appearing as blank/black when using Mapkit JS on the web. See example from duckduckgo which uses Mapkit JS below (switch to satellite view to see blank tiles):- https://duckduckgo.com/?q=CH44+5UP&t=h_&ia=maps&iaxm=maps I have the same issue when using Mapkit JS. It is only a recent issue but appears widely across the UK (not sure of other countries). Does anyone know, how to raise this as an issue to the Apple Maps or Mapkit JS people (I can't seem to see a support email address or similar)? Thanks in advance.
Posted
by
Post not yet marked as solved
2 Replies
166 Views
I'm so glad apple has created a web api for WeatherKit as I thought my personal Dark Sky app was done once they were acquired. I've been able to recreate all dark sky calls using weatherKit. However, radar has always been hard to acquire. Now there is WeatherKit and MapKit, are there plans for radar in weatherKit, mapKit?
Posted
by
Post not yet marked as solved
3 Replies
107 Views
Apple please provide example code to use MapKit JS Autocomplete. You are using MapKit JS Autocomplete on this site on the user profile page! Should be easy enough to take 5 minutes and cut and past the code into a response. Another time Apple showed MapKit JS Autocomplete was at WWDC2018, during this presentation: https://developer.apple.com/videos/play/wwdc2018/212/ But the example code they provided was incomplete.
Posted
by
Post not yet marked as solved
0 Replies
77 Views
Hello, As per the Map action url document https://register.apple.com/resources/bls/specification/map_action/map_action.html External Requirements for Providers MUST define the format of a Map Action URL and register their URL scheme with Apple In which place these url scheme and designated web end point information should be submitted to apple? Regards & Thanks
Posted
by