I need to let a user upload vector layers he created with QGIS or MapInfo professional to my website (using OpenLayers as client and either Geoserver or Mapserver as WMS).

What will be the easiest way for a non programmer user to draw vector layer in program (one of the two I mentioned above) and be able to upload it to my server and add it to the map?

  • I think..Geo server because its very easy to upload the layer + you can set SLD (design for point/line/polygon layer) in geoserver and you can check its preview very easy in geo server..I hope this will help you..you can check here (docs.geoserver.org/stable/en/user/services/wms/reference.html) – Sunil Nov 26 '12 at 5:29
  • 1
    Do your users really need to use a desktop GIS? Why don't you implement it in Openlayers completely? – underdark Nov 26 '12 at 6:55

if you want to load any shapefile to openlayers canvas, you have to envisage slowness of your browser but if you convert your shapefile to KML or GeoJSON it can minimize the slowness. For uploading any GeoJSON or KML file to your browser, you have to write some code in serverside.

Showing your vectors on openlayers, still as shapefile you can check out shapefile-js library here. beside this Matt Conway has a good script which callbacks an array of OpenLayers.Feature.Vector for the given URL.

Matt Conway's example:

enter image description here

i hope it helps you...

  • Thank you. I know I can convert the shapefile to KML from QGIS for example , But how do I convert it to GeoJSON ? – Alophind Nov 26 '12 at 10:09
  • right click on your layer, Save as > (Format) GeoJSON. – Aragon Nov 26 '12 at 10:17
  • GeoJSON preffered over KML ? – Alophind Nov 26 '12 at 14:34

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.