Hi, I can no longer override fetchTile() in WebTileLayer.createSubclass() after I upgrade the ES module from version 4.24.* to version 4.25.*. It is no longer call the fetchTile() function. I tried the CDN version from https://js.arcgis.com/4.25/ but its working fine
Like @AndyGup said, it's a regression. If you override `fetchTile()` I'd suggest to extend `BaseTileLayer` https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-BaseTileLayer.html which is better suited for extensibility.
Hi @AriefAbuBakar it's very possible that your code was working accidentally. You need to use the "extends" keyword when building subclasses with ES modules: https://developers.arcgis.com/javascript/latest/implementing-accessor/#create-a-simple-subclass. It can be challenging when overriding API functionality because properties, methods and patterns within the underlying API Class are subject to change.
// Psuedo-example using @arcgis/core ES modules class ExampleWebTileLayer extends WebTileLayer { constructor(properties?:any) { super(properties); } . . . }
Update - this looks like a regression at 4.25, thanks for reporting. We've opened an issue to fix it.
@AriefAbuBakarthis is now fixed and will be available at 4.26. You can test it today by installing the latest 'next' build:
npm i @arcgis/core@next
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.