Questions tagged [mapkit-js]

17 questions
14
votes
2 answers

Including typings for third-party library gives module not found via angular CLI?

I am attempting to include typings for Apple's MapKit JS in my Angular 9 application, because there are no high quality typings provided by the library, nor any good third-party typings in the @types scoped package. However, Angular CLI isn't happy…
marked-down
  • 9,958
  • 22
  • 87
  • 150
3
votes
1 answer

Blazor calling JSInterop script that builds UI fails to render correctly

I'm trying to get this to work as per Microsoft's documentation. The below script code works perfectly in an existing React app and I'm trying to port the app to Blazor. The script loads and inits - and I can see the Iframe being correctly loaded…
3
votes
0 answers

What counts as a MapKitJs call?

MapKitJS offers 250,000 free map calls per day at the current time (June 2021). This raises the question for me, what is counted as a call? Is the call counted when the mapkit.init(...) method is called or when a new map instance is created? For…
Valentin Gavran
  • 341
  • 9
  • 21
3
votes
0 answers

Not able to use JWT token for loading Mapkit for authorization

I am trying to load CAD image from geojson files using MapKit.js library. For authorization of geolocation I am using JWT to generate the token, as listed below. import jwt import…
Rbond
  • 31
  • 1
1
vote
1 answer

How to import and use @types/apple-mapkit-js-browser in Sveltekit?

Newbie here. I have imported lots of other modules and used them successfully. But I am trying to important this type definition for Apple MapKit JS. It defines a namespace mapkit and then the BoundingRegion type inside of that. I know how to import…
1
vote
0 answers

MapKit JS: Show "cursor pointer" when hovering over annotation

I'm using Apple's MapKit JS, and I'm wondering how I can configure it to show a "cursor pointer" when hovering over the annotations in the map? Now they are clickable, but the cursor never changes. I'd like to show a cursor like this: My map:
eivindml
  • 2,197
  • 7
  • 36
  • 68
1
vote
1 answer

Multiple origin when creating jwt token for Apple Maps?

I'm following this guide from Apple to create a jwt token to use with their Apple Maps JS Kit: https://developer.apple.com/documentation/mapkitjs/creating_and_using_tokens_with_mapkit_js It works, but how can I set multiple origins? I wan't it to…
eivindml
  • 2,197
  • 7
  • 36
  • 68
1
vote
0 answers

How do I enable clicking default POI markers in mapkit js

I am using mapkit js. var map = new mapkit.Map('mymap', { center: center, cameraDistance: 300, showsZoomControl: true, showsPointsOfInterest: true, }); And after map initialized it come with some default POIs with icons like Apple map result. I want…
deepblue
  • 11
  • 1
1
vote
1 answer

Apple MapKit JS (web) - Max Camera Zoom

Apple's MapKit JS (for the web) is in beta. I am trying to zoom out the camera so that the entire world is visible without needing to scroll or zoom, but there seems to a cap on the maximum zoom level. I have tried setting the cameraZoomRange and…
Johann Burgess
  • 580
  • 6
  • 17
1
vote
1 answer

How can I fix 'window is undefined' when running Mapkit JS in Node.js (Firebase Functions)

I have been using Apple Mapkit JS POI search and reverseGeoLocation search in the browser and want to move my code to Firebase functions (node.js). I can import mapkit using mapkit-npm (or just downloading the latest CDN file and importing that…
1
vote
2 answers

Is there an Apple MapKit JS typescript definition file?

Before I start writing one, has anybody seen a typescript definition file (.d.ts) for Apple MapKit JS?
Jon N
  • 1,439
  • 1
  • 18
  • 29
0
votes
1 answer

Is there a MapKit JS event to detect when the map has finished loading?

Is there a MapKit JS event to detect when the map has finished loading? The documentation does not show anything on how this is possible. Does anyone have a workaround that does not involve a setTimeout?…
SlickRemix
  • 456
  • 6
  • 17
0
votes
0 answers

Use Custom Image from URL in MapKit JS Annotation

I'm working with MapKit JS for the first time and using the Custom Callout example from the Apple website. It uses the default red circle for the marker - I'd like to now change that to a custom image from a URL that I host but I'm having trouble…
user982124
  • 4,416
  • 16
  • 65
  • 140
0
votes
1 answer

Svelte Component Not Reactive When Using Global Script

I'm using SvelteKit to build an app, and I import an external script (Apple's MapKit JS) in my app.html like this: I then have a Map.svelte component that loads a point on a…
Clifton Labrum
  • 13,053
  • 9
  • 65
  • 128
0
votes
1 answer

How to add layer over full map in apple mapkit JS

I am trying to customize my apple map on web (Mapkit JS). I know you can set the maps colorScheme (Light or Dark). But is there a better way to customize it with more colors?
dcts
  • 1,479
  • 15
  • 34
1
2