[Chameleon] query pop-up with photo?

Eric Bridger eric at gomoos.org
Fri Jan 14 09:03:45 EST 2005


At 02:38 PM 01/14/2005 +0100, enns at abacho.de wrote:
>I am about to embark on the implementation of the query widget.   Upon clicking on an object (point) I would like to display not only the attributes of that object but also a photo associated to the object in the pop-up.  
>How do I go about inserting a photo into the pop-up information?  What will the syntax be like in this case?
>
>Thanks in advance,
>
>David E.

 I assume you are creating a custom Query widget? You will need to edit the QueryResults.phtml script in  widgets/Query/ directory.
In particular the formatQueryResults function.  It's easy enough to add an <img src=XXXX> tag in the output.
QueryResults.phtml is the script which runs to populate the Query Popup window with html.

I'm assuming that this is a "local" mapfile layer.

If it's a WMS layer it's a little different. The results are formatted in the processWMSGetFeatureInfo() function.

Note: you can copy the widgets/Query/ directory to a directory local to your application, make your customizations there and when you start your Chameleon application (index.phtml) add that directory to the CWCExecute() call: eg.

$oApp->CWCExecute( array($gszAppPath."/widgets" ) );
Chameleon will use the local Query before the default Query.

That way only this application will get the custom Query widget.

Eric




More information about the Chameleon mailing list