luomus / laji

Frontend for Finnish Biodiversity Information Facility (FinBIF) data portal laji.fi (and other *.laji.fi frontends)
MIT License
7 stars 0 forks source link

Observation map cannot search after drawing a feature #547

Closed olzraiti closed 1 month ago

olzraiti commented 1 month ago

Repro

  1. Goto https://laji.fi/observation/map
  2. Draw a new polygon ("piirrä kuvio kartalle")

What happens?

Nothing!

What should happen?

The "Hae" button should be enabled

olzraiti commented 1 month ago

Actually, the issue seems to be that I drew so large polygon that the API responds:

{
    "status": 400,
    "message": "Polygon area is too large: Max height or width is 100000 meters",
    "localizedMessage": {
        "fi": "Polygoni kattaa liian suuren alueen: Maksimi korkeus tai leveys on 100000 metriä",
        "en": "Polygon area is too large: Max height or width is 100000 meters",
        "sv": "Polygonområdet är för stort: Max höjd eller bredd är 100000 meter"
    }
}

The code should already take this into account... something maybe in the API. I'll look into it.