4

I have a series of shapefiles that I need to render as a map on a webpage. I have an ASP.Net server, although I would prefer something that will work on Linux servers. I would like to find an easy to set up opensource or freeware solution if at all possible. This cannot be overlaid over Google maps. It is just a map of the county I live in and that is all that needs to be shown. The shapefiles consist of the streets, boundary lines, street names, etc. Each one is a separate shapefile. This map will need to be zoomable as well.

I do not have a copy of ArcGIS so I cannot do any conversions with it. Although I have QGIS installed. It's server is giving me issues though.

3

5 Answers 5

7

This depends on what you want & need. You may only need "dead" bitmaps, or you may need "alive" objects in your client.

There are numerous solutions out there, depending on your needs.

You need a client in your browser, OpenLayers is perhaps the most prefered open source solution.

As for the service backends, e.g WMS and WFS, Geoserver and Mapserver are good candidates. Both of these supports shapefiles. Also, both of these runs on multiple OS'es, of course including Linux.

5

A quick solution to serve up shapefiles on a basemap in a webapp is through a free arcgis.com account. They allow you upload .shp files, symbolize, and lay them on a base map. The share tool allows provides a html script that can be copied. I served up some symbolized counties to my blogger page in a webmap. Note that ESRI is trying to monetize arcgis.com but this did work recently.

Oyvind's post is valid as well.

4

You can convert the shapefiles to geojson or gml or kml. After that you can use and tweak the examples in OpenLayers or Leaflet to display your data.

2

Setting up your own server seems like a lot of work in order to serve a simple map of a small area, especially if you don't already have experience in doing so.

I think your time would be much more wisely spent using a hosted web mapping product. You could put a fully featured map together in MangoMap in an hour or two without having to write a single line of code. Or if you want to write some code to do some heavier customisation you should look at Mapbox which will allow all the mapping stuff to be done on their server and you have the client code on your server.

1
  • 8
    You really should put in a disclaimer that you are the CEO of MangoMaps, if you are suggesting it as the solution. Aug 14, 2013 at 2:47
2

for a quick solution, you can check out shapefile-js.

A binary shapefile loader and canvas-based renderer, for javascript. Many caveats.

test it:

http://www.prodevelop.es/files/fm/public/downloads/jldominguez/shp.html

more info:

Rendering local shapefiles with HTML5

http://www.prodevelop.es/en/blog/11/12/11/rendering-local-shapefiles-html5

and my another answer about this topic here.

image image is taken from jldominguez's blog

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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