<embedmap>
Integrates a map that can be interacted with in the display view of a board. With this tag, you can define the position, height, width, map, and map tools enabled for the embedded map. Additionally, you can associate the embedded map with the records that are being displayed by the <eocrepeatallrecords> tag on the same view.
Once embedded, users can interact with the map by clicking records in the list view that trigger a map embedded on the same page to zoom to the feature and display label. Any applied view filters for the record list are automatically applied to the embedded map, and users can further view a small-scale legend on the map that helps them distinguish different statuses and colors.
Attribute | Allowed Values | Requirements | Description |
---|---|---|---|
id |
CDATA |
Optional |
Unique identifier for the embedded map, used by the target attribute for <feature> tags. |
width |
NUMBER |
Optional |
Width of the embedded map, either as a percentage or number of pixels. |
height |
NUMBER |
Optional |
Height of the embedded map, either as a percentage or number of pixels. |
map-name |
%mapname |
Optional |
Specifies the embedded map should display a map other than the default map. |
page-data |
(enabled | disabled) |
Optional |
Indicates whether the embedded map should only display the display view's current page of records. |
scrolling |
(auto|np|yes)auto |
Implied |
Determines whether to allow scrolling if the content does not fit in the defined embedded view. |
side-menu |
enabled|disabled |
Optional |
Set to "enable" to enable the side navigation menu in the embedded map. |
view |
%viewname |
Optional |
Allows users to click a feature to open a view of the associated record. This attribute is available only to clients who have the Maps Add-on. |
enableheader |
(true|false) |
Optional |
When set to "true", adds a header to the map where a user can draw features on the map along with an address tool. |
onfeaturecreated |
text |
Optional |
Allows user to specify the name of a JavaScript function in the view file to be called when a feature is created. When the feature is created, the function will be called with the newly created WKT data passed in as a parameter. This attribute is only useful when enableheader is set to "true". |
map-auto-refresh |
(true) |
Optional |
Determines if the map layers will automatically refresh. |
includeboardlayers |
(true|false) |
Optional |
When set to "true", external board layers on the source map are also rendered on the embedded map. The default setting is "true". |
hidedefaultlayer |
(true|false) |
Optional |
When set to true, the default layer is hidden on the embedded map. |
defaultlayername |
text |
Optional |
|
-
When embedding a map, a difficulty may arise in terms of record and map updates. To specify which sections of the boards should update and when, you may find it useful to use the updatesection attribute.
-
The <feature> tag is required in the view in order to show records on an embedded map.
Example
<div class="right">
<embedmap id="MyMap" class="map" scrolling="no" height="100%" width="100% map-name="GA Hospitals"
page-data="enabled"></embedmap>
<div>