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 have a Leaflet map and want to add two of my own small polygon layers (currently in shapefile format, but they could be converted to GeoJSON). Can this be done without a mapserver to publish them as map services? Is so, are there specific instructions for this?

If it can not be done, are there "free" services for publishing small map layers?

share|improve this question
Do you want to use a mapserver? You would not need one necessarily. Leaflet can render GeoJSON in Javascript in the browser. –  underdark Mar 31 '13 at 22:53
my question is I set in mapserver wms service as seen in the file at the same time set up the index file with the call to the web service and doubles as seen in the photo, I tested this web service from first and works without problems, let me know because it comes so thanks The map file, index.html and image output map are here www.dapboyaca.gov.co/tools/Mapa.zip –  Christiam Niño Aug 28 '13 at 2:13

2 Answers 2

Convert your shapefile to geojson. I use QGIS and save as geojson. Make sure you pick the WGS84/EPSG:4326 projection before saving.

Then use this plugin to call the geojson layer. leaflet-ajax Or you can follow the Leaflet tutorial for geojson

share|improve this answer
The above suggestion is a way to get a map published quickly. Keep in mind, the larger the geojson file the slower it'll take to render. Try to limit the number of features to 100 unless of course they're points. Plus you should remove attributes which you don't plan on using. –  geomajor56 Apr 4 '13 at 19:37

it doesn't work for me, I can validate the GeoJSON with the online tool. Here is the GeoJson I get:

"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },

"features": [
{ "type": "Feature", "properties": { "FID": 0.000000 }, "geometry": { "type": "MultiPoint", "coordinates": [ [ 8.9777585, 45.661008099999982 ] ] } },
{ "type": "Feature", "properties": { "FID": 1.000000 }, "geometry": { "type": "MultiPoint", "coordinates": [ [ 8.9466397, 45.622191399999984 ] ] } }
share|improve this answer

Your Answer


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.