One of the reasons why Embed Google Maps Pro was developed was to embed pre-existing public maps or custom maps created with Google My Maps.

Usually, this would require one to enable IFRAME or HTML macros in their Confluence Server. This immediately allows all users to insert arbitrary IFRAMES or HTML code into Confluence, which is often not desired.

Instead, this macro accepts a URL or the HTML source from Google's share map dialog and verifies that it leads to a Google Map Then, it creates an IFRAME and displays it on the page.

For further styling, it exposes all HTML attributes that exist for an IFRAME as macro parameters – so the user can set this up and blend the resulting IFRAME into the style of the page or the website of which the page is part.

Parameters

  • href - required, the link to the Google Maps content, as returned by Google Maps in the "Link" dialog
  • frameborder - (optional) HTML attribute for the resulting IFRAME tag, defaults to "0"
  • height - (optional) HTML attribute for the resulting IFRAME tag, defaults to "350"
  • marginheight - (optional) HTML attribute for the resulting IFRAME tag, defaults to "0"
  • marginwidth - (optional) HTML attribute for the resulting IFRAME tag, defaults to "0"
  • scrolling - (optional) HTML attribute for the resulting IFRAME tag, defaults to "no"
  • width - (optional) HTML attribute for the resulting IFRAME tag, defaults to "425"
  • id - (optional) HTML attribute for the resulting IFRAME tag
  • class - (optional) HTML attribute for the resulting IFRAME tag
  • style - (optional) HTML attribute for the resulting IFRAME tag
  • title - (optional) HTML attribute for the resulting IFRAME tag
  • longdesc - (optional) HTML attribute for the resulting IFRAME tag
  • name - (optional) HTML attribute for the resulting IFRAME tag

Probably most interesting ones in the context of styling will be idclass, and style

Example

{googlemaps-embed:href=https://www.google.com/maps/embed?pb=!1m14!1m12!1m3!1d48024.72087282973!2d174.80579862910156!
3d-41.20989114999999!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!5e0!3m2!1sen!2snz!4v1609204011360!5m2!1sen!2snz|
width=600|height=450|frameborder=0|style="border:0"}

Other Embed Google Maps Pro articles

Try for free

Embed Google Maps Pro

Try for free