Live Data Sources

Live Data Sources

Link layers to external data sources like KML feeds, GeoJSON endpoints, or JSON APIs. Data updates automatically on a schedule you choose, making it ideal for weather alerts, earthquake feeds, flight trackers, and other real-time data.

Supported Formats

  • KML — Live KML feeds (e.g., NWS weather alerts, USGS earthquakes)
  • GeoJSON — Standard GeoJSON endpoints that return FeatureCollections
  • JSON / API — Any JSON API with configurable field mapping for coordinates and properties

Smart Source Detection

MapEdit handles most of the configuration automatically. Just paste a URL and click Check Link — the format is auto-detected and common quirks are handled for you.

  • Check Link auto-detects the format — just paste a URL and click Check Link
  • ArcGIS FeatureServer URLs are automatically rewritten to return GeoJSON
  • NWS weather alert zones are resolved to polygon geometries automatically
  • Common coordinate fields (lat/lng/latitude/longitude) are auto-detected in JSON
  • Bare JSON arrays (e.g., Socrata APIs) are handled without extra configuration
  • Invalid or broken URLs return a clear error instead of an empty layer

Adding a Live Data Source

  1. Open the Import/Export panel in the left sidebar
  2. Click the Link tab
  3. Click "Add Data Source" to open the configuration modal
  4. Enter the data source URL
  5. Click "Check Link" to auto-detect the format and validate the URL
  6. Adjust the format or field mapping if needed (the format is usually auto-detected)
  7. Click "Test Connection" to preview the data
  8. Choose a refresh interval (or "On load only" for no auto-refresh)
  9. Click "Add Layer" to create the live layer

JSON Field Mapping

When using a JSON API, you can configure how MapEdit extracts geographic data from the response. All paths use dot-notation (e.g., data.results).

  • Features Array Path — Path to the array of items (default: "features")
  • Geometry Path — Path to a GeoJSON geometry object within each item
  • Latitude / Longitude Fields — For point data without a geometry object
  • Name Field — Path to the feature name for display
  • Description Field — Path to the feature description
Use the "Test Connection" button to verify your field mapping is correct before adding the layer. The preview shows the feature count and sample names.

Refresh Intervals

Choose how often the data refreshes:

  • On load only — Data fetches once when the map loads
  • Every 5 minutes — Good for fast-changing data like weather alerts
  • Every 15 minutes — Balanced option for most feeds
  • Every 30 minutes — For slower-changing data
  • Every hour — For data that updates infrequently

Live Layer Behavior

Live layers behave differently from regular layers:

  • Features are read-only — names, descriptions, and styles cannot be edited since they would be overwritten on refresh
  • A "live" badge appears next to the layer name in the layer panel
  • Hover over a live layer to access Refresh Now and Disconnect buttons
  • Refresh Now triggers an immediate data fetch
  • Disconnect Source removes the live link but keeps the current features as static data you can edit
  • If a refresh fails, the LIVE badge turns amber with a warning icon
  • Hover over the warning icon to see the error message
  • Repeated failures trigger exponential backoff to avoid hammering the source
  • A successful refresh resets the badge to blue and restores the normal interval

Shared Maps

When you share a map that contains live data layers, viewers see fresh data fetched directly from the source every time they open the map. If the source is temporarily unavailable, the last saved snapshot from the database is shown instead.

Live layers on shared maps respect the same refresh intervals, so viewers get automatic updates without needing to reload the page.

Limits & Security

  • Maximum response size: 10 MB per source
  • Maximum features: 10,000 per source (excess features are truncated)
  • HTTPS only — HTTP URLs are automatically upgraded to HTTPS
  • All fetched data is sanitized to prevent XSS and other injection attacks
  • Minimum refresh interval: 1 minute
  • ArcGIS pagination limits are detected and surfaced as truncation warnings
  • Descriptive error messages for common issues (authentication, rate limiting, server errors)