Embedding interactive maps into trip reports?

Check here for updates to the forum and site.
Forum rules
  • This is a mountaineering forum, so please keep your posts on-topic. Posts do not all have to be related to the 14ers but should at least be mountaineering-related.
  • Personal attacks and confrontational behavior will result in removal from the forum at the discretion of the administrators.
  • Do not use this forum to advertise, sell photos or other products or promote a commercial website.
  • Troll posts will be removed.
For more details, please see the Terms of Use you agreed to when joining the forum.
Post Reply
User avatar
supranihilest
Posts: 722
Joined: 6/29/2015
14ers: 58  42 
13ers: 709 1 8
Trip Reports (112)
 
Contact:

Embedding interactive maps into trip reports?

Post by supranihilest »

Is there any way to embed an interactive map into a trip report? For example, I attempted to embed a Caltopo map I made, showing unmarked parking areas and trailheads, into a TR by using an HTML iframe and entering the embed code into the source code under the Report Text/View menu. This actually worked great - until I saved the report, at which point the TinyMCE parser stripped the iframe element from the code, as I expected it would. Here's some screenshots of the embed prior to saving the report, showing that the functionality is potentially there.
interactive_tr_map1.jpg
interactive_tr_map1.jpg (108.23 KiB) Viewed 3002 times
interactive_tr_map2.jpg
interactive_tr_map2.jpg (88.44 KiB) Viewed 3002 times
Note that this actually works to this point. When I select the map in the editor it shows as a media object. I can zoom in and out on the map. I can even resize it to show more of the map. The editor shows the paragraph and iframe elements (at the bottom of the second screenshot).
interactive_tr_map4.jpg
interactive_tr_map4.jpg (88.26 KiB) Viewed 3002 times
However when I save the TR the iframe gets stripped out, and rightfully so; one could do a lot of mischievous things with embedded iframes from unapproved sources. However, this would be an amazingly useful feature, the ability to embed interactive maps into TRs. Just look at how popular and useful the GPX upload maps are, the Google ones. I personally find those crazy useful, and the ability to embed a similar Google or Caltopo map anywhere into a TR would be so cool. Is this something that could be enabled? Something that might just need maps.google.com and caltopo.com whitelisted as embed objects? Something else? Obviously the input is being sanitized when saved (again, rightfully so to prevent various attacks) but man, I'm all jazzed up by the potential.
User avatar
BillMiddlebrook
Site Administrator
Posts: 6916
Joined: 7/25/2004
14ers: 58  46  19 
13ers: 172 44 37
Trip Reports (2)
 
Contact:

Re: Embedding interactive maps into trip reports?

Post by BillMiddlebrook »

Yes, it would be useful to have more than the G-Map and GPX upload process that currently exists in a TR. Let me look into it to see if there’s a good way I can allow embedded map content.

Thanks!
"When I go out, I become more alive. I just love skiing. The gravitational pull. When you ski steep terrain... you can almost get a feeling of flying." -Doug Coombs
User avatar
SchralpTheGnar
Posts: 1890
Joined: 2/26/2008
14ers: 51  49  1 
13ers: 38 30
Trip Reports (22)
 

Re: Embedding interactive maps into trip reports?

Post by SchralpTheGnar »

Just say no to iframes
User avatar
supranihilest
Posts: 722
Joined: 6/29/2015
14ers: 58  42 
13ers: 709 1 8
Trip Reports (112)
 
Contact:

Re: Embedding interactive maps into trip reports?

Post by supranihilest »

BillMiddlebrook wrote: Fri Nov 15, 2019 6:17 pm Yes, it would be useful to have more than the G-Map and GPX upload process that currently exists in a TR. Let me look into it to see if there’s a good way I can allow embedded map content.

Thanks!
Thank you for looking into it! If you need someone to do some testing you've got your first guinea pig right here.
Post Reply