<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 6.00.6000.16640" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>
<DIV><FONT size=2>Hi</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>maybe try to enable the new layer after <FONT size=3>$result = 
$mapOverlay-&gt;updateMap($layer); </FONT>:</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV>$msLayer = 
$this-&gt;serverContext-&gt;getMapObj()-&gt;getLayer($result-&gt;layers[0]-&gt;index);<BR>$msLayer-&gt;set('status', 
MS_ON);</DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>regards</FONT></DIV>
<DIV><FONT size=2>Oliver</FONT></DIV></DIV>
<BLOCKQUOTE dir=ltr 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=nozimica@gmail.com href="mailto:nozimica@gmail.com">Nicolás Eugenio 
  Ozimiça</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A 
  title=oliver.christen@camptocamp.com 
  href="mailto:oliver.christen@camptocamp.com">Oliver Christen</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Cc:</B> <A 
  title=cartoweb-users@lists.maptools.org 
  href="mailto:cartoweb-users@lists.maptools.org">cartoweb-users@lists.maptools.org</A> 
  </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, July 17, 2008 4:42 
  PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Cartoweb-users] Problem 
  creating new layers</DIV>
  <DIV><BR></DIV>
  <DIV dir=ltr>You're right! <BR><BR>Here is the code that tries to make visible 
  a new layer (simulacionesGrupo):<BR><BR>&nbsp;&nbsp;&nbsp; public function 
  filterPostRequest(FilterRequestModifier $request) 
  {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $layerList = 
  $request-&gt;getValue('layers');<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  $layerList[] = 
  'simulacionesGrupo';<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  $request-&gt;setValue('layers', $layerList); 
  <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this-&gt;tempinfo = 
  implode('--', $layerList);<BR>&nbsp;&nbsp;&nbsp; } <BR><BR>it is in the Client 
  part of a plugin that implements FilterProvider.<BR><BR>To create the 
  layer:<BR><BR>&nbsp;&nbsp;&nbsp; function initializeRequest($requ) 
  {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($requ) 
  {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  $pluginManager = 
  $this-&gt;serverContext-&gt;getPluginManager();<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  if 
  (empty($pluginManager-&gt;mapOverlay))<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  throw new CartoserverException("mapOverlay plugin not loaded, 
  ");<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  $mapOverlay = 
  $pluginManager-&gt;mapOverlay;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  $layer = new 
  LayerOverlay();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  $layer-&gt;name = 
  "simulacionesGrupo";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  $layer-&gt;action = 
  BasicOverlay::ACTION_INSERT;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  $layer-&gt;data = 
  "raster/ozono.99.tif";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  $result = 
  $mapOverlay-&gt;updateMap($layer);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  }<BR>&nbsp;&nbsp;&nbsp; }<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 
  &lt;<A 
  href="mailto:oliver.christen@camptocamp.com">oliver.christen@camptocamp.com</A>&gt; 
  wrote:<BR>
  <BLOCKQUOTE class=gmail_quote 
  style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
    <DIV bgcolor="#ffffff">
    <DIV><FONT size=2>Hi</FONT></DIV>
    <DIV><FONT size=2></FONT>&nbsp;</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>&nbsp;</DIV>
    <DIV><FONT size=2>regards</FONT></DIV>
    <DIV><FONT size=2>Oliver</FONT></DIV>
    <BLOCKQUOTE 
    style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(0,0,0) 2px solid; MARGIN-RIGHT: 0px">
      <DIV>
      <DIV></DIV>
      <DIV class=Wj3C7c>
      <DIV 
      style="FONT: 10pt arial; font-size-adjust: none; font-stretch: normal">----- 
      Original Message ----- </DIV>
      <DIV 
      style="BACKGROUND: rgb(228,228,228); FONT: 10pt arial; font-size-adjust: none; font-stretch: normal; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial"><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: 10pt arial; 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: 10pt arial; font-size-adjust: none; font-stretch: normal"><B>Sent:</B> 
      Thursday, July 17, 2008 4:16 PM</DIV>
      <DIV 
      style="FONT: 10pt arial; 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></BLOCKQUOTE></BODY></HTML>