diff --git a/Logic/GeoOperations.ts b/Logic/GeoOperations.ts index e239951..a687dee 100644 --- a/Logic/GeoOperations.ts +++ b/Logic/GeoOperations.ts @@ -16,9 +16,7 @@ export class GeoOperations { } static centerpointCoordinates(feature: any){ - const coordinates = turf.center(feature).geometry.coordinates; - coordinates.reverse(); - return coordinates; + return turf.center(feature).geometry.coordinates; } /** diff --git a/Models/Constants.ts b/Models/Constants.ts index 44371d6..ef3f8eb 100644 --- a/Models/Constants.ts +++ b/Models/Constants.ts @@ -2,7 +2,7 @@ import { Utils } from "../Utils"; export default class Constants { - public static vNumber = "0.6.3"; + public static vNumber = "0.6.4"; // The user journey states thresholds when a new feature gets unlocked public static userJourney = { diff --git a/assets/layers/drinking_water/drinking_water.json b/assets/layers/drinking_water/drinking_water.json index b59d754..5a057db 100644 --- a/assets/layers/drinking_water/drinking_water.json +++ b/assets/layers/drinking_water/drinking_water.json @@ -41,6 +41,10 @@ ] } }, + "calculatedTags": [ + "_closest_other_drinking_water_id=feat.closest('drinking_water').id", + "_closest_other_drinking_water_distance=Math.floor(feat.distanceTo(feat.closest('drinking_water')) * 1000)" + ], "minzoom": 13, "wayHandling": 1, "presets": [ @@ -122,6 +126,11 @@ } } ] + }, + { + "render":{ + "en": "The closest other drinking water fountain is {_closest_other_drinking_water_distance} meter" + } } ] } \ No newline at end of file