POST
|
Problem solved... the modified code below works. private SpatialReference spatialReference = SpatialReference.create(28992); private double[] bbox = new double[]{646.36, 308975.28, 276050.82, 636456.31}; mapView = (MapView) findViewById(R.id.map); ArcGISMap map = new ArcGISMap(spatialReference); map.setInitialViewpoint(new Viewpoint(new Envelope(bbox[0], bbox[1], bbox[2], bbox[3], spatialReference))); WmtsLayer wmtsLayer = new WmtsLayer("https://geodata.nationaalgeoregister.nl/tiles/service/wmts?request=GetCapabilities&service=WMTS", "top100raster"); Basemap baseMap = new Basemap(wmtsLayer); map.setBasemap(baseMap); mapView.setMap(map);
... View more
02-14-2018
11:22 PM
|
1
|
0
|
836
|
POST
|
Using the Android Runtime API 100.2.0, I would like to add a WMTS layer as a basemap. Unfortunately the layer is not showing in the map. The WMTS service url is https://geodata.nationaalgeoregister.nl/tiles/service/wmts?request=getcapabilities. It seems to be available in Key Value Pairs (KVP) encoding only. One of the layers in this WMTS service is the one I would like to use as a basemap: "top100raster". The spatial reference is Amersfoort / RD New: EPSG Projection -- Spatial Reference. Activity code: private SpatialReference spatialReference = SpatialReference.create(28992); private double[] bbox = new double[]{646.36, 308975.28, 276050.82, 636456.31}; mapView = (MapView) findViewById(R.id.map); mapView.setViewpoint(new Viewpoint(new Envelope(bbox[0], bbox[1], bbox[2], bbox[3], spatialReference))); ArcGISMap map = new ArcGISMap(spatialReference); mapView.setMap(map); WmtsLayer wmtsLayer = new WmtsLayer("https://geodata.nationaalgeoregister.nl/tiles/service/wmts?", "top100raster")); Basemap baseMap = new Basemap(wmtsLayer); map.setBasemap(baseMap); There are no errors in the project, also it compiles and runs without errors. The map however is empty 😞 What am I missing here?
... View more
02-09-2018
12:53 AM
|
1
|
1
|
1630
|
Title | Kudos | Posted |
---|---|---|
1 | 02-14-2018 11:22 PM | |
1 | 02-09-2018 12:53 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|