Can a map be added to a .ics file?

2.4k views Asked by At

When setting the location of an event in Calendar on a Mac it offers suggestions which when clicked embeds a map into the event. Is it possible to embed a map into a .ics file so that the map shows once imported? It seems that simply setting LOCATION when creating the calendar file isn't sufficient.

I've scanned RFC 2445 but can't find anything to help.

My assumption is that to embed a map into the event the user needs to specifically select a location from the suggestions offered when typing and that this can't be done automatically on import. Is my assumption correct?

1

There are 1 answers

1
Auberon Vacher On BEST ANSWER

short-answer: NO you cannot embed a map in the .ics file, but your calendar render could do it by parsing .ics file

long-answer:

RFC2445 was supersed by RFC5545

RFC5545 specifies in section 8.3.4, the following data types of which none allow you to have a map in an .ics file:

     +-----------------+---------+--------------------------+
     | Value Data Type | Status  | Reference                |
     +-----------------+---------+--------------------------+
     | BINARY          | Current | RFC 5545, Section 3.3.1  |
     |                 |         |                          |
     | BOOLEAN         | Current | RFC 5545, Section 3.3.2  |
     |                 |         |                          |
     | CAL-ADDRESS     | Current | RFC 5545, Section 3.3.3  |
     |                 |         |                          |
     | DATE            | Current | RFC 5545, Section 3.3.4  |
     |                 |         |                          |
     | DATE-TIME       | Current | RFC 5545, Section 3.3.5  |
     |                 |         |                          |
     | DURATION        | Current | RFC 5545, Section 3.3.6  |
     |                 |         |                          |
     | FLOAT           | Current | RFC 5545, Section 3.3.7  |
     |                 |         |                          |
     | INTEGER         | Current | RFC 5545, Section 3.3.8  |
     |                 |         |                          |
     | PERIOD          | Current | RFC 5545, Section 3.3.9  |
     |                 |         |                          |
     | RECUR           | Current | RFC 5545, Section 3.3.10 |
     |                 |         |                          |
     | TEXT            | Current | RFC 5545, Section 3.3.11 |
     |                 |         |                          |
     | TIME            | Current | RFC 5545, Section 3.3.12 |
     |                 |         |                          |
     | URI             | Current | RFC 5545, Section 3.3.13 |
     |                 |         |                          |
     | UTC-OFFSET      | Current | RFC 5545, Section 3.3.14 |
     +-----------------+---------+--------------------------+

To achieve what you want to do, your calendar renderer needs to parse either the calendar property LOCATION (see 3.8.1.7) which is a string, or better if you have it you could parse the propertyGEO (see 3.8.1.6 ) which is two floats giving longitude and latitude.