[Chameleon] Querying a dynamic layer
Paul Spencer
pagameba at magma.ca
Tue Sep 21 21:08:15 EDT 2004
Another interesting artefact of mapserver is that you must also have a
class defined for a layer to be queryable. Are you also creating classes?
Paul
Ken-ichi wrote:
> Hi all. I'm having trouble using the QueryWidget on a shapefile that
> I've added to the map dynamically with my own widget. Basically, I set
> the template property of the layer when I add it to the map, along with
> the tolerance, but when I click on the points in the layer, the popup
> lists no results. Any idea what's happening? Here's the code for
> adding the layer, followed by the widget tag I'm using:
>
> $lyrPoints = ms_newLayerObj( $map );
> $lyrPoints->set( "name", $quad[0]." Points" );
> $lyrPoints->set( "type", MS_SHAPE_POINT );
> $lyrPoints->set( "status", MS_ON );
> $lyrPoints->set( "data", "/path/to/data" );
> $lyrPoints->set( "group", "Your Layers");
> $lyrPoints->set( "labelitem", "pointid" );
> $lyrPoints->set( "labelmaxscale", "600000" );
> $lyrPoints->set( "template", "ttt" );
> $lyrPoints->set( "tolerance", 5 );
> $lyrPoints->set( "toleranceunits", "pixels" );
>
>
> <cwc2 type="Query" visible="true" imagetip="Identify Feature"
> PopupWidth="500" PopupHeight="600" Toolbar="false" Status="false"
> Menubar="false" RADIUS="20" MAXFEATURES="5" image="icons/icon_query.png"
> toolset="Navigation" styleresource="NavButtons"
> popupstyleresource="TextButtons">
> <image state="normal"/>
> <image state="hover"/>
> <image state="selected"/>
> </cwc2>
>
> The query widget seems to work fine when I just include the same layer
> in the mapfile, so I'm not quite sure what's wrong.
>
> -Ken-ichi
>
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
>
--
-----------------------------------------------------------------
|Paul Spencer pspencer at dmsolutions.ca |
|-----------------------------------------------------------------|
|Applications & Software Development |
|DM Solutions Group Inc http://www.dmsolutions.ca/|
-----------------------------------------------------------------
More information about the Chameleon
mailing list