POST
|
I am trying to add the OS open basemap https://api.os.uk/maps/raster/v1/wmts to my web application, written in the javascript API. I can view the capabilities of the service in a browser and I have added it to ArcMap (using a valid api key) without any problem, but when I try to set it as the initial basemap of my web application it doesn't load, although no errors are reported. If I then try to select it from the Basemap Gallery, I see this message: "esri.dijit.BasemapGallery: service not accessible." I can't work out why this is happening or what I need to do to fix it, any suggestions would be welcome. I have included some of my code to show what I am doing. Instantiate the map: _map = new Map("uxMapContentPaneDiv", { logo: false, navigationMode: "css-transforms", autoResize: false, extent: new Extent({ "xmin": 537000, "ymin": 150000, "xmax": 645000, "ymax": 176000, "spatialReference": { "wkid": 27700 } }), showAttribution: true, showInfoWindowOnClick: true, slider: true, sliderPosition: "top-right", sliderStyle: "small" }); Instantiate the WMTS service: var layer; require(["dojo/on", "dojo/_base/lang", "esri/layers/WMTSLayer", "esri/layers/WMTSLayerInfo", "esri/layers/TileInfo", "esri/SpatialReference"], function (on, lang, WMTSLayer, WMTSLayerInfo, TileInfo, SpatialReference) { var tileInfo = new TileInfo({ "dpi": 96, "format": "png", "compressionQuality": 0, "spatialReference": new SpatialReference({ "wkid": 27700 }), "origin": { "x": -5220400.0, "y": 4470200.0 }, "lods": [{ "level": "EPSG:27700:0", "resolution": 169.33367200067735, "scale": 640000 }, { "level": "EPSG:27700:1", "resolution": 84.66683600033868, "scale": 320000 }, { "level": "EPSG:27700:2", "resolution": 42.33341800016934, "scale": 160000 }, { "level": "EPSG:27700:3", "resolution": 21.16670900008467, "scale": 80000 }, { "level": "EPSG:27700:4", "resolution": 10.583354500042335, "scale": 40000 }, { "level": "EPSG:27700:5", "resolution": 5.291677250021167, "scale": 20000 }, { "level": "EPSG:27700:6", "resolution": 2.6458386250105836, "scale": 10000 }, { "level": "EPSG:27700:7", "resolution": 1.3229193125052918, "scale": 5000 }, { "level": "EPSG:27700:8", "resolution": 0.6614596562526459, "scale": 2500 }, { "level": "EPSG:27700:9", "resolution": 0.33072982812632296, "scale": 1250 }, { "level": "EPSG:27700:10", "resolution": 0.19843789687579377, "scale": 750 }] }); var layerInfo = new WMTSLayerInfo({ tileInfo: tileInfo, identifier: "Leisure_27700", fullExtent: new Extent({ "xmin": 537000, "ymin": 150000, "xmax": 645000, "ymax": 176000, "spatialReference": { "wkid": 27700 } }), initialExtent: new Extent({ "xmin": 537000, "ymin": 150000, "xmax": 645000, "ymax": 176000, "spatialReference": { "wkid": 27700 } }), tileMatrixSet: "EPSG:27700", format: "png" }); var options = { serviceMode: "RESTful", copyright: "Ordnance Survey", layerInfo: layerInfo, visible: true, visibleAtMapScale: true, customParameters: { activeLayer: { id: "Leisure_27700" } } }; layer = new WMTSLayer("https://api.os.uk/maps/raster/v1/wmts?key=AAAAAAAAAAAAAAAAAAAAAAA&request=getcapabilities&service=WMTS", options); layer.spatialReference = new SpatialReference({ "wkid": 27700 }); layer.title = "OS Colour Leisure"; layer.initialExtent = new Extent({ "xmin": 537000, "ymin": 150000, "xmax": 645000, "ymax": 176000, "spatialReference": { "wkid": 27700 } }); if (layer !== null && layer !== undefined) { _map.addLayer(layer); } }); Instantiate the Basemap Gallery: require(["dojo/on", "dojo/_base/lang", "esri/dijit/BasemapGallery", "esri/dijit/BasemapLayer", "esri/dijit/Basemap", "dojo/_base/array", "dojo/ready"], function (on, lang, BasemapGallery, BasemapLayer, Basemap, array, ready) { ready(function () { var basemapList = []; const g_basemapLayers = ["_osColour", "_osGreyScale", "Leisure_27700"]; array.forEach(g_basemapLayers, function (baseMapId) { switch (baseMapId) { case "_osColour": var _osColour = new BasemapLayer({ url: "https://myServer/server/rest/services/BASEMAPS/OS_Colour/MapServer", opacity: 0.9 }); var colourBasemap = new Basemap({ id: baseMapId, layers: [_osColour], title: "Colour", thumbnailUrl: "/images/streets.jpg" }); basemapList.push(colourBasemap); break; case "_osGreyScale": var _osGreyScale = new BasemapLayer({ url: "https://myServer/server/rest/services/BASEMAPS/OS_Grey/MapServer", opacity: 0.9 }); var greyscaleBasemap = new Basemap({ id: baseMapId, layers: [_osGreyScale], title: "Black and White", thumbnailUrl: "/images/greyscale.jpg" }); basemapList.push(greyscaleBasemap); break; case "Leisure_27700": var _leisure27700 = new BasemapLayer({ url: "https://api.os.uk/maps/raster/v1/wmts?key=AAAAAAAAAAAAAAAAAAAAAAA&request=getcapabilities&service=WMTS", opacity: 0.9 }); var leisure27700Basemap = new Basemap({ id: baseMapId, layers: [_leisure27700], title: "OS Colour", thumbnailUrl: "/images/streets.jpg" }); basemapList.push(leisure27700Basemap); break; } }); var _basemapGallery = new BasemapGallery({ showArcGISBasemaps: false, map: _map, basemaps: basemapList }, "uxBasemapGallery"); _basemapGallery.startup(); _basemapGallery.select(selectedLayer); }); });
... View more
12-21-2022
06:40 AM
|
0
|
0
|
327
|
POST
|
Portal error : when I am trying to access secured rest service which I added as an item and shared with a group. and when I try to access this url I get this error : You do not have permissions to access this resource or perform this operation Any help please!
... View more
07-21-2016
07:14 AM
|
0
|
0
|
876
|
POST
|
Portal error : when I am trying to access secured rest service which I added as an item and shared with a group. I get this error : You do not have permissions to access this resource or perform this operation
... View more
07-21-2016
07:11 AM
|
0
|
0
|
688
|
POST
|
Robert, This is the first time we have used a WMS service, currently we only specify matchAll=true and the username and password in the proxy entry - what is the format of the attribute that specifies the token service uri ?
... View more
03-23-2016
07:29 AM
|
0
|
1
|
449
|
POST
|
Thank you so much Robort for helping me in sorting this issue
... View more
11-20-2015
08:01 AM
|
0
|
1
|
1375
|
POST
|
Hi Robort, I have done what you said but when I lunch WAB Dev it is openning in HTTPS https://ABCD:3344/webappbuilder/?id=5 , hence the config file also have HTTPS by default
... View more
11-20-2015
07:21 AM
|
0
|
4
|
1375
|
POST
|
Hi Robort, I have made the change to http in signininfo.json file but it is being overwritten when I created a new app in WAB Dev. Guess I need to create a new app ID ?
... View more
11-20-2015
06:53 AM
|
0
|
6
|
1375
|
POST
|
Hi Robort, Your right!!! signininfo.json is having HTTPS. So we just need to change it and go ahead ?
... View more
11-20-2015
06:38 AM
|
1
|
8
|
3469
|
POST
|
Hi Robert, > All the urls in the config.json file were having HTTPS On your instruction I have changed them to http > yes can access other non WAB applications on my IIS > When I launch WAB Dev it comes up with HTTPS url
... View more
11-20-2015
01:17 AM
|
0
|
10
|
3469
|
POST
|
Hi Robert, checked config.json file it has https so i have changed to http. yes I have WAB Dev and have downloaded this app from it and are attempting to deploy the app to your web serve When I registered my WAB Dev on AGOL I provided http address. I am still facing the same issue.
... View more
11-19-2015
08:38 AM
|
0
|
12
|
3469
|
POST
|
Hi Robert, > This the ssl present in my system 2.> I have used http but it has automatically changed to https 3.> yes I have used computer name as well 4.> yes the app is in virtual directory can you let me know what else I can try. Thanks
... View more
11-19-2015
07:07 AM
|
0
|
14
|
3469
|
POST
|
Hi, I have downloaded the application code from web appbuilder developer version 1.2 and hosted in my local IIS Server. But when I try to run the application with this url “http://localhost/simple/ “ it start fine later it give the below shown error Can anyone suggest me how can I fix this issue. Thanks
... View more
11-19-2015
06:08 AM
|
0
|
16
|
10058
|
POST
|
I want to use a Transverse Mercator not a Web Mercator. The Web Mercator Easting, Northing returned are approx 120m out The code gsvc = new GeometryService("http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer"); map.on("click", projectToWebMercator); function projectToWebMercator(evt) { map.graphics.clear(); var point = evt.mapPoint; var symbol = new SimpleMarkerSymbol().setStyle("diamond"); var graphic = new Graphic(point, symbol); var outSR = new SpatialReference(27700); Does anyone know a projectToTransverseMercator method??? Thanks, Clive
... View more
10-21-2015
09:07 AM
|
0
|
0
|
1647
|
Title | Kudos | Posted |
---|---|---|
1 | 11-20-2015 06:38 AM |
Online Status |
Offline
|
Date Last Visited |
2 weeks ago
|