Skip to content

Add Geo Map Component#13

Merged
angelikretool merged 1 commit intotryretool:mainfrom
widlestudiollp:add/map-component
Mar 30, 2026
Merged

Add Geo Map Component#13
angelikretool merged 1 commit intotryretool:mainfrom
widlestudiollp:add/map-component

Conversation

@widlestudiollp
Copy link
Copy Markdown
Contributor

🚀 Overview

This PR introduces a new Geo Map Component for the Retool Custom Component Gallery. The component enables interactive, country-level data visualization on a world map with dynamic color scaling and user interaction support.


✨ Features

  • 🌍 Interactive world map (Leaflet-based)
  • 🎨 Dynamic color scaling (0–100 gradient)
  • 🧠 Smart country detection (supports names, ISO2, ISO3)
  • ⚡ Optimized performance with GeoJSON caching
  • 🖱 Click interaction with selected state output
  • 🔔 Event handler support (onSelect)
  • 📊 Automatic normalization (percentage & absolute values)
  • 📌 Sticky legend for color interpretation
  • 💅 Modern, user-friendly tooltip UI
  • 🛡 Safe fallback colors to prevent UI break

📦 Props

  • data (Array): Input dataset
  • countryKey (String): Field for country
  • valueKey (String): Field for value
  • lowColor, midLowColor, midHighColor, highColor (String): Custom color inputs

📤 Outputs

  • selectedCountry (Object): Contains selected country and value

⚡ Events

  • onSelect: Triggered when a user clicks on a country

🧪 Testing

  • Tested with multiple datasets (population, percentages, mixed formats)
  • Verified support for country names, ISO2, ISO3 codes
  • Checked performance with large datasets
  • Validated fallback behavior for empty/invalid color inputs

📸 Preview

Screen Shot 2026-03-30 at 6 29 08 PM

✅ Checklist

  • Component works as expected
  • Performance optimized
  • No UI glitches or lag
  • Follows Retool component guidelines
  • Includes README and metadata

📄 Notes

This component is designed to be fully reusable and adaptable for various use cases such as analytics dashboards, geospatial insights, and KPI visualization.

@angelikretool angelikretool merged commit 4427b7a into tryretool:main Mar 30, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants