[Cartoweb-users] how to refresh legend layers after mapoverlayoperation?

gasdia73 gasdia73 at gmail.com
Wed Apr 30 05:53:03 EDT 2008


I don't think it has to do with the cache, cause i already have a custom
profile with :

profile = custom
noMapResultCache = true

on server_conf/server.ini in my project..

Should i delve into the details of the layers plugin?



Oliver Christen wrote:
> 
> Hi
> 
> I presume the map cache is not refreshed.
> Maybe you could try to force a map cache refresh. See this post on how to 
> test that:
> http://lists.maptools.org/pipermail/cartoweb-users/2008-February/003297.html
> though in your case you would need to set some public variable or function 
> in your mapoverlay plugin and access that from the getMap function from 
> MapResultCache.php
> 
> A proper mecanism to force map cache refresh is not implemented yet, we
> are 
> still thinking about how to do it in a clean way.
> 
> regards
> Oliver
> 
>>
>> 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.
>>
>> _______________________________________________
>> Cartoweb-users mailing list
>> Cartoweb-users at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/cartoweb-users
>> 
> 
> _______________________________________________
> Cartoweb-users mailing list
> Cartoweb-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/cartoweb-users
> 
> 

-- 
View this message in context: http://www.nabble.com/how-to-refresh-legend-layers-after-mapoverlay-operation--tp16964245p16979232.html
Sent from the cartoweb-users mailing list archive at Nabble.com.



More information about the Cartoweb-users mailing list