Skip to content

Commit

Permalink
Update inature reference according to discussion
Browse files Browse the repository at this point in the history
  • Loading branch information
HarelM committed Aug 11, 2024
1 parent c2b2200 commit 6fa6fd2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions IsraelHiking.Web/src/application/services/poi.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ export class PoiService {
}

private async enritchFeatureFromINature(feature: GeoJSON.Feature): Promise<void> {
const iNatureRef = feature.properties["inature:website"];
const iNatureRef = feature.properties["ref:IL:inature"];
const address = `https://inature.info/w/api.php?action=query&prop=revisions&rvprop=content&format=json&titles=${iNatureRef}&origin=*`;
const iNatureJson = await firstValueFrom(this.httpClient.get(address).pipe(timeout(3000))) as any;
const content = iNatureJson.query.pages[Object.keys(iNatureJson.query.pages)[0]].revisions[0]["*"];
Expand Down Expand Up @@ -706,7 +706,7 @@ export class PoiService {
if (feature.properties.wikidata) {
wikidataPromise = this.enritchFeatureFromWikimedia(feature, language);
}
if (feature.properties["inature:website"] && language === "he") {
if (feature.properties["ref:IL:inature"] && language === "he") {
inaturePromise = this.enritchFeatureFromINature(feature);
}
if (type === "node" && feature.properties.place) {
Expand Down

0 comments on commit 6fa6fd2

Please sign in to comment.