TerriaJS / nationalmap

Australia's NationalMap
https://nationalmap.gov.au
122 stars 45 forks source link

Esri MapServer issues? #1213

Open meh9 opened 1 year ago

meh9 commented 1 year ago

Looking at NatMap, the Grey Scale basemap from GA doesn't seem to be working:

Screenshot 2023-05-09 at 13 55 24

However, if you look at it using the Esri viewer it works fine:

https://services.ga.gov.au/gis/rest/services/NationalBaseMap_GreyScale/MapServer?f=jsapi

Have we introduced a bug in our MapServer support?

Note that the other GA provided basemap National Base Map appears to work fine in NatMap. Perhaps compare differences from the services? This one works: https:/services.ga.gov.au/gis/rest/services/NationalBaseMap/MapServer/

steve9164 commented 1 year ago

The GA service specifies a maximumScale value of 260000001. Together with https://github.com/TerriaJS/terriajs/blob/main/lib/Core/scaleToDenominator.ts#L3 (called from https://github.com/TerriaJS/terriajs/blob/main/lib/Models/Catalog/Esri/ArcGisMapServerCatalogItem.ts#L448 with the values

scaleDenominatorToLevel(260000001, true, false)

which returns a maximumLevel value of 1, which is then passed onto the ArcGisMapServerImageryProvider so only level 1 tiles are fetched.