Create Leaflet Maps
Overview
The Leaflet Map Widget in AIV allows users to customize maps by visualizing data at various geographic levels, such as country, state, city, or specific coordinates. Its advanced features enable tailored, interactive maps for detailed geographic analysis, providing deeper insights into location-based data.
Prerequisites
To create a Leaflet Map Widget, you need to have a working dataset configured via JDBC.
Objective
To create a Leaflet Map Widget.
Steps to create a Leaflet Map Widget in AIV:
-
From the Left Vertical menu, click on the Map Widget icon. This will open the edit menu.
-
When you click the Map Widget icon, the widget will automatically be added to the content area of your dashboard.
-
Enter the following details in the Leaflet Map:
-
Map Type: Latitude -Longitude
-
Latitude: Latitude
-
Longitude: Longitude
-
Dataset: Customer_details.ds
-
Location: City
-
Value: Yearly Income -Person
-
Aggregation: Sum
-
-
Click the Publish button, then the Preview icon, and finally click on the SAVE AND EXIT button to view the Leaflet Map Widget.
-
Compare your Leaflet Map Widget setup with the example shown below to ensure it matches the expected output:
Route Map Feature
The Route Map feature displays route lines on the map using user-provided data from datasets. In AIV, this feature allows users to visualize the route between a source and a destination seamlessly, providing an intuitive way to track and display routes on the map.
How to Use the Route Feature in the Map Widget
- Select the Dataset and Define Values Choose the appropriate dataset, then map the following values:
- Map Type: select the
Latitude - Longitude
from dropdown - Location: Source Country
- Latitude: Source Latitude
- Longitude: Source Longitude
- Value: Sales
- Aggregation: Sum
- Configure the Map
Go to Formatting, From the General Map Appearance section, set the Map Type as
Route
. This will allow you to format the destination fields. Select theDestination Latitude
andDestination Longitude
.
- Publish the Dashboard Click on the Publish button to save and view the dashboard with the map displaying the route between the source and destination.