Lowcoder Documentation
  • Lowcoder overview
    • The "Hello World" walk
  • 🆕Setup and run
    • Cloud & Private Cloud
    • Self-hosting
      • Google Cloud Platform
      • Easypanel
      • Heroku
      • Raspberry Pi
      • Access local database or API
      • Update MongoDB Versions
      • Lowcoder Version Update
      • Traefik loadbalancer
      • SMTP Server
      • Migration from Openblocks
    • Security
  • 🏨Workspaces & Teamwork
    • Workspaces
      • SAAS Mode
      • Enterprise Mode
    • Members and Groups
    • Permissions for Resources
    • OAuth
      • KeyCloak
      • Google
      • GitHub
      • Generic OAuth Provider
    • Query library
    • Lowcoder Marketplace
  • ✨Build Applications
    • Create a new App
      • App(s) Navigation
      • Modules
      • Version and Release Management
    • App Editor
      • Query & Editing Roundtrips
      • Bulk Editing
      • Keyboard shortcuts
      • Data selection & Javascript
      • Layers
      • Visual Components
        • Common Component Settings
        • Messages / Toast
        • Dashboard & Reporting
          • Table
          • Charts and graphs
            • Bar Chart
            • Line Chart
            • Pie Chart
            • Scatter Chart
            • CandleStick Chart
            • Funnel Chart
            • Gauge Chart
            • Graph Chart
            • Heatmap Chart
            • Radar Chart
            • Sankey Chart
            • Suburst Chart
            • Theme River Chart
            • Tree Chart
            • Treemap Chart
            • Mermaid Chart
          • Google Maps
        • Layout & Navigation
          • List View
          • Drawer
          • Modal
          • Navigation
          • Cascader
          • Tree / Tree Select
          • Link
          • Floating Button
          • Text
          • Step Control
          • Page Layout
          • Content Card
          • Tabbed Container
        • Data Collection & Forms
          • Form
          • Input Field Types
          • JSON Schema Form
        • Meeting & Collaboration
        • Project Management
        • Calendar & Scheduling
          • Calendar
          • Date & Date Range
          • Time & Time Range
        • Document & File Management
          • File upload
        • Item & Signature Handling
        • Multimedia & Animation
          • Image
        • Integration & Extension
        • Legacy & Deprecated
      • Option lists
      • Date handling
      • Use Markdown
    • App Interaction
      • Event handlers
    • Themes & Styling
      • Design an efficient and user-friendly form
      • Customize Styles
      • Component Styling Possibilities
    • Video Calls in Lowcoder
  • 🚀Connect your Data
    • Data source basics
      • Configure IP allowlists
    • Data sources in Lowcoder
      • APIs as Datasource
        • REST API
        • GraphQL
        • Google Sheets
      • SQL Databases
        • MySQL
        • MariaDB
        • Supabase
          • Supabase PostgreSQL
          • Supabase Assets API
          • Supabase RealTime
          • Supabase OAuth
        • PostgreSQL
        • Microsoft SQL Server
        • Oracle
      • NoSQL Databases
        • MongoDB
        • CouchDB
        • DynamoDB
      • InMemory Databases
        • Redis
      • File Storages
        • S3 File Storage
      • BigData & OLAP
        • Big Query
        • Snowflake
        • ClickHouse
        • Elasticsearch
      • Websocket Datasource
    • Query basics
      • Bind Query Data to Components
      • Query library
  • 🪄Workflows
    • n8n Integration
  • 💫Business Logic in Apps
    • Write JavaScript
      • JavaScript query
      • Temporary state
      • Transformers
      • Data responder
      • Built-in JS functions
  • 🙌Publish Apps
    • Share an App
    • Publish an App
    • Embed an App
      • Embed App in HTML Pages
      • Embed App in WordPress Pages
      • Embed Apps in React
      • Embed Apps in NEXT.JS
      • Native embed SDK
        • Build the SDK from Source
  • 🔥Lowcoder Extension
    • Opensource Contribution
      • Develop UI components for Apps
      • Develop Data Source Plugins
    • Use third-party libraries in Apps
      • Day.js Date handling
      • Import your own JavaScript Library
    • Custom component
    • Lowcoder Open REST API
  • Lowcoder for Enterprise
    • Custom branding
Powered by GitBook
On this page
  • Using Geomap in Lowcoder
  • Dynamic Data & Function binding
  • Setting Geo-Markers & JavaScript Access
  • Google Maps API Key

Was this helpful?

  1. ✨Build Applications
  2. App Editor
  3. Visual Components
  4. Dashboard & Reporting

Google Maps

PreviousMermaid ChartNextLayout & Navigation

Last updated 24 days ago

Was this helpful?

LogoLogo

More to try...

  • Lowcoder Website
  • Free Cloud Platform
  • Github
  • Discord

© Lowcoder Software LTD

Lowcoder offers an innovative approach to integrating Geomaps from Google with an advanced geo-data-based overlay of eCharts, providing a dynamic and interactive mapping solution. This integration is particularly powerful for applications requiring real-time data visualization on geographical maps.

The core feature of this integration is the seamless combination of Google Geomaps with eCharts overlays. Google Geomaps provides a robust and familiar mapping interface, known for its detailed and accurate geographical data. By overlaying eCharts, Lowcoder enables the addition of rich, interactive data visualizations directly onto these maps. This overlay capability is not just about static data representation; it supports dynamic, real-time data updates, making it ideal for applications that require up-to-the-minute information, such as traffic monitoring, weather updates, or tracking movements in logistics.

Lowcoder ensures that the data displayed in the eCharts overlay is not only current but can also be updated in real-time with the Stream Query. This is crucial for scenarios where timely data is essential for decision-making. Users can see changes as they happen, providing an interactive and engaging experience.

The eCharts overlay on Google Geomaps in Lowcoder also offers a high degree of customization and interactivity. Users can zoom in and out, pan across different regions, and interact with the data points on the map. This interactivity is enhanced with tooltips, clickable elements, and various chart types like heatmaps, scatter plots, or line graphs, all geo-referenced and layered over the map.

Using Geomap in Lowcoder

As the first step, place a new Chart from the right Components panel on the canvas.

Now you can select in the Component Properties the type "Map"

You can use the Properties "Zoomlevel, Longitude, and Latitude" to define the first impression of the GeoMap when the App is displayed.

In Version Lowcoder 2.1.x the eCharts Map is configurable like other eCharts by the "Options JSON"

For more and deeper information check the eCharts documentation. https://echarts.apache.org/en/api.html#echartsInstance.setOption

As eCharts is already integrated into Lowcoder, you only need to prepare and set the Options-JSON Data. The configuration follows the standard eCharts notation.

In the data section, you have nevertheless the possibility not only to set chart data but also the geo-point (lat, long), where the chart data should be displayed. Each Object in the data array will be one chart element on the map.

The section "encode" helps to tell the eCharts Map, which entry (array index number) of the data-array-element represents latitude, longitude, and the value to display.

{
  "tooltip": {
    "trigger": "item"
  },
  "animation": true,
  "series": [
    {
      "name": "Population",
      "type": "scatter",
      "coordinateSystem": "gmap",
      "itemStyle": {
        "color": "#00c1de"
      },
      "data": [
        {
          "name": "Azerbaijan",
          "value": [
            47.395,
            40.43,
            8352021
          ]
        },
        {
          "name": "Albania",
          "value": [
            20.068,
            41.143,
            3153731
          ]
        }, <...>
      ],
      "encode": {
        "value": 2,
        "lng": 0,
        "lat": 1
      }
    }
  ]
}

Dynamic Data & Function binding

As in other components of Lowcoder, you can bind data and functions dynamically to the map.

{
  "tooltip": {
    "trigger": "item"
  },
  "animation": true,
  "series": [
    {
      "name": "Company Size",
      "type": "scatter",
      "coordinateSystem": "gmap",
      "itemStyle": {
        "color": "#9d4edd"
      },
      "data": {{mapData.value}},
      "symbolSize" : {{function (val) {return window.mapValueToSize(val[2])}}},
      "encode": {
        "value": 2,
        "lng": 0,
        "lat": 1
      }
    }
  ]
}

In this case, the App-global function "mapValueToSize" is bound to the map settings, so the size of the Scatter Plot dots can be dynamically adjusted based on the "value" - of the mapped data.

Setting Geo-Markers & JavaScript Access

In Version 2.1.x the possibility to place Geo-Markers on the map is possible via Javascript by accessing the maps object.

Here you can see the possibility to access the "gmap" object by the new function of the eChart Component "getMapInstance()". The gmap object is the well-known Google Maps Javascript Object, on which you can execute all typical operations.

const renderMarker = async function () {
  const gmap = await chart1.getMapInstance ();
  var london = {lat: 51.5074, lng: -0.1278};
  var marker = new google.maps.Marker({
      position: london,
      map: gmap,
      title: 'Welcome to London!'
  });
}
renderMarker ();

Google Maps API Key

When you publish your app, an Google Maps API Key must be in place to display the App accordingly. Use https://console.cloud.google.com/apis/dashboard to create your API Key.

To display only the Map and use the JavaScript API, "Map Embed API" and "Maps JavaScript API" need to be activated.

Now you can create and see your Google Maps API Key. It is suggested that you limit the Traffic by a Domain or IP Range.

Properties of the Google Map

These properties are accessible in {{ }} notations, as well as in JavaScript Queries.

Property Name
Type
Description

data

Array

Returns an Array containing the data fed to the chartsGeooMap component

lastInteractionData

Object

Returns an Object containing the details about the Location point, which a User interacted most lately

selectedPoints

Array

title

String

Returns title of the Chart

Events

Events give you the ability to trigger further actions (with Event-Handlers).

Event Name
Description

MapReady

MapReady event gets triggered when Map is completley loaded, and is ready for the User interaction.

Zoom Level Change

This event gets triggered when Zoom level of the Map is changed.

Center Position Change

This event gets triggered when Map is dragged and it's center position changes OR when default lat, lon are changed.

Methods

You have the capability to engage with components via their respective methods, which can be accessed by their designated names within any segment where JavaScript is utilized. Additionally, these components can be activated through the 'Control Component' action, which is triggered in response to specific events.

getMapCenterPosition() :

chartsGeoMap1.getMapCenterPosition() method returns an object that contains the center position of the Geo Map i.e, lat, long.

chartsGeoMap1.getMapCenterPosition();

getMapInstance() :

chartsGeoMap1.getMapInstance();

getMapZoomLevel() :

chartsGeoMap1.getMapZoomLevel() method returns the current Zoom level on the Geo Map.

chartsGeoMap1.getMapZoomLevel();
Distribution of Lowcoder Users worldwide (10.2023)