We will show a simple demonstration below where a shapefile is converted
to geojson format and loaded in as a layer in a leaflet powered map.
Click http://ogre.adc4gis.com/ to open the ogre web client
Click on Browse and load in the shapefile. Before loading the shape file,
create a Zip file containing the .shp, .shx, .dbf and .prj file. Ogre web client accepts the
shapefile in Zipped file format. Once the file is loaded, click on CONVERT TO GEOJSON tab.
The output is in plain text format as shown in the screenshot below. Copy the contents of the window.
Copy and paste the contents to the script as in the source code below
The copied plain text is illustrated as red text.
See live map by clicking this link:
Download plain text version of the source code by clicking the link below:
Thank you for following the blog.