From 7263fd6667c173d098c7c55e994c3972b8caae5b Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Thu, 19 Sep 2013 19:34:57 -0700 Subject: [PATCH] Updated PostGIS (markdown) --- PostGIS.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/PostGIS.md b/PostGIS.md index ca727e5..04c1541 100644 --- a/PostGIS.md +++ b/PostGIS.md @@ -126,6 +126,9 @@ Plugin datasource initialization example code can be found on [[PluginArchitectu A PostGIS datasource may be created as follows: ```cpp +#include +#include + { parameters p; p["type"]="postgis"; @@ -136,7 +139,11 @@ A PostGIS datasource may be created as follows: p["password"]=""; Layer lyr("Roads"); +#if MAPNIK_VERSION >= 200200 + set_datasource(datasource_cache::instance().create(p)); +#else set_datasource(datasource_cache::instance()->create(p)); +#endif lyr.add_style("roads"); m.addLayer(lyr); }