Skip to content

feat: add GeoJson component#39

Merged
lodev09 merged 8 commits intomainfrom
feat/geojson
Mar 4, 2026
Merged

feat: add GeoJson component#39
lodev09 merged 8 commits intomainfrom
feat/geojson

Conversation

@lodev09
Copy link
Collaborator

@lodev09 lodev09 commented Mar 4, 2026

Summary

Add a <GeoJson> component that renders GeoJSON data (FeatureCollection, Feature, or bare Geometry) on the map using existing Marker, Polyline, and Polygon components. Works on iOS, Android, and Web — no native code changes needed.

  • Supports all GeoJSON geometry types: Point, MultiPoint, LineString, MultiLineString, Polygon (with holes), MultiPolygon, GeometryCollection
  • Render callbacks (renderMarker, renderPolyline, renderPolygon) for custom feature rendering
  • Extracts component types into Component.types.ts files
  • Adds GeoJSON loading UI to example app with URL input and presets
  • Converts all function declarations to arrow functions

Type of Change

  • New feature

Test Plan

  • Load GeoJSON presets (California Counties, San Francisco Neighborhoods) in example app
  • Verify polygons render with correct shapes and holes
  • Test custom rendering via render callbacks
  • Test on iOS, Android, and Web

Checklist

  • I tested on iOS
  • I tested on Android
  • I tested on Web
  • I updated the documentation (if needed)

lodev09 added 8 commits March 5, 2026 02:59
Merge geojson.types.ts into GeoJson.types.ts. Remove strokeColor,
strokeWidth, fillColor props — use render callbacks to customize.
Read fill, stroke, stroke-width from feature.properties and map
them to Polygon/Polyline props. Add hardcoded GeoJSON test fixture
in example app.
Extract hardcoded GeoJSON into geojson.ts with Point, MultiPoint,
Polygon, LineString, and MultiLineString features. Add renderPolygon
override for loaded GeoJSON data.
@lodev09 lodev09 merged commit f207b55 into main Mar 4, 2026
3 checks passed
@lodev09 lodev09 deleted the feat/geojson branch March 4, 2026 20:52
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.

1 participant