Locations
The primary elements for constructing an interactive map are locations. Mapplic maps offer the flexibility of an unlimited number of locations, each with its own set of properties.
Location properties
Locations come with built-in properties related to content, visuals, and functionality.
The list of locations can be reordered using drag-and-drop.
Content
Property | Key | Description |
---|---|---|
ID | id * | Unique location identifier. It is also used for connecting to interactive SVG elements. |
Title | title | Display title of the location. |
About | about | Brief description of the location, visible in popups and the directory. |
Thumbnail | thumb | A thumbnail visible in the directory or serves as a marker when the thumbnail type is selected. |
Image | image | Image displayed in popups and the directory grid view. |
Link | link | Relative or absolute URL used for redirects and as the More action button. |
Phone | phone | When set, it includes a button with a phone icon that can show/hide the phone number in popups. |
Hours | hours | When set, it includes a button with a clock icon that can show/hide the opening hours in popups. |
Description | desc | Main location description that supports rich content like links, videos, or other HTML elements. |
Visual
Property | Key | Description |
---|---|---|
Color | color | Hex color of the location marker/element and the main action button. It is ignored for the marker/element when style is set. |
Style | style | Complex marker/element styling, overwrites the color property. Styles can be configured on the appearance panel. |
Label | label | Short string presented in the marker, typically consisting of 1-3 characters. |
Scale | scale | Size of the marker can be adjusted using floating-point values, with 1 representing the default size. |
Type | type | Marker type including options like circle, dot, pin, thumbnail. Use hidden when a visible marker is not required. |
Function
Property | Key | Description |
---|---|---|
Sample | sample | Sample location ID from which to inherit properties. If not set, default values will be inherited. |
Layer | layer | Layer the location belongs to. Locations can also be assigned to all layers. |
Group | group | Groups assigned to the location. To select multiple groups, hold the Ctrl/Cmd key. |
Coord | coord * | X,Y coordinate of the location. The easiest method for modifying coordinates is by drag-and-dropping markers. |
Lat,lon | latlon | Comma separated latitude and longitude coordinate of the location, only available for geocalibrated maps. coord will be ignored when latlon is set. |
Zoom | zoom | Focus zoom level for the location. If left empty, the global max zoom level will be applied. |
Action | action | Action to perform when a location is focused. |
Directory | hide | Hide location from directory. |
Disabled | disable | Disable location. |
Recognizer
To simplify the process of populating locations, Mapplic includes a built-in feature known as the recognizer. This feature iterates through all interactive elements of an SVG and automatically places empty locations at estimated positions based on the bounding box of each element.
The recognizer operates on the selected layer, meaning it needs to be executed individually for each layer.
CSV support
Spreadsheets are among the most common and intuitive methods for data storage. Mapplic can load location data from a CSV file, which is the most widely used format for tabular data.
The header row should include the location property keys, with each subsequent row representing a distinct location.
Location data can be stored in either JSON or CSV format, and it's also possible to have a combination where locations exist in both JSON and CSV files.
JSON location data can be Exported to CSV and linked CSV data can also be Imported.
Samples
Locations can inherit properties from a selected sample location. In order to generate a new sample, simply choose the 'Use as sample' option within the location's sample field.
By default, all locations inherit the Default values
which is the global sample.
One example use case of this feature is setting up available, reserved, and sold samples on a lot map.
- To change the status of a lot and inherit all the properties from the sample (description, style, marker etc.), you only need to modify the location's sample property.
- When a change is needed, simply updating the sample will automatically apply the change to all locations utilizing that sample.
Template variables
Achieving personalized about
and description
properties for a location is made easy through the use of template variables.
Any location property (default or custom) can be rendered by putting it inside {{ }}
brackets.
Welcome to our office in {{title}}.
Feel free to reach out.
Phone: {{phone}}
Email: {{email}}
The above description template will pull in the title, phone and email attributes of the location. This feature is extremely useful when combined with samples.