WmtsLayer wmtsLayer = new WmtsLayer("http://36.110.12.228:8866/maptiles/tile/service/wmts/1847007008240704/0/0/6666666666666?request=GetCapabilities", "1847007008240704", TileInfo.ImageFormat.PNG); wmtsLayer.addLoadStatusChangedListener(new LoadStatusChangedListener() { @Override public void loadStatusChanged(LoadStatusChangedEvent loadStatusChangedEvent) { if(loadStatusChangedEvent.getNewLoadStatus() == LoadStatus.LOADED){ mapView.getMap().getBasemap().getBaseLayers().add(wmtsLayer); } } }); wmtsLayer.loadAsync();
Hi @LiChunfeng, it's actually best to pass the clean base service endpoint because the SDK will issue its own GetCapabilities request.Can you try the following URL in your constructor and let us know if this works?
WmtsLayer WmtsLayer( "http://36.110.12.228:8866/maptiles/tile/service/wmts", "1847007008240704", TileInfo.ImageFormat.PNG );
Here's also a sample service that should work with GetCapabilities appended:http://sampleserver6.arcgisonline.com/arcgis/rest/services/WorldTimeZones/MapServer/WMTS?request=GetCapabilitiesCan you try it with layer id "WorldTimeZones" and your existing code and see how it behaves?Alternatively, can you provide us an instance of your service that resolves in the browser? Several efforts to load the URL you provided simply timed out.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.