<div dir="ltr">You're right! <br><br>Here is the code that tries to make visible a new layer (simulacionesGrupo):<br><br> public function filterPostRequest(FilterRequestModifier $request) {<br> $layerList = $request->getValue('layers');<br>
$layerList[] = 'simulacionesGrupo';<br> $request->setValue('layers', $layerList); <br> $this->tempinfo = implode('--', $layerList);<br> } <br><br>it is in the Client part of a plugin that implements FilterProvider.<br>
<br>To create the layer:<br><br> function initializeRequest($requ) {<br> if ($requ) {<br> $pluginManager = $this->serverContext->getPluginManager();<br><br> if (empty($pluginManager->mapOverlay))<br>
throw new CartoserverException("mapOverlay plugin not loaded, ");<br><br> $mapOverlay = $pluginManager->mapOverlay;<br> $layer = new LayerOverlay();<br> $layer->name = "simulacionesGrupo";<br>
$layer->action = BasicOverlay::ACTION_INSERT;<br> $layer->data = "raster/ozono.99.tif";<br> $result = $mapOverlay->updateMap($layer);<br> }<br> }<br><br>it is in the Server part of the same plugin that extends ClientResponderAdapter.<br>
<br>Anyway, if the "simulacionesGrupo" layer is defined in the mapfile, and the line with ACTION_INSERT is not used in the last piece of code, and the next line is commented in 'layers.ini':<br>; mapInfo.initialMapStates.default.layers.simulacionesGrupo.selected = true<br>
<br>it doesn't show up in the main map.<br><br><br><br><div class="gmail_quote">On Thu, Jul 17, 2008 at 10:25 AM, Oliver Christen <<a href="mailto:oliver.christen@camptocamp.com">oliver.christen@camptocamp.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff">
<div><font size="2">Hi</font></div>
<div><font size="2"></font> </div>
<div><font size="2">without looking at your code, I cant really know what may or
may not happens.</font></div>
<div><font size="2"></font> </div>
<div><font size="2">regards</font></div>
<div><font size="2">Oliver</font></div>
<blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;"><div><div></div><div class="Wj3C7c">
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">----- Original Message ----- </div>
<div style="background: rgb(228, 228, 228) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
<b>From:</b>
<a title="nozimica@gmail.com" href="mailto:nozimica@gmail.com" target="_blank">Nicolás Eugenio
Ozimiça</a> </div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b> <a title="cartoweb-users@lists.maptools.org" href="mailto:cartoweb-users@lists.maptools.org" target="_blank">cartoweb-users@lists.maptools.org</a>
</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b> Thursday, July 17, 2008 4:16
PM</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b> [Cartoweb-users] Problem
creating new layers</div>
<div><br></div>
<div dir="ltr">Hi all!<br><br>I'm using the 'mapOverlay' plugin in order to
modify the layers of my project. It has worked well to modify existing layers,
but when I try to insert a new one, it simply does nothing.<br><br>Perhaps it
is related to another problem I'm facing: I can only hide a layer with
"FilterProvider". If I try to make visible a layer that is not set as visible
by default in the "layers.ini" file, nothing happens...<br><br>I hope someone
could help!<br>Thanks in advance!<br clear="all"><br>-- <br>Nicolás Eugenio
Ozimiça<br>Universidad de Chile </div>
</div></div><p>
</p><hr>
<p></p>_______________________________________________<br>Cartoweb-users
mailing
list<br><a href="mailto:Cartoweb-users@lists.maptools.org" target="_blank">Cartoweb-users@lists.maptools.org</a><br><a href="http://lists.maptools.org/mailman/listinfo/cartoweb-users" target="_blank">http://lists.maptools.org/mailman/listinfo/cartoweb-users</a><br>
</blockquote></div>
</blockquote></div><br><br clear="all"><br>-- <br>Nicolás Eugenio Ozimiça<br>Universidad de Chile
</div>