some words of caution1.1.1 uses CRS1.3.0 uses SRShave you triedwmsLayer.SpatialReference = new esri.SpatialReference({wkid:3857}); or whatever you want it to be?btw 3857 and 102100 are the same thing
Thx for your answer...I did try it before but I double check and it's not workingRegarding SRS I think is the other way around right? (SRS for 1.1.1 and CRS for 1.3.0) the call generated is something like this:https://services.digitalglobe.com/mapservice/wmsaccess?CONNECTID=xyz&SERVICE=WMS&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=TRUE&STYLES=&VERSION=1.1.1&LAYERS=DigitalGlobe:Imagery&WIDTH=1053&HEIGHT=651&SRS=EPSG:102100&BBOX=-9382860.162660452,4998573.770502064,-9377829.6507363,5001683.8020905(changing to 1.3.0 call is the same but CRS)https://services.digitalglobe.com/mapservice/wmsaccess?CONNECTID=xyz&SERVICE=WMS&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=TRUE&STYLES=&VERSION=1.3.0&LAYERS=DigitalGlobe:Imagery&WIDTH=1053&HEIGHT=651&CRS=EPSG:102100&BBOX=-9382860.162660452,4998573.770502064,-9377829.6507363,5001683.8020905and I got back a 403 (FORBIDDEN) .. if I replace both 102100 with 3857 I got back the image...
I use expressserver from lizardtech, maybe its different.I know support for 102100 did not exist out of the box, i needed to manually configure the server to handle it. Maybe digitalglobe needs to do the same?
<CODE><SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"><SPAN style="font-family: arial, helvetica, sans-serif;">Same issue still in version 3.20, but from this <A href="http://gis.stackexchange.com/questions/141040/arcgis-javascript-api-how-to-define-spatial-reference-for-wms-layer" rel="nofollow noopener noreferrer" target="_blank">StackOverflow post</A> it can be changed before adding the WMS layer to the map.</SPAN><BR /></SPAN>
wmsLayer<SPAN class="punctuation token">.</SPAN>spatialReferences<SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN> <SPAN class="operator token">=</SPAN> <SPAN class="number token">3857</SPAN><SPAN class="punctuation token">;</SPAN> map<SPAN class="punctuation token">.</SPAN><SPAN class="token function">addLayers</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">[</SPAN>wmsLayer<SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN></SPAN>
<SPAN class="" style="color: #303336; border: 0px; font-size: 13px;"> </SPAN>
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.