Cannot set tint of [object object] which has only a getter

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

Replies

That's probably a question to first ask to Angular…

  • Thank you very much, I will do so as well.

Add a Comment

Could be a bug. Manuel, could you file a feedback ticket on this that includes a test case? https://feedbackassistant.apple.com

  • Thank you for your comment, really appreciate it. Is there any hint page about how such a test case needs to look like?

Add a Comment

I encountered this problem because I loaded mapkit.js as a module.

import "https://cdn.apple-mapkit.com/mk/5.x.x/mapkit.js";

Loading mapkit.js as a module results in an exception because mapkit.js is not compatible with JavaScript's strict mode. You must instead load mapkit.js in sloppy mode.

<script src=""https://cdn.apple-mapkit.com/mk/5.x.x/mapkit.js"></script>
  • Good info. I am not sure if I can do that so easily since I am developing an app with Ionic and Typescript but I will check if there is any way of importing it somehow else.

Add a Comment