From 79c66a86799c311f7c1baf1d4116f6451b73bb87 Mon Sep 17 00:00:00 2001 From: drnextgis Date: Wed, 26 Dec 2012 11:24:02 -0800 Subject: [PATCH] Updated MemoryDatasource (markdown) --- MemoryDatasource.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/MemoryDatasource.md b/MemoryDatasource.md index 883a184..5b1e795 100644 --- a/MemoryDatasource.md +++ b/MemoryDatasource.md @@ -9,7 +9,9 @@ A in-memory datasource. Sample usage: ```python - from mapnik2 import Feature, MemoryDatasource, Geometry2d - ds = MemoryDatasource() - ds.add_feature(Feature(1, Geometry2d.from_wkt("POINT(2 5)"), name="Alberto")) + import mapnik + ds = mapnik.MemoryDatasource() + f = mapnik.Feature(mapnik.Context(), 1) + f.add_geometries_from_wkt("POINT(2 5)") + ds.add_feature(f) ``` \ No newline at end of file