[Chameleon] Add layers drawing points (circles) with latitude and longitude

Julien-Samuel Lacroix jlacroix at mapgears.com
Wed Nov 1 10:59:35 EST 2006


Hi,
I'm not sure I understand everything you need so I'll give you some 
pointers and hope they are helpful. If not, do not hesitate to post some 
more details. BTW here's the mapscript documentation:
http://mapserver.gis.umn.edu/docs/reference/phpmapscript-class

You can also look at the GMap demo which I think may be included in 
MS4W. If not, you can find it here:
http://www.maptools.org/ms4w/index.phtml?page=downloads.html
under PHP/MapScript Sample Application

1) If you want to display a drop down listsimply add in your 
DrawPublish() function the following:
$szReturn = "<select 
name='myselect'><option>value1</option><option>value2</option></select>";
return $szReturn;

2) The following code is not tested and need to be adapted to your needs 
and application. In the ParseURL():
if($this->isVarSet('myselect'))
{
     $oMap = $this->moMapObject->oMap;
     $oLayer = $oMap->getLayerByName('myLayer');
     $oLayer->set('status', MS_ON);
     $oClass = $olayer->getClass(0);
     $oClass->setExpression($this->getVar('myselect'));
}

I hope it gives you an idea of how to do things.

Julien

Ines wrote:
> Normand, thank you very very much for your help. I created successfully my
> new widget!!! I'm very happy really.
> 
> Now, I need to add descriptions in the widget to display as a list, drop
> down list or something to continue with my work. I'm making the steps that
> Julien tell me to do it.
> 
> I have my widget and I have the layer ready. Now I need to know how to do
> this:
> 
> 1) display the descriptions in the widgets
> 2) set the EXPRESSION and status of the layer in the
> mapfile with the description column value
> 
> 
> In this mail (below) I explain what I have to do.
> 
> 
> Thank you very much again
> 
> Ines
> 
> 
> -----Mensaje original-----
> De: Julien-Samuel Lacroix [mailto:jlacroix at mapgears.com]
> Enviado el: viernes, 20 de octubre de 2006 11:25
> Para: Ines
> Asunto: [Bulk] Re: [Chameleon] Add layers drawing points with latitude
> and longitude
> 
> 
> Hello,
> There's no widget that do exactly that I think, but creating a new one
> would be easy. I suggest you add a layer in your mapfile to display this
> information. You can create widget that will display the descriptions
> and once done will set the EXPRESSION and status of the layer in the
> mapfile with the description column value.
> 
> Check this link to create your own widget:
> http://chameleon-tiki.maptools.org/tiki-index.php?page=Developing+a+new+Cham
> eleon+Widget
> 
> Julien
> 
> 
> Ines wrote:
> 
>>Hello, I have a database with some latitudes and longitudes and
> 
> description
> 
>>and I have to show that points in a layer (map).
>>
>>For example, the columns of the database:
>>
>>latitude		longitude	Description
>>xxxxxxxxx         xxxxxxx     bird species
>>xxxxxxxxx         xxxxxx      shark species
>>
>>I need to make that the people can select the description in some place of
>>my aplication and the aplication show the map with a "circle" for example
>>lacated in that latitude and longitude, and then, add that image (or
> 
> layer)
> 
>>with that point in the main map. I saw an aplication that have a "button"
>>called "WMS layers" that make some similar with the Map Browser but I
> 
> don't
> 
>>know how it works.
>>
>>Thank you very much
>>Ines
>>
>>_______________________________________________
>>Chameleon mailing list
>>Chameleon at lists.maptools.org
>>http://lists.maptools.org/mailman/listinfo/chameleon
> 
> 
> --
> 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