jsapi-resources
jsapi-resources copied to clipboard
Arcgis DynamicMapServiceLayer overlay WebTiledLayer
Hi there, I am using arcgis api 3.20. I tried to overlay arcgis dynamicmapservicelayer on top of webtiledlayer but it only shows the dynamicmapservicelayer and ignoring the webtiledlayer. And if i reverse the order, only webtiledlayer is shown. How is this so?
Below is my sample code.
var maptiler1 =new WebTiledLayer("http://localhost:8080/tms/1.0.0/sweden/EPSG3414/{level}/{col}/{row}.png", {
"copyright": '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="https://carto.com/attributions">CARTO</a>',
"id": "cartodb",
"opacity": 0
});
map.addLayer(maptiler1);
var layer = new esri.layers.ArcGISDynamicMapServiceLayer("http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer", {
"opacity":0.5
});
map.addLayer(layer);
Any help will be appreciated!
Generally, these types of questions more technical in nature and not directly related to the resources within this repo should be directed to our support team, [email protected].
@hgonzago is right. another option would be using geonet.
given that your tiles were cooked in EPSG:3414, you might try supplying a tileInfo object that describes the non-web mercator projection in the WebTiledLayer constructor.
its tough to provide further assistance given that your tiles are only accessible on your own machine.
@hgonzago @jgravois thanks for the feedback. I will drop [email protected] a email on this as well as geonet. Just a quick question, I have a TMS (Tiled Map Service) end point and I would like to use it in arcgis .js to build a application, do you guys think that is possible? the TMS is not from arcgis, rather a 3rd party source.
Cheers
I have a TMS (Tiled Map Service) end point and I would like to use it in arcgis .js to build a application, do you guys think that is possible? the TMS is not from arcgis, rather a 3rd party source.
Depending on the details, but yes the JSAPI supports this using WebTiledLayer.
Thanks @bsvensson , I am one step closer to what I would like to achieve. I bet the missing step left is the tileInfo which i would need to as mentioned by @jgravois ,that describes the non-web mercator projection in the WebTiledLayer constructor.
But I was being told before that EPSG:3414 "origin is an attribute of the grid and is independent of the actual projection". As such, what should I feed in the origin below? And is my declaration for tileInfo in the correct manner?
EPSG:3414 standard -> https://sirent.inlis.gov.sg/CoordinateSystems.aspx
var maptiler =new
WebTiledLayer("http://localhost:8080/tms/1.0.0/sweden/EPSG3414/{level}/{col}/{row}.png", {
tileInfo: new TileInfo({
dpi: 96,
rows: 256,
cols: 256,
origin: {
x: ??,
y: ??
},
spatialReference: {
wkid: 3414
},
lods: lods
})
});
Cheers =)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you need additional assistance please contact Esri Technical Support. Thank you for your contributions.
This issue has been automatically closed due to inactivity. If you need additional assistance please contact Esri Technical Support.