From e17f3197084f8bf29a809c52fd6b511120c49998 Mon Sep 17 00:00:00 2001 From: "piguchi@geolonia.com" Date: Thu, 8 Aug 2024 10:56:15 +0900 Subject: [PATCH 1/2] =?UTF-8?q?lookfor=E3=82=92match=E3=81=AB=E5=A4=89?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7383a0d..f1b7d49 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ const GeoJsonlookfor = new gl.GeoJsonlookfor(geojson); ``` 4. We can look for features with "bakery" in their properties in the following ways. ```javascript -GeoJsonlookfor.lookfor('bakery'); +GeoJsonlookfor.match('bakery'); console.log(GeoJsonlookfor.getGeoJSON()); ``` @@ -78,7 +78,7 @@ const geojson = { } const GeoJsonlookfor = new gl.GeoJsonlookfor(geojson); -const res = GeoJsonlookfor.lookfor('clothing store').getGeoJSON(); +const res = GeoJsonlookfor.match('clothing store').getGeoJSON(); console.log(res); ``` @@ -108,7 +108,7 @@ console.log(res); 2. Look for a feature with "restaurant" and "A". ```typescript -const res = GeoJsonlookfor.lookfor('restaurant').lookfor('A').getGeoJSON(); +const res = GeoJsonlookfor.match('restaurant').match('A').getGeoJSON(); console.log(res); ``` From 648696b7e347bba10598e8db0d8ae846a6d0a45c Mon Sep 17 00:00:00 2001 From: "piguchi@geolonia.com" Date: Thu, 8 Aug 2024 10:58:49 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=E4=B8=8D=E8=A6=81=E3=81=AA=E3=83=95?= =?UTF-8?q?=E3=82=A1=E3=82=A4=E3=83=AB=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utile.ts | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 src/utile.ts diff --git a/src/utile.ts b/src/utile.ts deleted file mode 100644 index c90e2a6..0000000 --- a/src/utile.ts +++ /dev/null @@ -1,22 +0,0 @@ - - -// const filterParticularProperty = (geojson: any, conditionProperty: {[key: string]: string}) => { -// try { -// if (geojson === undefined || geojson === null || typeof geojson !== 'object' || typeof geojson === 'string') { -// throw new Error('Invalid GeoJSON'); -// } -// const features = geojson.features; -// const keys = Object.keys(conditionProperty); - -// geojson = { -// "type": "FeatureCollection", -// "features": features.filter((feature: any) => { -// return feature.properties[].includes(JSON.stringify(conditionProperty)); -// }) -// }; - -// return geojson; -// } catch (err: any) { -// throw new Error(err); -// } -// }; \ No newline at end of file