Custom tile layer bug

11-10-2019 04:15 AM
New Contributor

I try to reproduce custom tile layer (here) but it show me wrong tiles.

Is it bug? Is it possible to fix?

Kind regards,

Efim Dezhin

0 Kudos
1 Reply
Esri Contributor

Hi Efim,

this is a documentation problem, I'll work on getting this fixed in the next documentation update. Until then, the solution is to pass the AbortSignal in the esriRequest method: 

// This method fetches tiles for the specified level and size.
// Override this method to process the data returned from the server.
fetchTile: function(level, row, col, options) {
   // call getTileUrl() method to construct the URL to tiles
   // for a given level, row and col provided by the LayerView
   var url = this.getTileUrl(level, row, col);

   // request for tiles based on the generated url
   return esriRequest(url, {
      responseType: "image",
      signal: options.signal

Here's the working sample: 

Thank you for reporting this!