embed : A simplified map viewer for publishing a map on a third party site
How to embed a map from cartostation in another site?
The simplest solution consists in copying the code proposed on a map in the atlas application, and to insert it in the HTML code of the page of your site.
Note : In the case of a manual embed, the person creating the iframe must make sure that the map url points to the application embed, and not to atlas.
Profile selection
Different profile types are available:
- Map with legend
- Map with tools
- Simple map
“Map with legend” profile
- Language switch
- Link to Atlas
- Title
- Description
- Caption
- Display information when clicking on the map
“Map with tools” profile
Simple Profile +
- Address search
- Zoom buttons
“Simple map” profile
- Language switch
- Link to Atlas
- Display information when clicking on the map
Language selection
The language selection of the embedded map is taken from the interface’s language of the user. It is still possible to change the language afterward by editing lang=fr, lang=nl or lang=en in the URL of the code of the embed.
To get additional information about the URL format, you can check out the details of the URL format structure at the bottom of this page.
Iframe size
Maps embedded in third-party sites are generally constrained by the layout in which the iframe will be inserted.
However, it is still important to adjust the size of the iframe to the content of the map, particularly in terms of the size of the description, the legend and the information available.
A size of 1000x600px is generally the minimum required to display the information comfortably.
Recommended practices for creating maps intended to be placed in an iframe
- Adjust the map content to match the editorial content of the site. If the content and context of the map are already included in the site page, the map description can be concise. Its title can also be adapted.
- Use a simple, understated legend
Practices to avoid
Embedding an Atlas map in an iframe is not recommended. An Atlas map includes many additional tools and is not suitable for use on a third-party site.
A button is available from the embed iframe to view the map with all its tools in the Atlas of the mapping portal.
Visibility of the application
embed is an application that is not intended to be visible as a stand alone application in the user menu. However, it must be activated during cartostation deployment to be usable.
This application is automatically used when the third party site publication code is copied from the corresponding widget in atlas.
Creating embed URLs manually
It’s recommended to use the embed creation system in the interface as seen above. It’s still however possible to configure embedded maps manually. URLs are structured according to the following model:
[deployment-url]/client/embed/[map-ID]?profile=[profile-type]&lang=[language_code]
The available profile types are the following:
simplewhich is “Map with legend”all-toolswhich is “Map with tools”full-screenwhich is “Simple map”