1

I'm trying to add a WMS layer from a geoserver using the ArcGIS for Javascript API. I've gotten there example working from there sample codes but I'm unable to load my layer from the geoserver succesfully. When I load the web application I receive no errors so I don't even know what I might be doing wrong I just get the basemap and my search when the application is loaded the WMS layer just doesn't appear.

var map;
require([
  'esri/map', 'esri/dijit/Search', 'esri/layers/WMSLayer', 'esri/layers/WMSLayerInfo', 'esri/geometry/Extent',
  'dojo/_base/array', 'dojo/dom', 'dojo/dom-construct', 'dojo/parser',
  'dijit/layout/BorderContainer', 'dijit/layout/ContentPane', 'dojo/domReady!'
], function(Map, Search, WMSLayer, WMSLayerInfo, Extent, array, dom, domConst, parser) {
  parser.parse();

  map = new Map('map', {
    basemap: 'streets',
    center: [-96, 37],
    zoom: 4
  });

    var jira_issues = new WMSLayerInfo({
    name: 'postgis:jiraissues_reports',
    title: 'jiraissues_reports'
  });


  var resourceInfo = {
    extent: new Extent(-126.40869140625, 31.025390625, -109.66552734375, 41.5283203125, {
      wkid: 4326
    }),
    layerInfos: [jira_issues]
  };
  var wmsLayer = new WMSLayer('http://opsengapp03.core.in.here.com:9999/geoserver/postgis/wms', {
    resourceInfo: resourceInfo,
    visibleLayers: ['jira_issues']
  });

    wmsLayer.spatialReferences[0] = 4326;
  map.addLayers([wmsLayer]);

    var s = new Search({
        map: map
     }, "search");
     s.startup();

});

closed as off-topic by PolyGeo Aug 20 '15 at 20:07

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.

1

I found out the answer, it was human error. I was using the incorrect "name". Once 'postgis:' was removed the layer was found!

Not the answer you're looking for? Browse other questions tagged or ask your own question.