EddyVerbruggen / Calendar-PhoneGap-Plugin

:date: Cordova plugin to Create, Change, Delete and Find Events in the native Calendar
773 stars 402 forks source link

X-APPLE-STRUCTURED-LOCATION - show Location in iOS / Apple Calendars? #369

Open DanielDornhardt opened 7 years ago

DanielDornhardt commented 7 years ago

Hi, first: thanks for the amazing package of course! It's great stuff, saver of (Programmer)- Lives and full of fluffy amazing features.

Now there's one thing we'd like to do we can't figure out how to do:

On iOS devices (and in the mac apple calendar), we'd like to see the map of the location of the event.

Unfortunately it seems that apple has some kind of proprietary / custom field with some weird stuff inside to make that happen.

It looks similar to this (in the iCal files / VCAL format I think):

LOCATION:367 George Street\nSydney CBD NSW 2000 X-APPLE-STRUCTURED-LOCATION;VALUE=URI;X-ADDRESS=367 George Street\nSydney CBD NSW 2000;X-APPLE-RADIUS=72;X-TITLE=367 George Street:geo:-33.8689 97,151.206775

See eg here: https://github.com/collective/icalendar/issues/116

The thing is, whatever is X-APPLE-STRUCTURED-LOCATION I'd be happy to figure out by myself; but I don't think I can set it anywhere using Calendar-PhoneGap-Plugin now, or can I?

I tried to add it to calOptions and set it this way and also tried to concatenate it onto the eventLocation, but also to no avail.

SOOO is there a way to add the apple structured location stuff? With this plugin or some other way (preferably without custom iOS module building?) Or maybe is there some other way to get the iOS calendars to cooperate?

Thanks and best wishes, have a great year everybody!

EddyVerbruggen commented 7 years ago

Hi!

Interesting question. I found that there's 2 ways:

  1. Pass in lat / lng coordinates of the address (but that's not currently supported by the plugin
  2. Pass in a correctly structured address. This is very picky. I found my address would show up on the map if I did: location: "Hof der Kolommen 34\n3823 ED Amersfoort\nNetherlands"

Can you test that second method as well? If that doesn't suffice we need to try and add option 1, but that would require a bit of sponsoring to prioritize this feature.

Eddy