Genio offers a Map pattern with customization capabilities based on the special renderings pattern.
leaflet-map
google-map
Drawing features can be activated when a Map special rendering is used over a Geographic shape or a Geometric coordinates type field.
It's also possible to edit or delete the drawn shapes by activating the edit mode.
If not specified, the used CRS will be
EPSG:4326
, which is the identifier of WGS84, one of the most common standards, used in most map libraries.
However, if necessary, the CRS can be customized by setting the crs
style variable. The value to use for the variable can be either the code of the CRS, if recognized (see list below), or it's full definition using the PROJ.4 nomenclature.
By default, the map already recognizes the following CRS codes:
EPSG:4326
EPSG:3857
EPSG:4269
EPSG:3785
EPSG:900913
EPSG:102113
If the desired CRS is not on the list, then the full definition can be retrieved from the EPSG website. Just search for the code of the desired CRS, scroll down to the "Export" section and choose the PROJ.4 option, copy the text and set it as the value of the crs
style variable.
Through the usage of config/style variables, the appearance and available features in the map can be customized. Below, there's an example image of which variable activates/deactivates each of the available features.
Name | Type | Description | Mandatory | Allows Multiple Mappings | Admitted Values | Default |
---|---|---|---|---|---|---|
geographic-data | Mapping | The data to be displayed on the map. Must be mapped to a geographic field type | () | |||
marker-description | Mapping | A description of the marker | ||||
marker-icon | Mapping | The icon that will be displayed on the map to mark the coordinates | ||||
marker-followup | Mapping | Overrides the followup obtained from the menu structure. Must be mapped to a text field that contains the URL of the target page | ||||
layer-name | Mapping | A text with the name to give to the map layer, shapes with the same layer name will be grouped | ||||
zoom-level | Style | The initial zoom of the map | 2 , 4 , 6 , 8 , 10 , 12 , 14 , 16 , 18 |
2 |
||
fit-zoom | Style | Whether or not to fit the zoom so all the available markers become visible | true , false |
true |
||
disable-search | Style | Whether or not to disable the search of the map | true , false |
false |
||
disable-controls | Style | Whether or not to disable the controls of the map | true , false |
false |
||
center-coord | Style | The initial coordinates where to center the map | POINT(0 0) |
|||
enable-address-search | Style | Whether or not to enable the address search button for the markers | true , false |
false |
||
show-sources-in-description | Style | Whether or not to show the name of the source (the label of either the form field or the column) in the description of the marker | true , false |
false |
||
collapse-layer-options | Style | Whether or not to collapse the container to choose the layer | true , false |
false |
||
crs | Style | The CRS of the coordinates (should be either a known EPSG code or a PROJ.4 definition) | EPSG:4326 |
|||
map-height | Style | The height of the map | 75vh |
|||
allow-markers | Style | Whether or not markers can be drawn on the map | true , false |
true |
||
allow-polylines | Style | Whether or not polylines can be drawn on the map | true , false |
true |
||
allow-polygons | Style | Whether or not polygons can be drawn on the map | true , false |
true |
||
allow-edit | Style | Whether or not shapes can be edited | true , false |
true |
||
allow-drag | Style | Whether or not shapes can be dragged | true , false |
true |
||
allow-cutting | Style | Whether or not shapes can be cut | true , false |
true |
||
allow-removal | Style | Whether or not shapes can be removed | true , false |
true |
||
allow-rotate | Style | Whether or not shapes can be rotated | true , false |
true |
||
shape-outline-weight | Style | The thickness of the shapes border/outline | 7 |
|||
polyline-color | Style | The color of the polylines outline | #079ede |
|||
polygon-color | Style | The color of the polygons outline | #118f13 |
|||
circle-color | Style | The color of the circles outline | #f53505 |
|||
group-markers-in-cluster | Style | Whether or not markers will be grouped in clusters | true , false |
true |
(): Will only be mandatory in tables, in geographic/geometric fields from the database the value will be implicitly mapped.
The complete changelog of all notable changes made to Special Renderings - Maps. Descriptions are written as New: or Fixed: for changes that are not considered a maintenance release.