<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 11"><meta name="Originator" content="Microsoft Word 11"><link rel="File-List" href="file:///C:%5CDOCUME%7E1%5Cjose%5CCONFIG%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:View>Normal</w:View>
  <w:Zoom>0</w:Zoom>
  <w:HyphenationZone>21</w:HyphenationZone>
  <w:PunctuationKerning/>
  <w:ValidateAgainstSchemas/>
  <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
  <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
  <w:Compatibility>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
   <w:DontGrowAutofit/>
  </w:Compatibility>
  <w:DoNotOptimizeForBrowser/>
 </w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:LatentStyles DefLockedState="false" LatentStyleCount="156">
 </w:LatentStyles>
</xml><![endif]--><style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Courier New";
        mso-fareast-font-family:"Times New Roman";}
@page Section1
        {size:595.3pt 841.9pt;
        margin:70.85pt 69.6pt 70.85pt 69.6pt;
        mso-header-margin:35.4pt;
        mso-footer-margin:35.4pt;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style><!--[if gte mso 10]>
<style>
 /* Style Definitions */
 table.MsoNormalTable
        {mso-style-name:"Tabla normal";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
        mso-para-margin:0cm;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";
        mso-ansi-language:#0400;
        mso-fareast-language:#0400;
        mso-bidi-language:#0400;}
</style>
<![endif]--><p class="MsoPlainText">Hi Guillaume, thanks for your help,</p><p class="MsoPlainText"><br></p><p class="MsoPlainText">This is the code I'm using in order to create a new points layer (with only one point):</p><p class="MsoPlainText"><br></p><p class="MsoPlainText">&nbsp;&nbsp;&nbsp; $oMap = ms_newMapObj($szMapFile);<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; $oPuntoSeleccionado= ms_newLayerObj($oMap);<br>&nbsp;&nbsp;&nbsp; $oPuntoSeleccionado-&gt;set("name", "EMPRESAS_ALT");<br>&nbsp;&nbsp;&nbsp; $oPuntoSeleccionado-&gt;set("type", MS_LAYER_POINT);<br>&nbsp;&nbsp;&nbsp; $oPuntoSeleccionado-&gt;set("status", MS_ON);<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; $oCoordenadas=ms_newLineObj();<br>&nbsp;&nbsp;&nbsp; $oShapePuntos=ms_newShapeObj(MS_SHAPE_POINT);<br>&nbsp;&nbsp;&nbsp; $oCoordenadas-&gt;addXY($x, $y);<br>&nbsp;&nbsp;&nbsp; $oShapePuntos-&gt;add($oCoordenadas);<br>&nbsp;&nbsp;&nbsp;
 $oPuntoSeleccionado-&gt;addFeature($oShapePuntos);<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; $oClase=ms_newClassObj($oPuntoSeleccionado);<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; $oEstiloPunto=ms_newStyleObj($oClase);<br>&nbsp;&nbsp;&nbsp; $oEstiloPunto-&gt;set("symbolname", "MARKER_EMPRESA_ALT");<br>&nbsp;&nbsp;&nbsp; $oEstiloPunto-&gt;set("text", "");</p><p class="MsoPlainText"><br></p><p class="MsoPlainText">But I have no results. No errors but no success too.</p><p class="MsoPlainText"><br></p><p class="MsoPlainText">P.S. I'm trying to add this funcionallity to a Ka-map based application.</p><p class="MsoPlainText"><br></p><p class="MsoPlainText">Thanks in advance.</p><p class="MsoPlainText"><br></p><p class="MsoPlainText"><br></p><p class="MsoPlainText"><br></p><p class="MsoPlainText">-----Mensaje original-----<br>
De: Guillaume Sueur [mailto:guillaume.sueur@neogeo-online.net] <br>
Enviado el: martes, 01 de julio de 2008 10:16<br>
Para: Hans Castorp<br>
CC: mapserver-users@lists.osgeo.org<br>
Asunto: Re: [MAPSERVER-USERS] insertLayer()</p><p class="MsoPlainText"><o:p>&nbsp;</o:p></p><p class="MsoPlainText">I guess you just need a new LayerObj, as described in the
mapscript <o:p></o:p></p><p class="MsoPlainText">documentation <o:p></o:p></p><p class="MsoPlainText">(http://mapserver.gis.umn.edu/docs/reference/phpmapscript-class)
:<o:p></o:p></p><p class="MsoPlainText">Layer Objects can be returned by the MapObj class, or can
be created<o:p></o:p></p><p class="MsoPlainText"><span style="">&nbsp;&nbsp;&nbsp; </span>using:<o:p></o:p></p><p class="MsoPlainText"><o:p>&nbsp;</o:p></p><p class="MsoPlainText"><span style="">&nbsp;&nbsp;&nbsp; </span>layerObj
ms_newLayerObj(MapObj map [, layerObj layer])<o:p></o:p></p><p class="MsoPlainText"><o:p>&nbsp;</o:p></p><p class="MsoPlainText"><span style="">&nbsp;&nbsp;&nbsp; </span>A second
optional argument can be given to ms_newLayerObj() to create<o:p></o:p></p><p class="MsoPlainText"><span style="">&nbsp;&nbsp;&nbsp; </span>the new layer
as a copy of an existing layer. If a layer is given as<o:p></o:p></p><p class="MsoPlainText"><span style="">&nbsp;&nbsp;&nbsp; </span>argument then
all members of a this layer will be copied in the new<o:p></o:p></p><p class="MsoPlainText"><span style="">&nbsp;&nbsp;&nbsp; </span>layer created.<o:p></o:p></p><p class="MsoPlainText"><o:p>&nbsp;</o:p></p><p class="MsoPlainText"><o:p>&nbsp;</o:p></p><p class="MsoPlainText">You can then play with :<o:p></o:p></p><p class="MsoPlainText">boolean moveLayerUp(int layerindex)<o:p></o:p></p><p class="MsoPlainText"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Move layer
up in the hierarcy of drawing.<o:p></o:p></p><p class="MsoPlainText"><o:p>&nbsp;</o:p></p><p class="MsoPlainText"><span style="">&nbsp;&nbsp;&nbsp; </span>boolean
moveLayerDown(int layerindex)<o:p></o:p></p><p class="MsoPlainText"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Move layer
down in the hierarcy of drawing.<o:p></o:p></p><p class="MsoPlainText"><o:p>&nbsp;</o:p></p><p class="MsoPlainText"><span style="">&nbsp;&nbsp; </span><span style="">&nbsp;</span>array<span style="">&nbsp;&nbsp;
</span>getlayersdrawingorder()<o:p></o:p></p><p class="MsoPlainText"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Return an
array containing layer's index in the order which they<o:p></o:p></p><p class="MsoPlainText"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>are drawn.<o:p></o:p></p><p class="MsoPlainText"><o:p>&nbsp;</o:p></p><p class="MsoPlainText"><span style="">&nbsp;&nbsp;&nbsp; </span>boolean<span style="">&nbsp; </span>setlayersdrawingorder(array layeryindex)<o:p></o:p></p><p class="MsoPlainText"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Set the
layer's order array. The argument passed must be a valid<o:p></o:p></p><p class="MsoPlainText"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>array with
all the layer's index.<o:p></o:p></p><p class="MsoPlainText"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Return
TRUE on success or else FALSE.<o:p></o:p></p><p class="MsoPlainText"><o:p>&nbsp;</o:p></p><p class="MsoPlainText"><o:p>&nbsp;</o:p></p><p class="MsoPlainText">to set your layer's correct place into the map.<o:p></o:p></p><p class="MsoPlainText"><o:p>&nbsp;</o:p></p><p class="MsoPlainText">Hope that helps,<o:p></o:p></p><p class="MsoPlainText"><o:p>&nbsp;</o:p></p><p class="MsoPlainText"><o:p>&nbsp;</o:p></p><p class="MsoPlainText">Guillaume<o:p></o:p></p><p class="MsoPlainText"><o:p>&nbsp;</o:p></p><p class="MsoPlainText">Hans Castorp a écrit :<o:p></o:p></p><p class="MsoPlainText">&gt; Hi to all,<o:p></o:p></p><p class="MsoPlainText">&gt; <o:p></o:p></p><p class="MsoPlainText">&gt; If map-&gt;insertLayer() isn't available in php
mapscript, how can I insert <o:p></o:p></p><p class="MsoPlainText">&gt; a runtime created layer using php mapscript???<o:p></o:p></p><p class="MsoPlainText">&gt; <o:p></o:p></p><p class="MsoPlainText">&gt; Thanks in advance.<o:p></o:p></p><p class="MsoPlainText">&gt; <o:p></o:p></p><p class="MsoPlainText">&gt; Hans Castorp.<o:p></o:p></p><p class="MsoPlainText">&gt; <o:p></o:p></p><p class="MsoPlainText">&gt; <o:p></o:p></p><p class="MsoPlainText">&gt;
------------------------------------------------------------------------<o:p></o:p></p><p class="MsoPlainText">&gt; <o:p></o:p></p><p class="MsoPlainText">&gt; Enviado desde Correo Yahoo! <o:p></o:p></p><p class="MsoPlainText">&gt; &lt;http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=52431/*http://es.docs.yahoo.com/mail/overview/index.html&gt;<o:p></o:p></p><p class="MsoPlainText">&gt; La bandeja de entrada más inteligente.<o:p></o:p></p><p class="MsoPlainText">&gt; <o:p></o:p></p><p class="MsoPlainText">&gt; <o:p></o:p></p><p class="MsoPlainText">&gt;
------------------------------------------------------------------------<o:p></o:p></p><p class="MsoPlainText">&gt; <o:p></o:p></p><p class="MsoPlainText">&gt; _______________________________________________<o:p></o:p></p><p class="MsoPlainText">&gt; mapserver-users mailing list<o:p></o:p></p><p class="MsoPlainText">&gt; mapserver-users@lists.osgeo.org<o:p></o:p></p><p class="MsoPlainText">&gt;
http://lists.osgeo.org/mailman/listinfo/mapserver-users<o:p></o:p></p><p class="MsoPlainText"><o:p>&nbsp;</o:p></p><p class="MsoPlainText"><o:p>&nbsp;</o:p></p><p class="MsoPlainText">No virus found in this incoming message.<o:p></o:p></p><p class="MsoPlainText">Checked by AVG. <o:p></o:p></p><p class="MsoPlainText">Version: 7.5.524 / Virus Database: 270.4.3/1527 - Release
Date: 30/06/2008 18:07<o:p></o:p></p><p class="MsoPlainText"><span style="">&nbsp;</span><o:p></o:p></p></div></div><br>



      <hr size=1><br><font face="Verdana" size="-2">Enviado desde <a href="http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=52431/*http://es.docs.yahoo.com/mail/overview/index.html">Correo Yahoo!</a><br>La bandeja de entrada más inteligente.<br></font></body></html>