upgrade to titiler>=0.21,<0.22 and use default map.html template #85
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Slesa reported an error in the
/mapviewer for a netcdf dataset: s3://sid-test-public/CH4_emissions_2010.nchttps://n032aaar2i.execute-api.us-west-2.amazonaws.com/WebMercatorQuad/map?url=s3%3A%2F%2Fsid-test-public%2FCH4_emissions_2010.nc&variable=ANTH_CH4&rescale=0%2C5&colormap_name=viridis
The problem was that the bounds in the tilejson for this dataset extend beyond the limits of latitude and longitude which was breaking some of the leaflet javascript code
{ "tilejson": "2.2.0", "version": "1.0.0", "scheme": "xyz", "tiles": [ "http://localhost:8000/tiles/WebMercatorQuad/{z}/{x}/{y}@1x?url=s3%3A%2F%2Fsid-test-public%2FCH4_emissions_2010.nc&variable=ANTH_CH4&rescale=0%2C5&colormap_name=viridis&reproject=nearest" ], "minzoom": 0, "maxzoom": 0, "bounds": [-182.5, -90.9777777777778, 177.5, 90.9777777777778], "center": [-2.5, 0, 0] }My first solution was to clamp any bounding box coordinates that exceed the logical limits to the limit value (-180, -90, 180, 90) before asking leaflet to zoom to the bounding box. This worked but then I decided to try upgrading
titiler.coreto the latest version so we could use get some recent improvements to themap.htmltemplate. Themap.htmltemplate intitiler.coredid not need any modifications to work for these datasets.