IFRCGo/go-frontend

Mapbox issue at admin2 map selection

tovari opened this issue · 4 comments

tovari commented

The admin selection on the map doesn't work in every case on
https://go-stage.ifrc.org/three-w/new

In certain cases, the admins cannot be selected by clicking on the map:
image

Analysis from @frozenhelium:
sometimes, the mapbox tile request fails, and we are not able to select regions from map, the select input still works, but cliking from the map doesn't. This is an issue due to the nature of mapbox, and we couldn't find an easy fix at the moment.

Is there a way to make the service more reliable?

cc: @davidmuchatiza, @batpad

batpad commented

Can you give me a bit more precise way to reproduce this problem?

@frozenhelium - let's chat about this? Maaaaybe another approach could be to use the geometries in our API instead of trying to get them via the Mapbox tiles? I'm not fully sure how that would work and that might require a fair bit of changes, but maybe that is an option?

cc @geohacker here.

https://go-stage.ifrc.org/three-w/new
kép
click "Select Province/Region"
And then select admin area.
:-) I could not reproduce the issue. All the territories could be selected, BUT I had to click to the name, not to the territory itself.

batpad commented

@frozenhelium might it help if we added an API endpoint that accepted a lat-long and returned the admin2 that contained it?

sometimes, the mapbox tile request fails, and we are not able to select regions from map

Can you paste the request that's failing? Are we using queryRenderedFeatures?