ReviewOS

also looking at this

craft-native/craft

feat(maps): add key-free native Android maps and shared map controls

#363
Merged chris wants to merge codex/wildloop-native-map-providers into main
28 files +1857 -481
packages/android/README.mdmodified+15-5
Changes to packages/android/README.md
@@ -147,18 +147,28 @@ craft android build --native-bundle ../native-screen.js
147147Native mode maps STX `View`, `SafeAreaView`, `KeyboardAvoidingView`, `StatusBar`,
148148`RefreshControl`, `Text`, `Button`, `Link`, `Icon`,
149149`Pressable`, `TouchableOpacity`, `TouchableHighlight`, `Checkbox`, `TextInput`, `Picker`, `DatePicker`, `Modal`, `Switch`, `Slider`, `ActivityIndicator`, `Image`, `ImageBackground`, `Video`, `Svg`, `G`, `SvgText`, `ScrollView`,
150`Map`, `SectionList`, and `FlatList` to Android views. `Map` uses the Google
151Maps SDK for trail polylines and marker taps; its overlays carry flat
150`Map`, `SectionList`, and `FlatList` to Android views. `Map` uses the configured
151native map provider for trail polylines and marker taps; its overlays carry flat
152152latitude/longitude `geometry` arrays, `strokeWidth` is expressed in logical
153153points, and the camera supports controlled `region`, one-time `initialRegion`,
154and `fitToBounds`. Set `mapsApiKey` in the Android config to emit the SDK manifest key;
154and `fitToBounds`. Select `mapProvider: 'maplibre'` for the key-free native
155MapLibre renderer. It uses native GL views and needs neither a Google map SDK
156dependency nor a Google map key. `mapProvider: 'google'` retains the existing
157Google Maps host and uses `mapsApiKey` for its SDK manifest key; Google remains
158the default for compatibility with existing projects.
159
155160Coordinates must be JSON numbers (numeric strings are not coerced), are
156161range-checked at the native boundary, and invalid points or pole-crossing
157162regions are ignored. `fitToBounds` waits for the map viewport to
158163be measured before caching a successful camera fit, so an early map callback
159164does not lose the initial route framing.
160without it, the native map remains an explicit opt-in integration that needs
161the app's own Maps credentials. `SectionList` uses the same
165The shared controls include `showsCompass`, `showsScale`, `pitchEnabled`,
166`cameraPitch`, `cameraHeading`, and floating-control `edgePadding`. Markers
167accept `pinColor` and route-direction `bearing`. The builder's
168`nativeMapProviders` export advertises the providers it actually implements,
169so a build orchestrator can refuse an unsupported explicit choice.
170
171`SectionList` uses the same
162172native scroll host for ordinary `.stx` slot children; grouped section data
163173should use `FlatList` until the section-data protocol is available. The
164174generated host routes both list names through `CraftNativeScrollView` for this