The Embedding API

From University Map Wiki
Revision as of 10:38, 27 June 2012 by jw35 (talk | contribs) (Imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

To embed a map in another web page, simply use an IFRAME, like this:

 <iframe src=url>(non-iframe text)</iframe>

where url is a standard map linking URL - see The Map URL API. For example:

 <iframe src=""></iframe>

Typically your CSS will set the width and height of the IFRAME, though you can also do this directly:

 <iframe src="" style="width: 400px; height: 400px;"></iframe>

The presentation is slightly different from the full page for the same URL in that only the map is displayed without any ancillary information, titling, branding etc. On small touch screen devices, any touch on the map will jump to the corresponding map page for more detailed presentation, so it just acts as a link. On larger browsers there is also a small control in the corner offering a menu including a link to the main map. (note: the map determines its presence within an iframe using a Javascript test).

We suggest not using the bounding box or ref form of URL for embedding a map relevant to an institution. By using the simple name of the institution or its code, then the map will

  • adjust if the institution moves (using  a bounding box or building reference leaves it showing the old geographical location)
  • centre on the institution concerned 
  • show a marker for just the institution concerned, not all of its neighbbours