From db9bfd55d87e4ef77a8f8e03bd8b2ec3cc8c2bf5 Mon Sep 17 00:00:00 2001 From: Marc Harter Date: Mon, 26 Aug 2013 16:58:35 -0500 Subject: [PATCH] updated; code samples --- readme.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/readme.md b/readme.md index 1ba7823..8921663 100644 --- a/readme.md +++ b/readme.md @@ -23,36 +23,36 @@ You can use it to parse shapefiles (.shp) or dBase files (.dbf) or both. Here a Load Shapefile Only - var shapefile = new Shapefile("myshapefile.shp",function(data){ + new Shapefile("myshapefile.shp", function (data) { // data returned - }; + }); Load DBF Only - var dbf = new DBF("mydbf.dbf",function(data){ + new DBF("mydbf.dbf", function (data) { // data returned - }; + }); Load Shapefile w/ DBF Attributes - var shapefile = new Shapefile({ + new Shapefile({ shp: "myshape.shp", dbf: "myshape.dbf" - }, function(data){ + }, function (data) { // data returned - }; + }); Use with OpenLayers - var - parser = new OpenLayer.Format.GeoJSON(), - features, - shapefile = new Shapefile({ - shp: "myshape.shp", - dbf: "myshape.dbf" - }, function(data){ - features = parser.read(data.geojson); - }; + var parser = new OpenLayer.Format.GeoJSON(), + features; + + new Shapefile({ + shp: "myshape.shp", + dbf: "myshape.dbf" + }, function (data) { + features = parser.read(data.geojson); + }); ### Resources