Updated MemoryDatasource (markdown)
parent
b63947b91e
commit
79c66a8679
1 changed files with 5 additions and 3 deletions
|
@ -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)
|
||||
```
|
Loading…
Reference in a new issue