[Cartoweb-users] how to refresh legend layers after mapoverlay
operation?
gasdia73
gasdia73 at gmail.com
Tue Apr 29 12:22:44 EDT 2008
hi,
in layer.ini i set autolayerlegend = true, and it works for the static map
file.
Now i have a server plugin in which i redefine some layers color like this :
public function handlePreDrawing($requ) {
$color = new ColorOverlay();
$color->red = 255;
$color->green = 0;
$color->blue = 0;
$style = new StyleOverlay();
$style->index = 0;
$style->color = $color;
$label = new LabelOverlay();
$label->outlineColor = $color;
$class = new ClassOverlay();
//$class->action = BasicOverlay::ACTION_INSERT;
$class->action = BasicOverlay::ACTION_UPDATE;
$class->name = 'tombe';
$class->styles = array($style);
$class->label = $label;
$layer1 = new LayerOverlay();
$layer1->name = 'tombe';
$layer1->classes = array($class);
$mapOverlay = $this->serverContext->getPluginManager()->mapOverlay;
$mapOverlay->updateMap($layer1);
$this->serverContext->getMapObj()->save('debug.map');
}
Now the color changes correctly, but the color of the icons stays the one of
the static
map file.
Any idea?
thanx
--
View this message in context: http://www.nabble.com/how-to-refresh-legend-layers-after-mapoverlay-operation--tp16964245p16964245.html
Sent from the cartoweb-users mailing list archive at Nabble.com.
More information about the Cartoweb-users
mailing list