About Static Maps
Static maps are a great way to embed a smaller image of the map, pinpointing a specific location marker - see an example here. Static maps can be created for any map, and does not need to be enabled for use. The URL must follow a specific structure to work properly.
Because static maps are generated by a specific URL structure, this provides ease of management when renderings are updated in the future.
The following items can be adjusted when creating a static map:
- Map ID
- Marker Instance ID (polygon, marker, polymarker)
- Zoom Level
- Scale
- Label (custom label name or name of the marker within the CMS)
URL Structure
The structure of the URL to create a custom label for a location is:
https://staticmap.concept3d.com/map/static-map/?map=<MAP ID>&loc=<MARKER_ID>&scale=<SCALE>&label=<LABEL_NAME>&zoom=<ZOOM_LEVEL>
The structure of the URL to use the existing location name is:
https://staticmap.concept3d.com/map/static-map/?map=<MAP ID>&loc=<MARKER_ID>&scale=<SCALE>&label&zoom=<ZOOM_LEVEL>
*Note: The items highlighted in red contain the URL structure. The items in blue will be the customizations you make to the URL. At minimum, the URL must include Map ID and Marker ID. The other parameters are optional to further customize your static map.
<MAP ID> |
The Client MAP ID. |
<MARKER_ID> |
This is the unique ID associated with a location. It can be found by looking at the url when the location is selected or by looking at the Marker Instance ID when using a bulk export. |
<ZOOM_LEVEL> |
Designate a zoom level for the map to be generated on. This is helpful when using a polygon with the static map feature. Default zoom, if no zoom has been specified, is 19. |
<SCALE> |
Designating a scale impacts the number of pixels returned in the static map. Accepted values are: 1 - 512px; 2 - 1024px; or 4 - 2048px. Default scale, if none has been specified, is 1. |
<LABEL> |
Adding “&label” to the URL will look up the marker ID’s label from the Concept3D CMS and display this in the top left of the static map. No label will display unless this parameter is added to the URL. |
<LABEL_NAME> |
If a label that differs from the location title within Concept3D’s CMS is desired, you can add an”=” after the &label parameter and designate a unique label to apply to the static map. Use “%20” between works to indicated a space. |
Sample URLs
https://staticmap.concept3d.com/map/static-map/?map=1216&loc=307883
https://staticmap.concept3d.com/map/static-map/?map=1216&loc=307883&label
https://staticmap.concept3d.com/map/static-map/?map=1216&loc=307883&scale=2&label&zoom=17
https://staticmap.concept3d.com/map/static-map/?map=1216&loc=307883&scale=1&label=Concept3D%20Sample
How to add a URL to your static map on a click event:
To create the best user experience with static maps, we recommend driving traffic back to the interactive map by adding a URL to the code for the static map. This code will enable the static map to be clickable, and return the user to the interactive map for the full experience.
The first URL in the above code is where the user should be directed, either your direct Concept3D map URL, or your custom map URL (should you use a custom URL or CNAME solution).
The second URL in the above code will be the static map URL created in the steps above.
Comments
0 comments
Article is closed for comments.