CanvasMap
Getting Started Tutorials 3D Reference

Using iframes to put CanvasMaps into other Web Pages

Web pages containing CanvasMaps can become quite large over time, sometimes over 1000 lines of code. You may also want to have additional content around your maps or use them with a content management system such as WordPress. An easy way to manage CanvasMap web pages is to put them in a separate HTML page and then include them into another web page using "iframe" tags. Note that the old "frame" tag has been replaced by the "iframe" tag which is well supported in browsers.

<iframe width="400" height="440" style="border:2px black solid;margin:6px" src="https://gsp.humboldt.edu/CanvasMapWebsite/Examples/Thematic_Africa.html">
<p>Your browser does not support iframes.</p>
</iframe>

Note that iframes are similar to HTML 5 Canvas elements and have specific attributes for the "width" and "height" of the element in pixels. The "src" attrbribute specifies the URL for your CanvasMap page and can be a local or global URL.