Conversation
dadiorchen
left a comment
There was a problem hiding this comment.
@RubenSmn please test this in the sandbox, there might be problem if the server side is returning lon rather then lng
| const zoom_level = this.map.getZoom() | ||
| const res = await this.requester.request({ | ||
| url: `${this.apiServerUrl}nearest?zoom_level=${zoom_level}&lat=${center.lat}&lng=${center.lng}`, | ||
| url: `${this.apiServerUrl}nearest?zoom_level=${zoom_level}&lat=${center.lat}&lon=${center.lon}`, |
There was a problem hiding this comment.
@RubenSmn seems this requirs the change on API side too?
There was a problem hiding this comment.
The problem is also that the center does return a lng, this is a leaflet thing
There was a problem hiding this comment.
Okay, we can do this way: revert this PR and re-create it, then let's go to the API side and finish the correction, then when can merge this PR, overwise, this PR will cause problem, right?
There was a problem hiding this comment.
Could we update the API so that this will be fixed?
There was a problem hiding this comment.
I created a PR for the API Greenstand/treetracker-web-map-api#353
There was a problem hiding this comment.
Great, I'll take a look, but I vaguely remember it's the PostgreSQL return lon so we align with it's convention maybe, you can try this:
select region_id id, ST_ASGeoJson(centroid) centroid from active_tree_region, region
where region.id = active_tree_region.region_id
To check the return json from postgresql
There was a problem hiding this comment.
Maybe there are some postgresql function can do some traslation
There was a problem hiding this comment.
@dadiorchen @RubenSmn is there anything i have to do?
|
🎉 This PR is included in version 2.5.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Description
Updated all lng to lon for consistency
Issue(s) addressed
Resolves #127