Isocrones do not fit in bbox if center is left of 0°


#1

Hi,
I am working to build a shiny app adding features to a sample file of Andrzej.
After build the Isocrones I want the Isocrones fit into the app window.
This works fine until I create Isocrones in Europe or Asia, but if I create the Isocrones in the US or SA the bbox is much to large. The Limit of this behavior is at 0° . Isocrones in East London works fine in Belfast not.

Here a link to test.
https://geonexion.shinyapps.io/isocron_pt/?lat=-26.8562477&lon=-49.2391903&zoom=12

The Code is:
observe({

leafletProxy("map") %>%
  
  clearGeoJSON() %>%
  
  addGeoJSON(isochrones())%>%
fitBBox(isochrones()$bbox)

})

Cheers,
Thomas


#2

Hi Thomas,

thank you for reaching out! The root cause of the observed behavior is a bug in the isochrones endpoint which returns a corrupted bounding box if the points lie on the Southern or Western hemisphere. We will look into this, you can track the progress in the issue.

Cheers,
Andrzej