diff --git a/README.md b/README.md index a393ebf9..693a4109 100644 --- a/README.md +++ b/README.md @@ -115,9 +115,9 @@ Copy the `/public/config.json` file into your content repository to `/content/se | content.posts_config.categories | Array | List of categories by which `posts` can be filtered | | content.posts_config.drafts | Boolean | If `true` will enable a `publish` toggle on `posts` and only display published content on the front end | | content.posts_config.layout | String | Layout for the posts page. Options are `list` and `grid`. | -| content.posts_config.sort_by | Object | Post sorting options | -| content.posts_config.sort_by.name | String | Field to sort by | -| content.posts_config.sort_by.direction | String | `asc` or `desc` | +| content.posts_config.sort_by | Object | Post sorting options | +| content.posts_config.sort_by.name | String | Field to sort by | +| content.posts_config.sort_by.direction | String | `asc` or `desc` | | core_data | Object | Core Data configuration | | core_data.url | String | URL of the Core Data application | | core_data.project_ids | Array | Array of Core Data project IDs as strings | @@ -161,6 +161,7 @@ Copy the `/public/config.json` file into your content repository to `/content/se | search.map | Object | Map configuration | | search.map.cluster_radius | Number | If provided, map points will be clustered for the given radius (in miles). This option is only valid if the `map.geometry` property contains Lat/Lng coordinates. | | search.map.geometry | String | Path to the attribute in the Typesense document that contains the GeoJSON data to be displayed on the map | +| search.map.properties | String | Path to the attribute in the Typesense document that contains the properties object for the GeoJSON | | search.map.max_zoom | Number | The maximum zoom level to allow when the map view transitions to a set of bounds (a single place, or mulitple places). | | search.map.zoom_to_place | Boolean | If `true` or not specified, clicking on an individual place marker or search result will zoom the map to its location (using the max zoom). | | search.name | String | The name of the search index configuration. | diff --git a/package-lock.json b/package-lock.json index 82ff0969..346b8b23 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,9 +20,9 @@ "@nanostores/react": "^0.7.3", "@netlify/functions": "^2.8.2", "@octokit/rest": "^21.0.2", - "@performant-software/core-data": "^3.1.15", - "@performant-software/geospatial": "^3.1.15", - "@performant-software/shared-components": "^3.1.15", + "@performant-software/core-data": "^3.1.17", + "@performant-software/geospatial": "^3.1.17", + "@performant-software/shared-components": "^3.1.17", "@peripleo/maplibre": "^0.8.8", "@peripleo/peripleo": "^0.8.8", "@samvera/clover-iiif": "^2.9.1", @@ -2846,18 +2846,18 @@ } }, "node_modules/@babel/runtime": { - "version": "7.28.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz", - "integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==", + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.2.tgz", + "integrity": "sha512-JiDShH45zKHWyGe4ZNVRrCjBz8Nh9TMmZG1kh4QTK8hCBTWBi8Da+i7s1fJw7/lYpM4ccepSNfqzZ/QvABBi5g==", "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/runtime-corejs3": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.29.0.tgz", - "integrity": "sha512-TgUkdp71C9pIbBcHudc+gXZnihEDOjUAmXO1VO4HHGES7QLZcShR0stfKIxLSNIYx2fqhmJChOjm/wkF8wv4gA==", + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.29.2.tgz", + "integrity": "sha512-Lc94FOD5+0aXhdb0Tdg3RUtqT6yWbI/BbFWvlaSJ3gAb9Ks+99nHRDKADVqC37er4eCB0fHyWT+y+K3QOvJKbw==", "license": "MIT", "dependencies": { "core-js-pure": "^3.48.0" @@ -5473,9 +5473,9 @@ "license": "Apache-2.0" }, "node_modules/@kninnug/constrainautor": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@kninnug/constrainautor/-/constrainautor-4.0.1.tgz", - "integrity": "sha512-wVnev6bmVBY3GjZeaDK+SQFIc2crpLQAmb5nYUVy/QtYUBz0masTji20XToVXfym7WgpaRFHDhcyX15CMhND8w==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@kninnug/constrainautor/-/constrainautor-4.1.0.tgz", + "integrity": "sha512-YEkGtzMewRxPRZuK1QmFDmELwaSL4LSLmc0WXTmpT8AqdcR/Ueu77fiJZ2lwOwXUX8aBJpHuy/e/06/Ve2dPNQ==", "license": "ISC", "dependencies": { "robust-predicates": "^3.0.1" @@ -5656,15 +5656,18 @@ } }, "node_modules/@maplibre/geojson-vt": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@maplibre/geojson-vt/-/geojson-vt-5.0.4.tgz", - "integrity": "sha512-KGg9sma45S+stfH9vPCJk1J0lSDLWZgCT9Y8u8qWZJyjFlP8MNP1WGTxIMYJZjDvVT3PDn05kN1C95Sut1HpgQ==", - "license": "ISC" + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/@maplibre/geojson-vt/-/geojson-vt-6.0.4.tgz", + "integrity": "sha512-HYv3POhMRCdhP3UPPATM/hfcy6/WuVIf5FKboH8u/ZuFMTnAIcSVlq5nfOqroLokd925w2QtE7YwquFOIacwVQ==", + "license": "ISC", + "dependencies": { + "kdbush": "^4.0.2" + } }, "node_modules/@maplibre/maplibre-gl-style-spec": { - "version": "24.4.1", - "resolved": "https://registry.npmjs.org/@maplibre/maplibre-gl-style-spec/-/maplibre-gl-style-spec-24.4.1.tgz", - "integrity": "sha512-UKhA4qv1h30XT768ccSv5NjNCX+dgfoq2qlLVmKejspPcSQTYD4SrVucgqegmYcKcmwf06wcNAa/kRd0NHWbUg==", + "version": "24.8.1", + "resolved": "https://registry.npmjs.org/@maplibre/maplibre-gl-style-spec/-/maplibre-gl-style-spec-24.8.1.tgz", + "integrity": "sha512-zxa92qF96ZNojLxeAjnaRpjVCy+swoUNJvDhtpC90k7u5F0TMr4GmvNqMKvYrMoPB8d7gRSXbMG1hBbmgESIsw==", "license": "ISC", "dependencies": { "@mapbox/jsonlint-lines-primitives": "~2.0.2", @@ -5688,9 +5691,9 @@ "license": "ISC" }, "node_modules/@maplibre/mlt": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/@maplibre/mlt/-/mlt-1.1.6.tgz", - "integrity": "sha512-rgtY3x65lrrfXycLf6/T22ZnjTg5WgIOsptOIoCaMZy4O4UAKTyZlYY0h6v8le721pTptF94U65yMDQkug+URw==", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/@maplibre/mlt/-/mlt-1.1.8.tgz", + "integrity": "sha512-8vtfYGidr1rNkv5IwIoU2lfe3Oy+Wa8HluzQYcQi9cveU9K3pweAal/poQj4GJ0K/EW4bTQp2wVAs09g2yDRZg==", "license": "(MIT OR Apache-2.0)", "dependencies": { "@mapbox/point-geometry": "^1.1.0" @@ -5703,9 +5706,9 @@ "license": "ISC" }, "node_modules/@maplibre/vt-pbf": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@maplibre/vt-pbf/-/vt-pbf-4.2.1.tgz", - "integrity": "sha512-IxZBGq/+9cqf2qdWlFuQ+ZfoMhWpxDUGQZ/poPHOJBvwMUT1GuxLo6HgYTou+xxtsOsjfbcjI8PZaPCtmt97rA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@maplibre/vt-pbf/-/vt-pbf-4.3.0.tgz", + "integrity": "sha512-jIvp8F5hQCcreqOOpEt42TJMUlsrEcpf/kI1T2v85YrQRV6PPXUcEXUg5karKtH6oh47XJZ4kHu56pUkOuqA7w==", "license": "MIT", "dependencies": { "@mapbox/point-geometry": "^1.1.0", @@ -5734,6 +5737,12 @@ "pbf": "^4.0.1" } }, + "node_modules/@maplibre/vt-pbf/node_modules/@maplibre/geojson-vt": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@maplibre/geojson-vt/-/geojson-vt-5.0.4.tgz", + "integrity": "sha512-KGg9sma45S+stfH9vPCJk1J0lSDLWZgCT9Y8u8qWZJyjFlP8MNP1WGTxIMYJZjDvVT3PDn05kN1C95Sut1HpgQ==", + "license": "ISC" + }, "node_modules/@maplibre/vt-pbf/node_modules/pbf": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pbf/-/pbf-4.0.1.tgz", @@ -7163,9 +7172,9 @@ } }, "node_modules/@performant-software/core-data": { - "version": "3.1.15", - "resolved": "https://registry.npmjs.org/@performant-software/core-data/-/core-data-3.1.15.tgz", - "integrity": "sha512-BdTTCcCaOqseGozjLm7ztBQXa35Bp8hM7R+Q9+UKqutxvNzfzGm427KhHH+/udbIKgKhLhN3p4iDQaX2Av5NDQ==", + "version": "3.1.17", + "resolved": "https://registry.npmjs.org/@performant-software/core-data/-/core-data-3.1.17.tgz", + "integrity": "sha512-1Tb6IhXiPcYsRx2Wy9Z8KaFUESlYnwRD32edeSGtzcc4yILiIW4FsKGXGh3qMC8hs4YItrdNVmz+v61MMNmVuw==", "license": "MIT", "dependencies": { "@headlessui/react": "^2.2.4", @@ -7193,8 +7202,8 @@ "underscore": "^1.13.2" }, "peerDependencies": { - "@performant-software/geospatial": "^3.1.15", - "@performant-software/shared-components": "^3.1.15", + "@performant-software/geospatial": "^3.1.17", + "@performant-software/shared-components": "^3.1.17", "@peripleo/maplibre": "^0.8.9", "@peripleo/peripleo": "^0.8.9", "react": ">= 16.13.1 < 19.0.0", @@ -8889,9 +8898,9 @@ } }, "node_modules/@performant-software/geospatial": { - "version": "3.1.15", - "resolved": "https://registry.npmjs.org/@performant-software/geospatial/-/geospatial-3.1.15.tgz", - "integrity": "sha512-m5R3l727tnSZWe40jBBOalfpF6b6zv0Ypd6ybYjzvf2mjyxWsOcmeCezeRP0AQdEeTlVHHcuaHbNM152qwuLzA==", + "version": "3.1.17", + "resolved": "https://registry.npmjs.org/@performant-software/geospatial/-/geospatial-3.1.17.tgz", + "integrity": "sha512-kfb3DC5KV6AaE85whW1c15UXdRlacbLeyhhzxBsh64YHORORuIvKF4MKOTO9nQzcjwuuDDkWhuIg9oVWTsefEg==", "license": "MIT", "dependencies": { "@allmaps/maplibre": "^1.0.0-beta.25", @@ -8918,9 +8927,9 @@ "license": "ISC" }, "node_modules/@performant-software/shared-components": { - "version": "3.1.15", - "resolved": "https://registry.npmjs.org/@performant-software/shared-components/-/shared-components-3.1.15.tgz", - "integrity": "sha512-4V+uiW/dj8jv2xsKqhEsFK1Z4VuZNEI038lC7kAweYUPH20Buc3dVlF18hsO46kFKNwLDtCW9pcj530pUVXgKA==", + "version": "3.1.17", + "resolved": "https://registry.npmjs.org/@performant-software/shared-components/-/shared-components-3.1.17.tgz", + "integrity": "sha512-LMXFiUHKmjX223aWqiui+wRzGuLPhPw6hS2YbPudfE+2Fx0jhoMfq0Ks4tMXmhgfdms7bNw8XAfyD+OG6CEGDg==", "license": "MIT", "dependencies": { "@rails/activestorage": "^8.0.201", @@ -8945,29 +8954,29 @@ } }, "node_modules/@performant-software/shared-components/node_modules/i18next": { - "version": "25.8.6", - "resolved": "https://registry.npmjs.org/i18next/-/i18next-25.8.6.tgz", - "integrity": "sha512-HsS6p2yr/Vo5EPljWuBJ9OxKVFok2Q/Oa6PvFTpv2bMcDt2sQMOnKDQ7FTDDdME+3d1YULQjKj7aVSZP1bCouQ==", + "version": "25.10.10", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-25.10.10.tgz", + "integrity": "sha512-cqUW2Z3EkRx7NqSyywjkgCLK7KLCL6IFVFcONG7nVYIJ3ekZ1/N5jUsihHV6Bq37NfhgtczxJcxduELtjTwkuQ==", "funding": [ { "type": "individual", - "url": "https://locize.com" + "url": "https://www.locize.com/i18next" }, { "type": "individual", - "url": "https://locize.com/i18next.html" + "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project" }, { "type": "individual", - "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project" + "url": "https://www.locize.com" } ], "license": "MIT", "dependencies": { - "@babel/runtime": "^7.28.4" + "@babel/runtime": "^7.29.2" }, "peerDependencies": { - "typescript": "^5" + "typescript": "^5 || ^6" }, "peerDependenciesMeta": { "typescript": { @@ -11296,9 +11305,9 @@ "license": "MIT" }, "node_modules/@rails/activestorage": { - "version": "8.1.200", - "resolved": "https://registry.npmjs.org/@rails/activestorage/-/activestorage-8.1.200.tgz", - "integrity": "sha512-bPZqv447REBd1NQfba//FjgUqbUd93zKh7+BWhh3vRZ7Nm+RUgm6c5GbWctmik/rMHjsruTHhusYGyoKyf60pg==", + "version": "8.1.300", + "resolved": "https://registry.npmjs.org/@rails/activestorage/-/activestorage-8.1.300.tgz", + "integrity": "sha512-AOv3zZrTJjQlzm4L9uzOQtCz6zaM4IqUyux6yzSqmS+PZ8EzwD1F2JAc4LlJNJAv4MSyNYriG+CaCm1QbQTjsA==", "license": "MIT", "dependencies": { "spark-md5": "^3.0.1" @@ -23005,9 +23014,9 @@ } }, "node_modules/core-js-pure": { - "version": "3.48.0", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.48.0.tgz", - "integrity": "sha512-1slJgk89tWC51HQ1AEqG+s2VuwpTRr8ocu4n20QUcH1v9lAN0RXen0Q0AABa/DK1I7RrNWLucplOHMx8hfTGTw==", + "version": "3.49.0", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.49.0.tgz", + "integrity": "sha512-XM4RFka59xATyJv/cS3O3Kml72hQXUeGRuuTmMYFxwzc9/7C8OYTaIR/Ji+Yt8DXzsFLNhat15cE/JP15HrCgw==", "hasInstallScript": true, "license": "MIT", "funding": { @@ -25820,20 +25829,14 @@ "license": "ISC" }, "node_modules/geokdbush": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/geokdbush/-/geokdbush-2.0.1.tgz", - "integrity": "sha512-0M8so1Qx6+jJ1xpirpCNrgUsWAzIcQ3LrLmh0KJPBYI3gH7vy70nY5zEEjSp9Tn0nBt6Q2Fh922oL08lfib4Zg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/geokdbush/-/geokdbush-2.1.0.tgz", + "integrity": "sha512-bMc7mu+SeUxtHwRpVvZ36qnZa/x8YAGuaPNeGDxd9bxp/jYuJ5GrUirUPz6UNiT+nn/79IQ4gCNan0y4alEUxw==", "license": "ISC", "dependencies": { - "tinyqueue": "^2.0.3" + "tinyqueue": "^3.0.0" } }, - "node_modules/geokdbush/node_modules/tinyqueue": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/tinyqueue/-/tinyqueue-2.0.3.tgz", - "integrity": "sha512-ppJZNDuKGgxzkHihX8v9v9G5f+18gzaTfrukGrq6ueg0lmH4nqVnA2IPG0AEH3jKEk2GRJCUhDoqpoiw3PHLBA==", - "license": "ISC" - }, "node_modules/get-amd-module-type": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-amd-module-type/-/get-amd-module-type-6.0.1.tgz", @@ -29678,24 +29681,22 @@ } }, "node_modules/maplibre-gl": { - "version": "5.18.0", - "resolved": "https://registry.npmjs.org/maplibre-gl/-/maplibre-gl-5.18.0.tgz", - "integrity": "sha512-UtWxPBpHuFvEkM+5FVfcFG9ZKEWZQI6+PZkvLErr8Zs5ux+O7/KQ3JjSUvAfOlMeMgd/77qlHpOw0yHL7JU5cw==", + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/maplibre-gl/-/maplibre-gl-5.22.0.tgz", + "integrity": "sha512-nc8YA+YSEioMZg5W0cb6Cf3wQ8aJge66dsttyBgpOArOnlmFJO1Kc5G32kYVPeUYhLpBja83T99uanmJvYAIyQ==", "license": "BSD-3-Clause", "dependencies": { - "@mapbox/geojson-rewind": "^0.5.2", "@mapbox/jsonlint-lines-primitives": "^2.0.2", "@mapbox/point-geometry": "^1.1.0", "@mapbox/tiny-sdf": "^2.0.7", "@mapbox/unitbezier": "^0.0.1", "@mapbox/vector-tile": "^2.0.4", "@mapbox/whoots-js": "^3.1.0", - "@maplibre/geojson-vt": "^5.0.4", - "@maplibre/maplibre-gl-style-spec": "^24.4.1", - "@maplibre/mlt": "^1.1.6", - "@maplibre/vt-pbf": "^4.2.1", + "@maplibre/geojson-vt": "^6.0.4", + "@maplibre/maplibre-gl-style-spec": "^24.8.1", + "@maplibre/mlt": "^1.1.8", + "@maplibre/vt-pbf": "^4.3.0", "@types/geojson": "^7946.0.16", - "@types/supercluster": "^7.1.3", "earcut": "^3.0.2", "gl-matrix": "^3.4.4", "kdbush": "^4.0.2", @@ -29703,7 +29704,6 @@ "pbf": "^4.0.1", "potpack": "^2.1.0", "quickselect": "^3.0.0", - "supercluster": "^8.0.1", "tinyqueue": "^3.0.0" }, "engines": { @@ -50760,13 +50760,13 @@ } }, "node_modules/proj4": { - "version": "2.20.2", - "resolved": "https://registry.npmjs.org/proj4/-/proj4-2.20.2.tgz", - "integrity": "sha512-ipfBRfQly0HhHTO7hnC1GfaX8bvroO7VV4KH889ehmADSE8C/qzp2j+Jj6783S9Tj6c2qX/hhYm7oH0kgXzBAA==", + "version": "2.20.8", + "resolved": "https://registry.npmjs.org/proj4/-/proj4-2.20.8.tgz", + "integrity": "sha512-1C8sfT4xY4PAPwk0MroFBTGF4R4bzDXdmPQTGYVLsoNssrZ9odzObxS2dTeGBty8jW8KO7h16C1Hs2JP+ctfFw==", "license": "MIT", "dependencies": { "mgrs": "1.0.0", - "wkt-parser": "^1.5.1" + "wkt-parser": "^1.5.5" }, "funding": { "url": "https://github.com/sponsors/ahocevar" @@ -54867,15 +54867,15 @@ } }, "node_modules/simple-keyboard": { - "version": "3.8.108", - "resolved": "https://registry.npmjs.org/simple-keyboard/-/simple-keyboard-3.8.108.tgz", - "integrity": "sha512-U9HNqc7vhWCjAwmD0elsQnaE+58ciuuO6vLybjqL0ImcFxzIW1l/BYTaf7nk2oX9Ksu8MSPjuzNzTA9sHSjF5g==", + "version": "3.8.128", + "resolved": "https://registry.npmjs.org/simple-keyboard/-/simple-keyboard-3.8.128.tgz", + "integrity": "sha512-FaYqyuxZ47qaa1DtDr5Qqk6iAhqyfh47lo45u+QQJjHWYCLp/1ouV5Urc8k9YSn5ywsF6Lxxna48S1YeRFNN2A==", "license": "MIT" }, "node_modules/simple-keyboard-layouts": { - "version": "3.4.163", - "resolved": "https://registry.npmjs.org/simple-keyboard-layouts/-/simple-keyboard-layouts-3.4.163.tgz", - "integrity": "sha512-ZD/HmZnqRt0q/4cqBZQ9DihuqY8m//u7niqCqzEnaINieadT4VCCrkIy1KMc+GtN74VWRIhzclN1LM81rvncCA==", + "version": "3.4.190", + "resolved": "https://registry.npmjs.org/simple-keyboard-layouts/-/simple-keyboard-layouts-3.4.190.tgz", + "integrity": "sha512-duJ9/H+ggOUGoen/8m43BE48AULMEz2AJNeKzi3W7qitPtY/hu7E+UYqUoUmS4xYZuelbEw6UaAbed0v+IsPDQ==", "license": "MIT" }, "node_modules/simple-swizzle": { @@ -58491,10 +58491,13 @@ } }, "node_modules/wkt-parser": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/wkt-parser/-/wkt-parser-1.5.2.tgz", - "integrity": "sha512-1ZUiV1FTwSiSrgWzV9KXJuOF2BVW91KY/mau04BhnmgOdroRQea7Q0s5TVqwGLm0D2tZwObd/tBYXW49sSxp3Q==", - "license": "MIT" + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/wkt-parser/-/wkt-parser-1.5.5.tgz", + "integrity": "sha512-/zMYi94/7D7fxcOSlVmWn6vnOMj3Gq5d1xvVjaYOS9n6h0qOJ4I7YYVxBWYcH1vq9+suhqzXkn05Yx47zQNUIA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ahocevar" + } }, "node_modules/wrap-ansi": { "version": "9.0.0", diff --git a/package.json b/package.json index 43e7216c..43296371 100644 --- a/package.json +++ b/package.json @@ -40,9 +40,9 @@ "@nanostores/react": "^0.7.3", "@netlify/functions": "^2.8.2", "@octokit/rest": "^21.0.2", - "@performant-software/core-data": "^3.1.15", - "@performant-software/geospatial": "^3.1.15", - "@performant-software/shared-components": "^3.1.15", + "@performant-software/core-data": "^3.1.17", + "@performant-software/geospatial": "^3.1.17", + "@performant-software/shared-components": "^3.1.17", "@peripleo/maplibre": "^0.8.8", "@peripleo/peripleo": "^0.8.8", "@samvera/clover-iiif": "^2.9.1", diff --git a/src/apps/detailPages/Place.astro b/src/apps/detailPages/Place.astro index 1f9c04cf..28f311a2 100644 --- a/src/apps/detailPages/Place.astro +++ b/src/apps/detailPages/Place.astro @@ -9,8 +9,7 @@ const { lang, uuid } = Astro.props; const { place } = await PlacesService.getOne(uuid); const excludes = config.result_filtering?.places?.exclude || []; -const geometry = excludes.includes('place_geometry') ? null : place?.place_geometry?.geometry_json; - +const geometry = excludes.includes('place_geometry') ? null : place?.place_geometry; --- { boundingBoxOptions={{ animate: false }} - data={props.geometry} + data={props.geometry.geometry_json} + /> + props.geometry.properties?.certainty_radius} /> diff --git a/src/apps/search/map/MapSearchContext.tsx b/src/apps/search/map/MapSearchContext.tsx index 8a0dcfd9..71f5e36c 100644 --- a/src/apps/search/map/MapSearchContext.tsx +++ b/src/apps/search/map/MapSearchContext.tsx @@ -144,7 +144,9 @@ export const MapSearchContextProvider = ({ allowSave, children, preload }: Props _.extend(options, { geometries }); } - setFeatures(TypesenseUtils.getFeatures(features, hits, config.map.geometry, options)); + const { geometry, properties } = config.map; + + setFeatures(TypesenseUtils.getFeatures(features, hits, geometry, properties, options)); }, [geometries, hits]); /** diff --git a/src/apps/search/map/MultiLayer.tsx b/src/apps/search/map/MultiLayer.tsx index 6416b6d5..7016c3f1 100644 --- a/src/apps/search/map/MultiLayer.tsx +++ b/src/apps/search/map/MultiLayer.tsx @@ -3,6 +3,7 @@ import Tooltip from '@apps/search/map/Tooltip'; import { SearchResultsLayer } from '@performant-software/core-data'; import { HoverTooltip } from '@peripleo/maplibre'; import _ from 'underscore'; +import CertaintyLayer from '@components/CertaintyLayer'; const MultiLayer = (props) => { const config = useSearchConfig(); @@ -19,6 +20,10 @@ const MultiLayer = (props) => { layerId={feature.properties.uuid} visible={feature.properties.visible} /> + item.properties?.originalProperties?.certainty_radius} + /> { const config = useSearchConfig(); @@ -25,6 +26,10 @@ const SingleLayer = (props) => { fitBoundingBox={false} interactive /> + item.properties?.originalProperties?.certainty_radius} + /> ( any; +} + +const CertaintyLayer = (props: Props) => { + const circles = useMemo(() => MapUtils.getCertaintyCircles( + props.data, + props.getProperties + ), [props.data, props.getProperties]); + + return ( + + ); +} + +export default CertaintyLayer; diff --git a/src/types.ts b/src/types.ts index b6c835b2..d79bde3c 100644 --- a/src/types.ts +++ b/src/types.ts @@ -31,6 +31,7 @@ export interface SearchConfig { map?:{ cluster_radius?: number, geometry: string, + properties?: string, max_zoom?: number, zoom_to_place?: boolean }; diff --git a/src/visualizations/Map.tsx b/src/visualizations/Map.tsx index 120a007f..8b340ad0 100644 --- a/src/visualizations/Map.tsx +++ b/src/visualizations/Map.tsx @@ -46,9 +46,9 @@ const Map = (props: DataVisualizationProps) => { useEffect(() => { if (!parsed.data.features) { const { hits } = parsed.data; - const { geometry } = config.map; + const { geometry, properties } = config.map; - setFeatures(TypesenseUtils.getFeatures([], hits, geometry)); + setFeatures(TypesenseUtils.getFeatures([], hits, geometry, properties)); } }, [parsed]);