[Cartoweb-users] Queries on layers using mapoverlay
Fabio D'Ovidio
fabiodovidio at gmail.com
Thu Mar 20 11:03:14 EDT 2008
Hi!
I've update dinamically one layer using mapoverlay as described here:
3.2.3. Filter data
$layer = new LayerOverlay();
$layer->name = "field";
$layer->data = "geom FROM (SELECT gid, geom, name FROM fields WHERE farm_id = {$farmId}) " .
"AS foo USING UNIQUE gid USING SRID=-1";
$mapOverlay = $this->serverContext->getPluginManager()->mapOverlay;
$mapOverlay->updateMap($layer);
Now, i want to query this layer and display the result.
Query doesn't work because the modification are not saved in the
project's mapfile: the result of the mapfile modifications are specific
to a session.
My debug map file is debug.map.
$pluginManager = $this->serverContext->getPluginManager();
if (empty($pluginManager->mapOverlay))
throw new CartoserverException("mapOverlay plugin not
loaded, "
. "and needed to draw the
new element");
$pluginManager->mapOverlay->updateMap($layer);
$this->serverContext->getMapObj()->save('C:/debug.map');
How can I do to query my updated layer?
Thanks
--
Ing. Fabio D'Ovidio
iQuadro - Informatica e Innovazione s.r.l.
Via C. Pisacane 23, Aversa (CE) - 81031
Web : www.ii2.it
Tel.: 081 197 57 600
mail: fabiodovidio at gmail.com
More information about the Cartoweb-users
mailing list