void SetBaseLayerWMS() { try { BaseLayerWMS = new WmsLayer(); BaseLayerWMS.ID = "BaseLayerWMS"; BaseLayerWMS.Layers = new string[] { "met10" }; BaseLayerWMS.Url = "http://geoint.lmic.state.mn.us/cgi-bin/wmsll?"; //THIS IS WHAT I'M TRYING TO GET. //BaseLayerWMS.Url = "http://geoint.lmic.state.mn.us/cgi-bin/wmsll?VERSION=1.3.0&REQUEST=GetMap&CRS=EPSG:4326&BBOX=44.43,-94.08,45.44,-92.68&WIDTH=847&HEIGHT=611&LAYERS=met10&STYLES=&EXCEPTIONS=XML&FORMAT=image/jpeg&BGCOLOR=0xFEFFFF&TRANSPARENT=TRUE"; BaseLayerWMS.Initialized += new EventHandler<EventArgs>(BaseLayerWMS_Initialized); BaseLayerWMS.InitializationFailed += new EventHandler<EventArgs>(BaseLayerWMS_InitializationFailed); } catch (Exception) { throw; } }
This is what the WmsLayer class is generating and doesn't work because it has the wrong spatial reference and extent http://geoint.lmic.state.mn.us/cgi-b...034,5392901.75
- <Layer queryable="0" opaque="1"> <Name>met10</Name> <Title>2010 color</Title> <CRS>EPSG:26915</CRS> <CRS>EPSG:4326</CRS> <CRS>EPSG:26914</CRS> - <EX_GeographicBoundingBox> <westBoundLongitude>-94.08</westBoundLongitude> <eastBoundLongitude>-92.68</eastBoundLongitude> <southBoundLatitude>44.43</southBoundLatitude> <northBoundLatitude>45.44</northBoundLatitude> </EX_GeographicBoundingBox> <BoundingBox CRS="EPSG:26915" minx="415485" miny="4920156.9" maxx="525110.1" maxy="5032056.3" resx="0.3" resy="0.3" /> - <MetadataURL type="FGDC"> <Format>text/html</Format> <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.mngeo.state.mn.us/chouse/airphoto/ecmn10.html" /> </MetadataURL> <MaxScaleDenominator>75000000</MaxScaleDenominator> </Layer>
Basically it's building a url that is asking for the wrong FORMAT and CRS for the Layer that I specified.
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.