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
add comment

1 Answer

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
1  
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
add comment

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.