react-listing-engine 0.6.9 → 0.6.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -61,7 +61,7 @@ export function PropertySearch() {
|
|
|
61
61
|
fromParams: f => f.q ?? '',
|
|
62
62
|
})
|
|
63
63
|
}
|
|
64
|
-
map={{ apiKey: process.env.NEXT_PUBLIC_GOOGLE_MAPS_KEY
|
|
64
|
+
map={{ apiKey: process.env.NEXT_PUBLIC_GOOGLE_MAPS_KEY! }}
|
|
65
65
|
/>
|
|
66
66
|
);
|
|
67
67
|
}
|
|
@@ -83,12 +83,14 @@ import { googleProvider } from 'react-listing-engine/maps/google';
|
|
|
83
83
|
|
|
84
84
|
const map = googleProvider({
|
|
85
85
|
apiKey: process.env.NEXT_PUBLIC_GOOGLE_MAPS_KEY!, // required — no hardcoded fallback
|
|
86
|
-
mapId: 'YOUR_MAP_ID', //
|
|
86
|
+
mapId: 'YOUR_MAP_ID', // optional — defaults to Google's zero-config dev 'DEMO_MAP_ID'
|
|
87
87
|
});
|
|
88
88
|
```
|
|
89
89
|
|
|
90
90
|
- `apiKey` always comes from **your** env/config; `googleProvider` throws immediately if it's falsy.
|
|
91
|
-
- `mapId` is
|
|
91
|
+
- `mapId` is what Google requires to render `AdvancedMarkerElement` markers. It defaults to Google's documented zero-config dev Map ID (`'DEMO_MAP_ID'`), so markers work out of the box — supply your own Cloud Console Map ID for production traffic or Cloud-based map styling.
|
|
92
|
+
- `mapOptions` (optional) forwards extra `google.maps.MapOptions` to every map the provider creates — zoom envelope (`minZoom`/`maxZoom`), UI chrome (`disableDefaultUI`, `zoomControl`), gesture handling, etc. The provider's own `mapId`/`center`/`zoom` always win over it.
|
|
93
|
+
- `styles` (optional) applies legacy JSON map styling (`google.maps.MapTypeStyle[]`). Mutually exclusive with `mapId` — Google ignores JSON styles whenever a Map ID is present — so setting it switches the provider into a no-Map-ID mode that renders markers as `OverlayView` HTML overlays instead of `AdvancedMarkerElement`s. Marker clustering isn't supported in this mode (it falls back to plain markers with a one-time console warning).
|
|
92
94
|
- `loaderOptions` (optional) forwards extra `@googlemaps/js-api-loader` config (language, region, preloaded libraries); `key` is always taken from `apiKey` and can't be overridden there.
|
|
93
95
|
- `DatasetDefinition.clustering` (`{ maxZoom }` or `false`) is implemented by the shipped `googleProvider`: when set, that layer's markers are wrapped in a `MarkerClusterer` (from the OPTIONAL peer dependency `@googlemaps/markerclusterer` — install it to enable clustering; without it, `googleProvider` warns once and falls back to plain, unclustered markers, no crash) with a custom renderer that draws a solid red circle showing the cluster's count. No Mapbox provider ships either; `MapProvider` is the seam if you want to add one.
|
|
94
96
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-listing-engine",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Headless, composable listing engine for React: filterable list + Google-Maps multi-layer map, with pluggable data adapters, a filter/dataset registry, injectable components, and a Tailwind-free styled adapter.",
|
|
6
6
|
"funding": [
|