AnsweredAssumed Answered

How do I determine current level, row, and column based on extent for a layer?

Question asked by RWinter85 on Jun 23, 2016



Is there a relatively simple way to determine what the level, row , and column are for the current extent?  I know level is easy, map.getLevel(), but I am not sure how to determine what the row's and column's are currently on the map so I can request the correct tiles.  If I extend the TiledMapServiceLayer, I can use the getTileUrl function, but it renders images in a div and I need to render to a canvas element. 


Just some background on what I am looking at doing.  I have a html canvas element I would like to render images onto.  These images are stood up in a s3 bucket in a tiled format( http://....../{z}/{x}/{y}.png).  I have created a custom layer that places a canvas element on the map, but I would like to know which tile to request so I can add it to the canvas.  I need to do some advanced filtering and read the image data from canvas so I cannot use a simple WebTiledLayer.