Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I added a WMS layer

var wmslayer = new OpenLayers.Layer.WMS("Cities", {http://someip.com/ArcGIS/services/BurkeMcDowell2013_06_26FORGOPI/MapServer/WMSServer?request=GetCapabilities&service=WMS", { transparent: true }, {isBaseLayer: false});}

And the url which openlayers generated and call

{someip.com/ArcGIS/services/BurkeMcDowell2013_06_26FORGOPI/MapServer/WMSServer?request=GetCapabilities&service=WMS&SRS=EPSG%3A900913&TRANSPARENT=TRUE&VERSION=1.1.1&STYLES=&FORMAT=image%2Fpng&BBOX=-10018754.17,2504688.5425,-7514065.6275,5009377.085&WIDTH=256&HEIGHT=256}

But its not returning images but a message in console,

Resource interpreted as Image but transferred with MIME type application/vnd.ogc.wms_xml: http://someip.com/ArcGIS/services/BurkeMcDowell2013_06_26FORGOPI/MapSer…X=-10018754.17,5009377.085,-7514065.6275,7514065.6275&WIDTH=256&HEIGHT=256". OpenLayers.js:460)

OpenLayers.Tile.Image.OpenLayers.Class.setImgSrc OpenLayers.js:460 OpenLayers.Tile.Image.OpenLayers.Class.initImage OpenLayers.js:460 OpenLayers.Tile.Image.OpenLayers.Class.renderTile OpenLayers.js:456 OpenLayers.Tile.Image.OpenLayers.Class.draw OpenLayers.js:456 OpenLayers.Layer.Grid.OpenLayers.Class.initGriddedTiles OpenLayers.js:480 OpenLayers.Layer.Grid.OpenLayers.Class.moveTo OpenLayers.js:469 OpenLayers.Layer.OpenLayers.Class.redraw OpenLayers.js:265 OpenLayers.Layer.HTTPRequest.OpenLayers.Class.redraw OpenLayers.js:451 OpenLayers.Map.OpenLayers.Class.addLayer OpenLayers.js:230 Objs.adddlayer CreateMapMediator.js:1531 f.event.dispatch jquery-1.7.2.min.js:3 h.handle.i

can any one help me solve it..? (I added someip.com coz i cant add a numeric ip there*)

share|improve this question
    
Which is the response returned from server? (not the console message) –  EricSonaron Jun 28 '13 at 18:19
    
Get response from server as XML(its not added in the question). I think we get the correct response. but the its not showing in the map –  Mufeed K Kasim Jun 28 '13 at 18:29

1 Answer 1

up vote 1 down vote accepted

The answer is in the question! The request you included in your question is a GetCapabilities request. This returns an XML response detailing which layers and coordinate systems are available in your service. A WMS client would use this information to then construct a GetMap request, providing arguments including layer IDs (or names), a bounding box, optional styling information etc.

I suggest you look for an introduction to the basic concepts of WMS online (and I don't mean the OGC spec). You would also benefit from looking at the request structure in one of the OpenLayers WMS demo applications.

share|improve this answer
    
Thanks tomfumb.... –  Mufeed K Kasim Jun 29 '13 at 8:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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