load geojson from db

This commit is contained in:
Anton Tranelis 2024-05-07 13:57:45 +02:00
parent 4575be4522
commit 3a11da1c3f
4 changed files with 14 additions and 14 deletions

22
package-lock.json generated
View File

@ -17,7 +17,7 @@
"react-dom": "^18.2.0",
"react-rnd": "^10.4.1",
"react-router-dom": "^6.23.0",
"utopia-ui": "^3.0.0-alpha.149"
"utopia-ui": "^3.0.0-alpha.152"
},
"devDependencies": {
"@types/react": "^18.2.79",
@ -1969,20 +1969,20 @@
}
},
"node_modules/@tanstack/query-core": {
"version": "5.32.1",
"resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.32.1.tgz",
"integrity": "sha512-mCWa1wdGb1jiny4+qYegbSeadcFj+Nq65KFSs4A1DRveoIq7SrTwUhqu7hrB6d54cQH5x59DfJvxusn3w1Cj/g==",
"version": "5.35.1",
"resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.35.1.tgz",
"integrity": "sha512-0Dnpybqb8+ps6WgqBnqFEC+1F/xLvUosRAq+wiGisTgolOZzqZfkE2995dEXmhuzINiTM7/a6xSGznU0NIvBkw==",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
}
},
"node_modules/@tanstack/react-query": {
"version": "5.32.1",
"resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.32.1.tgz",
"integrity": "sha512-+nXLMB0JK0XwTJ+lQt49DPNLrbSppni9N5W5yMR085yW3YaRKRUFhfVTER3TvQd1UycHpoGPFnt1gHiijXERAg==",
"version": "5.35.1",
"resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.35.1.tgz",
"integrity": "sha512-i2T7m2ffQdNqlX3pO+uMsnQ0H4a59Ens2GxtlMsRiOvdSB4SfYmHb27MnvFV8rGmtWRaa4gPli0/rpDoSS5LbQ==",
"dependencies": {
"@tanstack/query-core": "5.32.1"
"@tanstack/query-core": "5.35.1"
},
"funding": {
"type": "github",
@ -7245,9 +7245,9 @@
"license": "MIT"
},
"node_modules/utopia-ui": {
"version": "3.0.0-alpha.149",
"resolved": "https://registry.npmjs.org/utopia-ui/-/utopia-ui-3.0.0-alpha.149.tgz",
"integrity": "sha512-hKYVQSWHsL9wDSeL0aWF/C87zhGDj4PVjg7gLbfHFC9w1cQe62SnN05FjbDlOoGn3av82opZoeTnKRS2AGaAQw==",
"version": "3.0.0-alpha.152",
"resolved": "https://registry.npmjs.org/utopia-ui/-/utopia-ui-3.0.0-alpha.152.tgz",
"integrity": "sha512-/qcnjFMXj0WbCUeTs3dwub/kNgzS+krXtEbWeFqxgzfCEtAAcly+WeEXEfwtOWThyMter6k0ug4aaw3oNvIGQQ==",
"dependencies": {
"@heroicons/react": "^2.0.17",
"@tanstack/react-query": "^5.17.8",

View File

@ -19,7 +19,7 @@
"react-dom": "^18.2.0",
"react-rnd": "^10.4.1",
"react-router-dom": "^6.23.0",
"utopia-ui": "^3.0.0-alpha.149"
"utopia-ui": "^3.0.0-alpha.152"
},
"devDependencies": {
"@types/react": "^18.2.79",

View File

@ -30,7 +30,7 @@ export class itemsApi<T> implements ItemsApi<T>{
async getItems() {
try {
return await directusClient.request(readItems(this.collectionName as never, { fields: ['*', "relations.*", "user_created.*", {offers: ['*'], needs: ['*']}] , filter: this.filter, limit: 500 }));
return await directusClient.request(readItems(this.collectionName as never, { fields: ['*', "relations.*", "user_created.*", {offers: ['*'], needs: ['*']}] , filter: this.filter, limit: 2000 }));
} catch (error: any) {
console.log(error);
if (error.errors[0]?.message)

View File

@ -28,7 +28,7 @@ function MapContainer({ layers, map }: { layers: Array<LayerProps>, map: any })
return (
<UtopiaMap zoom={map.zoom || 5} center={map.center? [map.center?.coordinates[1], map.center?.coordinates[0]] : [50.6, 9.5]} height='calc(100dvh - 64px)' width="100%" >
<UtopiaMap geo={map.geo} zoom={map.zoom || 5} center={map.center? [map.center?.coordinates[1], map.center?.coordinates[0]] : [50.6, 9.5]} height='calc(100dvh - 64px)' width="100%" >
{layers && apis &&
layers.map(layer =>
<Layer