4 min readUpdated Mar 2, 2026

EventMapTile Documentation

Overview

The EventMapTile component is designed to provide an interactive map interface that visualizes event data based on geographical locations. It integrates with a backend service (e.g., GDELT) to fetch event data that can be displayed as clusters on a map. Users can search for events by location or topic, and the map is capable of displaying different styles and configurations through customizable settings. The EventMapTile is particularly useful for businesses or applications focused on event tracking, geographical analytics, or real-time incident reporting.

Settings

The EventMapTile component accepts a variety of settings that determine its appearance and behavior. Below is a detailed breakdown of each setting:

  1. mapStyle

    • Input Type: Dropdown (String)
    • Description: This setting defines the visual style of the map. Changing this value alters the aesthetics of the map (e.g., light, dark, or standard views).
    • Default Value: osm (OpenStreetMap style).
    • Effect of Change: Switching to different styles (e.g., dark, voyager) affects the color scheme and overall visual feel of the map.
  2. markerColor

    • Input Type: String (Hexadecimal color)
    • Description: Specifies the color of the markers used to represent events on the map.
    • Default Value: #ef4444 (a shade of red).
    • Effect of Change: Changing this value modifies the color of both clustered and unclustered event markers, allowing for customized accent colors.
  3. defaultQuery

    • Input Type: String
    • Description: Defines the default search term displayed in the search input when the map loads.
    • Default Value: '' (empty string).
    • Effect of Change: Setting a default query allows users to view pre-defined events for a specific location or topic immediately upon loading the map.
  4. defaultTimespan

    • Input Type: Dropdown (String)
    • Description: Pre-defines the period over which to search for events.
    • Default Value: '1d' (24 hours).
    • Effect of Change: Changing this value adjusts the historical range of events displayed on the map (e.g., 15 minutes, 1 hour, 1 day, etc.).

Functionality

The EventMapTile fetches and displays event data based on user input. It uses the lifecycle management hook to initialize the map upon component mount and the optimized callbacks hook to perform search actions efficiently. The event data is retrieved via an API call built with fetch, and it effectively handles loading states, error messages, and user interactivity with map controls.

Data Expectations

The component expects to receive the following data:

AI Integrations

The EventMapTile does not explicitly integrate AI functionality. However, it could utilize AI-powered analytics for understanding event trends or improve search relevancy by analyzing historical data patterns.

Billing Impacts

Using the EventMapTile may incur API usage costs, particularly if the backend event data source operates on a pay-per-call basis (like GDELT or similar services). Users should monitor their API usage to avoid unexpected costs.

Use Cases & Examples

Use Cases

  1. Disaster Management: Organizations can utilize the EventMapTile to visualize and monitor natural disasters such as earthquakes, floods, or hurricanes in real-time.
  2. Social Media Analytics: Businesses can track events related to social trends by visualizing mentions or topics from social media platforms, improving marketing strategies.
  3. Traffic Monitoring: Transportation agencies can display traffic incidents and road conditions, helping to inform the public about live traffic situations.

Example Configuration

Use Case: Disaster Management - Visualizing earthquake events.

Sample Configuration Data:

json
{
    "tile": {
        "config": {
            "mapStyle": "osm",
            "markerColor": "#ff0000",
            "defaultQuery": "earthquake",
            "defaultTimespan": "7d"
        }
    }
}

In this example configuration:

In summary, the EventMapTile is a powerful, flexible component designed for developers and organizations looking to leverage geographic event data in real time, enhancing user engagement and actionable insights.