0

I am trying to build first WMS service with GeoServer. I have made layer from shape and layer preview works fine. How can I open this layer with QGIS? How to do map with OpenLayers?

I have tried to search GeoServer/OpenLayers guide for Dummies, but not find yet.

5
  • possible duplicate of How do GIS web apps work?
    – Ian Turton
    Apr 4 '13 at 8:15
  • @iant It definitely isn't an exact duplicate of that question. That question dealt with WebMapping, and looking at the question, I feel that OP might be asking about WMS clients in general( Given that Qgis is present in the question) Apr 4 '13 at 8:26
  • Yes, I am trying to work with QGIS at first. Of course I would like to use it in other programs also. When connecting, should I add server:8080 or server:8080/geoserver or what? What I have to do at server after creating layer with GeoServer?
    – GISSami
    Apr 4 '13 at 8:51
  • Now I managed to get it work! I add server:8080/geoserver/Workspace
    – GISSami
    Apr 4 '13 at 8:56
  • my answer to that question (atleast) discussed how to use WMS in OL and other clients
    – Ian Turton
    Apr 4 '13 at 13:11
2

Geoserver can server WMS requests. You need a WMS client to take advantage of this, and see the data. OpenLayers is a browser based WMS clients. There are thousands (millions ?) of WMS clients, and Qgis is just one of them.

To consume a WMS service in Qgis, you need to go to Layer >> Add WMS Layer in Qgis' Menu.

This is an excellent tutorial on consuming WMS services in Qgis: Tutorial: Using Online Data via WMS in Quantum GIS

5
  • Ok, problem 1 solved, but how to make map from same GeoServer layer with OpenLayers?
    – GISSami
    Apr 4 '13 at 9:22
  • @GISSami Have you looked at: openlayers.org/dev/examples/wms.html Apr 4 '13 at 9:29
  • I have tried similar to that, but both give error code="LayerNotDefined" locator="layers"could not find layer basic
    – GISSami
    Apr 4 '13 at 10:28
  • Now I got it! Just replacing basic with my layer! Thanks for help!
    – GISSami
    Apr 4 '13 at 10:33
  • Not sure if this is best way to do this var map = new OpenLayers.Map('map'); var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", "http://server:8080/geoserver/ows/", {layers: 'Rakennusviivat,Hallintoalue,Kiinteistoraja'} ); var dm_wms = new OpenLayers.Layer.WMS( "Rakennukset", "http://server:8080/geoserver/ows/", { layers: "Rakennusviivat,Hallintoalue,Kiinteistoraja", transparent: "true", format: "image/png" }, {isBaseLayer: false} );
    – GISSami
    Apr 4 '13 at 10:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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