Question about adding WMS layer to a webpage...

Discussion created by jeremy777sears on Jan 25, 2013
Im having issues adding a wms to a webpage.

I have followed the tutorial here.

I can get this working in my browser.

My issue happens when I attempt to add a different wms. I am attempting to add this service:

The issue is that I can not see any data or layers when I use this wms.

I believe that this wms has a few layers in it and the wms used in the tutorial posted above uses a simple service. I think I need to specify what layers Id like to pull out to display on the webpage.

Im hoping someone could point me to a tutorial or documentation on how to use javascript to specify the layers I want to display. Or perhaps suggest a way for me to use the WMS in my webpage.

Here is the code I am currently using. I get a blank map window in the page when rendered by my browser.

    <title>Create a Map</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <link rel="stylesheet" type="text/css" href="">

    <script type="text/javascript" src=""></script>
    <script type="text/javascript">

      function init() {
        var myMap = new esri.Map("mapDiv");
  // original code, this works fine
      //  var myTiledMapServiceLayer = new esri.layers.ArcGISTiledMapServiceLayer("");
      //  myMap.addLayer(myTiledMapServiceLayer);
  // Ive swapped the url of the example WMS with the url of our WMS, but all that is drawn in my browser is an empty map window.
  // need to specify what layer(s) I want to pull from this service?
        var OurData = new esri.layers.ArcGISTiledMapServiceLayer("http://swihqokgis64b/GISPRD3/services/THM_ABORIGINAL_E/MapServer/WMSServer");

    <div id="mapDiv" class="tundra" style="width:900px; height:600px; border:1px solid #000;"></div>
    <h4>Work flow:</h4>
<li>Create a map.</li>
<li>Add an ArcGISTiledMapServiceLayer.</li>