I have a layer on version 3 displaying parcels outline.
It's using a dojo.declare esri.layers.WebTileLayer class using an esri.layers.TileMapServiceLayer with a constructor that has all the information (extent, lods,tileinfo, copyright, getTileUrl() function to get the tile from the level,row,col ...
to set the layer I use the declared esri.layers.WebTileLayer with the url to the service (has https://host/getMap.aspx and some parameters including the layers and styles and last parameter is tileId= )
it ends up requesting and displaying on the map view something like:
tile url: https://host/GetMap.aspx?S=yy&layers=parcels,Pro&SLD=Parcels.sld.xml,Address.sld.xml&tileId=03200100...
Since TileMapServiceLayer is gone on version 4 I wonder how to replace it (if possible) and what actual type of layer will do it (all points to WebTileLayer on version 4 but cannot figure how to). Any help will be AMAZING!
This is what I did with my tiled aerials. They are hosted in AGOL. Not sure if it will help but...
using 4.29
"esri/layers/TileLayer"
......
var latestAerialLayer = new TileLayer({
url: "https://tiles.arcgis.com/tiles//arcgis/rest/services/FDOT23_Aerials/MapServer",
id: "latestAerial",
visible: "true",
listMode: "hide-children"
});