I'm using the API of ArcGIS for JavaScript to display a cached map service. So far, I've been following the documentation and this is what I have.
const mapLayer = new TileLayer({
url: "https://sigmun.implanchihuahua.org/webserver/rest/services/Metrica_Chihuahua/PU023_Dosificacion_Zonificacion_Secundaria_2021_MC/MapServer",
opacity: 0.3
});
const map = new Map({
basemap: 'osm',
layers: [mapLayer],
});
Even though I created the TileLayer instance it doesn't show up, but if I removed the basemap line, like this.
const mapLayer = new TileLayer({
url: "https://sigmun.implanchihuahua.org/webserver/rest/services/Metrica_Chihuahua/PU023_Dosificacion_Zonificacion_Secundaria_2021_MC/MapServer",
opacity: 0.3
});
const map = new Map({
// basemap: 'osm',
layers: [mapLayer],
});
What I want to do is display both things, the basemap and the tile layer.

