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 marked as solved
4 Replies
397 Views
Hi! The Shahamiryany Street in Yerevan's Shengavit administrative district, the Republic of Armenia, was renamed after Hrant Vardanyan on June 22, 2021. Please, rename the street on the Apple map. The postal code is 0061. Please see the attached link, which approves that the Shahamiryany Street renamed after Hrant Vardanyan https://www.panorama.am/en/news/2021/06/22/Yerevan-street-Hrant-Vardanyan/2524319/ I just want to share with you other maps links where the Shahamiryany street is already renamed to Hrant Vardanyan. Maybe these links will help the internal team to work on our issue. See the attached links: Google map - https://www.google.com/maps/place/Hrant+Vardanyan+St,+Yerevan/@40.1459874,44.5050153,18.75z/data=!4m5!3m4!1s0x406abc056f3fd70b:0x28f86c1b00a22aa0!8m2!3d40.1468742!4d44.5034239 2.Yandex map - https://yandex.com/maps/10262/yerevan/geo/1695950987/?ll=44.502397%2C40.146560&z=17.8
Posted
by
Post not yet marked as solved
0 Replies
358 Views
Hello, I tried to create a an app for iPhone and I wanted to know how I can create a delivery zone for my application. For example if the customer isn’t inside the area he can’t order and if he is inside he can ! I’m still learning swift and I’m not a professional developer. Thank you so much and have a great day PS: I uploaded an image for the exemple
Posted
by
Post not yet marked as solved
0 Replies
294 Views
I want to use mapkit JS in a safari web extension I'm creating to show a map. When creating a new JWT I can restrict its use to certain URLs. It is possible to create an unbounded JWT, however this is not advised for production use (I guess for the obvious reason that someone might steal your key and use it themselves). It is possible to create a JWT that is limited to my safari web extension (or, less ideally, all safari web extensions)? Using safari-web-extension:// or safari-web-extension://* as restriction doesn't work. Using the whole web extension url (safari-web-extension://1e70cb50-300c-47b7-898c-5c082f836d7d) works, however this changed to a new random number every time safari is restarted.
Posted
by
Post not yet marked as solved
3 Replies
530 Views
The documentation at https://developer.apple.com/documentation/mapkitjs/creating_and_using_tokens_with_mapkit_js states clearly that an asterisk can be used in the origin field of the MapKit JS Token to match multiple origin values. I quote: origin — An optional claim that constrains the token to a specific website or domain. The value of this claim is a fully qualified domain that matches the Origin header passed by a browser. Use the asterisk character (*) in the domain to match multiple origin values. Don’t include a trailing slash as part of the origin claim. So I created a token with an origin like https://*.mydomain.com and was very surprised (read: disappointed) when I deployed it and the authorization call towards Apple servers responded with this error: [MapKit] Initialization failed because the authorization token is invalid. Origin does not match - expected: https://*.mydomain.com, actual: https://www.mydomain.com Has anyone else had a similar issue, or success when using wildcard subdomains with MapKit JS Tokens?
Posted
by
Post not yet marked as solved
0 Replies
321 Views
Hello, This code works fine for desktop, but it's very difficult to display user location, map type controls for mobile. <style> #map { width: 100%; height: calc(100vh - 132px); } </style> The map's existence depends on the height property only. The controls depend on the width one. Although the algorithm is not clear. I see that the width must be more or equal to display width. It works for portrait, but not for landscape. <style> #map { position: absolute; top: 58px; left: 0px; width: calc(100vw); height: calc(100vh - 132px); } </style> How to get stable appearance of the controls for any cases? I used iPhone SE 1.
Posted
by
Post not yet marked as solved
1 Replies
562 Views
Hello 👋🏼, We are using MapKit JS to display maps on our application working on two domains .com and .cn. Everything is working for all ours users in the world except for users using Chinese local network. After investigation, there is an error display in the browser console: [MapKit] Initialization failed because the authorization token is invalid. As the tokens are used as they are for the rest of the world, we know that they are valid... 😕 Problem appears on all browsers: Current versions of MapKit JS mapkit-typescript @ 5.18.2 https://cdn.apple-mapkit.com/mk/5.49.x/mapkit.js Do you have any tips, suggestions to help us 🙏 ? Aurélien.
Posted
by