You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry for the late reply @anonymze . That's a great idea and would be a very welcome contribution! The SDK is structured as a monorepo with separate packages (core, react), so a react-native package would fit in naturally alongside them.
Here's a breakdown of what that package would need to do:
What you get for free from @mapfirst.ai/core:
All API calls (runPropertiesSearch, smartFilterSearch, pollForPricing, etc.)
State management and callbacks
The clustering algorithm (clusterMarkers) — it's pure JS, no DOM dependencies
What you'd need to implement:
A MapAdapter: this is the main integration point. You'd implement the MapAdapter interface (from packages/core/src/adapters/index.ts) wrapping a React Native map library like @rnmapbox/maps or react-native-maps. The key method the clustering system needs is map.project() (lat/lng → screen pixels) — most RN map libraries expose something equivalent.
A marker manager: instead of DOM elements, you'd render markers as React Native components driven by the ClusterDisplayItem[] output from the clustering system.
A useMapFirstNative hook: (similar to useMapFirst in the React package) — wiring MapFirstCore to React state, largely copy-pasteable from packages/react/src/index.tsx.
Geolocation: navigator.geolocation works in RN but the Permissions API (navigator.permissions) used internally doesn't. You'd want to replace that with react-native-permissions or the Expo equivalent.
If you're planning to contribute, feel free to open an issue or draft PR so we can align on the API surface before you dive deep. Happy to help guide the implementation!
Activity
sandeshveerani4 commentedon Apr 17, 2026
Sorry for the late reply @anonymze . That's a great idea and would be a very welcome contribution! The SDK is structured as a monorepo with separate packages (
core,react), so areact-nativepackage would fit in naturally alongside them.Here's a breakdown of what that package would need to do:
What you get for free from
@mapfirst.ai/core:runPropertiesSearch,smartFilterSearch,pollForPricing, etc.)clusterMarkers) — it's pure JS, no DOM dependenciesWhat you'd need to implement:
A
MapAdapter: this is the main integration point. You'd implement theMapAdapterinterface (frompackages/core/src/adapters/index.ts) wrapping a React Native map library like@rnmapbox/mapsorreact-native-maps. The key method the clustering system needs ismap.project()(lat/lng → screen pixels) — most RN map libraries expose something equivalent.A marker manager: instead of DOM elements, you'd render markers as React Native components driven by the
ClusterDisplayItem[]output from the clustering system.A
useMapFirstNativehook: (similar touseMapFirstin the React package) — wiringMapFirstCoreto React state, largely copy-pasteable frompackages/react/src/index.tsx.Geolocation:
navigator.geolocationworks in RN but the Permissions API (navigator.permissions) used internally doesn't. You'd want to replace that withreact-native-permissionsor the Expo equivalent.If you're planning to contribute, feel free to open an issue or draft PR so we can align on the API surface before you dive deep. Happy to help guide the implementation!