[Chameleon] Querying a dynamic layer

Ken-ichi kueda at wso.williams.edu
Wed Sep 22 13:32:52 EDT 2004


I Just tried both of these, but still no luck.  I take it others have 
successfully queried dynamically added point layers in the past?

-Ken-ichi

Paul Spencer wrote:

> just a guess, but try giving your template a .html extension and if 
> that doesn't work then try adding a template to the class ...
>
> Ken-ichi wrote:
>
>> Yup, I defined a class.  Looks like this:
>>
>> $clsPoints = ms_newClassObj( $lyrPoints );
>> $clsPoints->label->set( "type", "truetype" );
>> $clsPoints->label->set( "font", "fritqat" );
>> $clsPoints->label->set( "type", "truetype" );
>> $clsPoints->label->set( "size", "6" );
>> $clsPoints->label->set( "position", "CR" );
>> $clsPoints->label->color->setRGB($outlineColor[0],$outlineColor[1],$outlineColor[2]); 
>>
>>                $clsPoints->label->outlinecolor->setRGB(255,244,221); 
>>               $styPoints = ms_newStyleObj( $clsPoints );
>> $styPoints->color->setRGB($color[0],$color[1],$color[2]);
>> $styPoints->outlinecolor->setRGB($outlineColor[0],$outlineColor[1],$outlineColor[2]); 
>>
>> $styPoints->set( "symbol", 7 );
>> $styPoints->set( "size", 7 );
>>               So I'm guessing that's not it.
>>
>> -Ken-ichi
>>               Paul Spencer wrote:
>>
>>> 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
>>>>
>>>
>>
>>
>



More information about the Chameleon mailing list