RV: [Chameleon] Custom Widget, problem showing Point Layer

Ines mleonsoft at yahoo.com.ar
Thu Jan 4 14:02:33 EST 2007


Hello, thank you very much!!! I can´t believe it. I can see the point in the
map!! my widget is working very very well now. It is really a success. Again
thank you. I want to collaborate with chemeleon making a little manual to
make the points dynamic with a widget if you want to publish it like an
example of "Draw point layer dynamic in the map with widgets". What do you
think?

Now I need to ask you, I need to show a text with the point in the widget.
Like:
TEXT "My Place"     in the point layer of the file.map.

I looked for in the Map server web page and I didn´t found a method to do
it. Do you know some method to do it? I think it could be:


----------- $this->text = 'My Point
text'; -----------------------------------------------

            $poLayer =
$this->moMapObject->oMap->getLayerByName('pointlatlon');
		$pt = ms_newPointObj();
   		$ln = ms_newLineObj();
		$shp = ms_newShapeObj(MS_SHAPE_POINT);
   		$pt->setXY($this->x,$this->y);

---------
$pt->SOME-METHOD($this->text);----------------------------------------------

    		$ln->add($pt);
    		$shp->add($ln);
    		$poLayer->addFeature($shp);

Thank you very much
Ines




In the widget definition in the template:
  <cwc2
     type="UUW"
     coords="aa"
     imagetip="Info"
     image="icons/icon_query.png"
     styleresource="NavButtons"
     imagewidth="25"
     SubmitOnCick="true"
     toolset="nav">
       <image state="normal"/>
       <image state="hover"/>
       <image state="selected"/>
   </cwc2>

Julien


Ines wrote:
> Sorry, I don´t understand where to insert that line in the code
> (SubmitOnClick="true"). Do you mean in the "function UUW" or in "draw
> publish"? I put that line in "function UUW" but my application show me an
> error:
>
>
>
> function UUW()
>     {
>         // set the language file
>         $this->mszLanguageResource = dirname(__FILE__).'/UUW.dbf';
>
>         // invoke constructor of parent
>         parent::NavTool();
> 		$this->SetNavCommand('UUW');
>
> // ADDING SUBMIT
> TRUE: ----------------------------------------------------------
> 		SubmitOnClick="true";
>
> 		$this->maAttributes['COORDS'] =
>             new StringAttribute( 'COORDS', true, array( 'aa' ) );
>
>         // set the description for this widget
>         $this->szWidgetDescription = <<<EOT
> This is the UUW.
> EOT;
>         // set the maturity level
>         $this->mnMaturityLevel = MATURITY_ALPHA;
>
>     // end constructor
>     }
>
>
>
>
> -----Mensaje original-----
> De: Julien-Samuel Lacroix [mailto:jlacroix at mapgears.com]
> Enviado el: jueves, 04 de enero de 2007 11:45
> Para: Ines
> CC: chameleon at lists.maptools.org
> Asunto: Re: RV: [Chameleon] Custom Widget, problem showing Point Layer
>
>
> Hi,
> Sorry for that. I did not realize you wanted to submit the page as soon
> as you click on it. Simply add SubmitOnClick="true" in the widget
> declaration.
>
> Does it do the trick?
>
> Julien
>
> Ines wrote:
>
>>Hello, thank for your answer. I added that line but my widget does not
>
> even
>
>>work. Simply don't do nothing. When I click the button of the widget my
>>application don't do nothing. The map don't update. I send you the
>
> complete
>
>>code of my widget.
>>
>>I´m sending you The point Layer in the file.map, The cwc2 tag in the
>>template.html, and The code complete in the UUW.widget.php
>>
>
>
> --
> Julien-Samuel Lacroix
> Mapgears
> http://www.mapgears.com/
>
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon

--
Julien-Samuel Lacroix
Mapgears
http://www.mapgears.com/



More information about the Chameleon mailing list