Closed Elhazard closed 9 years ago
@Elhazard This is related to #291 and needs to be fixed in both offlineTilesEnabler
and OfflineTilesEnablerLayer
.
I'll take a deeper look at the code to see what is involved to fix this.
Thanks for the info. I will tell my supervisor about this
@Elhazard I have an old branch that I'll test and see if it works still. If it does I'll cut a new release. Please note that it will cause a breaking change if you are hosting the Esri JS Library locally because it will now need to include esri/IdentityManager
Hi
Yesterday, I try to create a basemap using OfflineTileEnablerLayer by something like this
var basemapLayer = new O.esri.Tiles.OfflineTileEnablerLayer("https://map.nostramap.com/arcgis/rest/services/StreetMapEn/MapServer?token=oj9G9dQBfk2XsRORPb1rKBB_DG-a-YJy7F20zXRsJMlIs-g7hHv6JCGIDgVOJ7Th");
As a secured map service, this needs a token in order to access. However, it returns an error "SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data" and cannot initialize basemap object.
Somehow, this map service still works well if I simply use "ArcGISTiledMapServiceLayer" to new MapLayer object.
So I wonder is there any difference between OfflineTileEnablerLayer and ArcGISTiledMapServiceLayer that make OfflineTileEnablerLayer cannot use secured map services?
Thanks