Embedding Google Maps

29 views
Skip to first unread message

Julien

unread,
Apr 25, 2023, 2:45:20 PM4/25/23
to PreTeXt support
Hi all,

I would like to embed a Google Map in a PreTeXt document?

Is it possible to do that just like it is possible to embed a Desmos graph, for instance?

Thanks for your help,
Julien


Rob Beezer

unread,
Apr 25, 2023, 3:11:23 PM4/25/23
to pretext...@googlegroups.com
There is a version of "interactive" which has an "iframe" attribute. Perhaps that would do the trick?

I can't check details easily for a while. Look in sample article for a "PhET" example interactive to mimic?

Rob

Julien

unread,
Apr 25, 2023, 4:19:58 PM4/25/23
to PreTeXt support
This does the trick.
It suffices to click on share/embed to obtain the correct iframe source.

Thanks a lot Rob.

Rob Beezer

unread,
Apr 25, 2023, 6:53:25 PM4/25/23
to pretext...@googlegroups.com
Great! Thanks for the ACK.

Post your one line of code here if you wish and I'll add it to the sample article?

Julien

unread,
Apr 27, 2023, 7:32:41 PM4/27/23
to PreTeXt support
Here is some code that allows to embed a Google Map of California in e PreTeXt document.
Note that the iframe https address was obtained by using the sharing capabilities of Google Maps.

Rob Beezer

unread,
Apr 27, 2023, 8:41:52 PM4/27/23
to pretext...@googlegroups.com
Very good! Thanks.

Rob Beezer

unread,
May 1, 2023, 1:29:05 PM5/1/23
to pretext...@googlegroups.com
Now incorporated into the sample article as Figure 15.7. HTML, and static in
PDF. Thanks, Julien, for the question and the contribution.

Figure 15.7
https://pretextbook.org/examples/sample-article/html/section-interactive-server.html#map-california
Reply all
Reply to author
Forward
0 new messages