Replication Case: https://jkan.riskdatalibrary.org/datasets/rdls_lss-mdgundrr_desinventar_a/
This dataset contains the following BBOX information: "bbox": [ 43.22, -25.6, 50.5, -11.94 ]. This follows the standard geospatial array format of [min_lon, min_lat, max_lon, max_lat].
Verification:
When plotting this exact BBOX using geojson.io, the geometry is perfectly correct and frames Madagascar as expected.
Click to view GeoJSON verification code
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"name": "Madagascar Bounding Box"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[43.22, -25.6],
[50.5, -25.6],
[50.5, -11.94],
[43.22, -11.94],
[43.22, -25.6]
]
]
}
}
]
}
Expected Behavior / Working Comparison:
Other datasets for the exact same country that do not have BBOX information render perfectly because the minimap falls back to using geoBoundaries files.
Working Case: https://jkan.riskdatalibrary.org/datasets/rdls_hev-mdg_grma_agriculturaldroughtrisk/
Proposed Solutions
- Fix Leaflet Coordinate Parsing: The minimap appears to be using Leaflet, which expects coordinates in
[Latitude, Longitude] format. The JSON metadata provides the BBOX in [min_lon, min_lat, max_lon, max_lat]. The frontend code needs a parsing step to map the JSON array to Leaflet's bounds correctly (e.g., formatting it as [[min_lat, min_lon], [max_lat, max_lon]] before passing it to L.latLngBounds).
- Metadata Fallback Logic:
- Force country-level datasets (
scale: national) to bypass the BBOX value entirely and strictly use geoBoundaries for visual consistency.
- Restrict the BBOX rendering logic to only apply to
global, regional, sub-national, and urban scales where standard administrative boundaries might not apply.
Replication Case: https://jkan.riskdatalibrary.org/datasets/rdls_lss-mdgundrr_desinventar_a/
This dataset contains the following BBOX information:
"bbox": [ 43.22, -25.6, 50.5, -11.94 ]. This follows the standard geospatial array format of[min_lon, min_lat, max_lon, max_lat].Verification:
When plotting this exact BBOX using geojson.io, the geometry is perfectly correct and frames Madagascar as expected.
Click to view GeoJSON verification code
{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "name": "Madagascar Bounding Box" }, "geometry": { "type": "Polygon", "coordinates": [ [ [43.22, -25.6], [50.5, -25.6], [50.5, -11.94], [43.22, -11.94], [43.22, -25.6] ] ] } } ] }Expected Behavior / Working Comparison:
Other datasets for the exact same country that do not have BBOX information render perfectly because the minimap falls back to using
geoBoundariesfiles.Working Case: https://jkan.riskdatalibrary.org/datasets/rdls_hev-mdg_grma_agriculturaldroughtrisk/
Proposed Solutions
[Latitude, Longitude]format. The JSON metadata provides the BBOX in[min_lon, min_lat, max_lon, max_lat]. The frontend code needs a parsing step to map the JSON array to Leaflet's bounds correctly (e.g., formatting it as[[min_lat, min_lon], [max_lat, max_lon]]before passing it toL.latLngBounds).scale: national) to bypass the BBOX value entirely and strictly use geoBoundaries for visual consistency.global,regional,sub-national, andurbanscales where standard administrative boundaries might not apply.