Map component
Show location-based records on a map with markers.
Use a Map component on a page to display records with location data. It works well for visits, deliveries, service areas, projects, and site records.
Before you add a Map component, make sure your table has:
A Location field with valid values
Clear record names so markers are easy to identify
Fields to filter the records if the map should show only relevant ones
Add a Map component to a page
Open the Add tab
In the Settings panel, open Add.
Add Map
Under Views, drag Map to the preferred location on the page.
Label the component
Ninox generates the Label and Internal name automatically. You can update both values if needed.
Configure the Map manually
Under Behavior:
Keep Constant selected as the data point option.
Choose the source Table.
Select the Location field that determines each marker's position.
Select the Color field to use dynamic marker colors.
Review the displayed markers
Check whether the expected records appear in the right places. Then drag the component to move it on the page. Use the resize handles to adjust its size.
Map component settings
In On the form, you can define the basic component details:
Label for the title shown on the component
Internal name is filled automatically. Change it only if needed and carefully. When you script, you use Internal name, not Label.
Under Behavior, configure how the map works on the page:
Data point to set up data retrieval. Use Constant to configure it with controls, or Logic to use Ninox Script. If Data point is set to Constant:
Table to choose the source table
Location field to choose which field places markers on the map
Title field to choose which field Ninox shows if you hold the cursor over the marker
Color field to choose which field defines the marker color
Map type to choose the default map style as Roadmap, Satellite, Hybrid, or Terrain
Initial view sets either Show all markers or Center on the user's location as the map's focus when it opens.
Filter to limit which records users can see with one or more conditions
Show search field to show a search field at the top of the map to search a location If Data point is set to Logic:
Logic to add the Ninox Script that retrieves the data. In this case, Ninox expects the values and optional layout setting in a JSON language style as key-value pairs in curly braces {...}. Map expects an array of marker objects. The required property is:
locationbuilt asname + " <" + text(latitude) + "," + text(longitude) + ">"
Optional:
titlefor the label of the locationcolorfor the marker color
Have a look at the example below.
Under Visibility, choose how the component is shown on the page:
Visible: shows the component on the page.
Hidden: hides the component on the page.
Conditional: defines a Visibility condition that controls when the component is shown or hidden.
Use Conditional when the component should appear only in specific cases.
Build the condition based on user roles, Tables, or Fields.
This only affects what is shown on the page. It does not change records or permissions.
Let's take a look at an example:
When you use Logic data retrieval, structure the script like this:
Use this prompt to create the script with Ninox AI: "Please show me the addresses of all customers."
Last updated
Was this helpful?