[Chameleon] legend and context questions

Paul Spencer
Wed, 10 Mar 2004 19:34:25 -0500
Debbie ...

you can test your template using a test script outside of chameleon to 
make sure it actually works:

dl( 'php_mapscript_41.dll' );

$oMap = ms_newMapObj( "/ms4w/apps/gmap/htdocs/" );
$oMap->legend->set( "template", 
"/ms4w/apps/chameleon/htdocs/legend_template_widget.html" );

echo "<table>";
echo $oMap->processLegendTemplate( array() );
echo "</table>";

obviously you'll have to add your own paths.

Same for the context problem:

dl( 'php_mapscript_41.dll' );

$oMap = ms_newMapObj( "/ms4w/apps/gmap/htdocs/" );
$oMap->saveMapContext( "/ms4w/tmp/test_context.xml" );

If those work then there is a problem in Chameleon.  If not, then you'll 
need to figure out what's wrong with the template/mapfile first



Debbie Pagurek wrote:

> OK - now I have the most recent chameleon and mapserver versions 
> installed properly and the correct documentation to go with it - Thank 
> you Paul.
> I have a lot working but am having trouble seeing a legend.  I have 
> tried the following tags for either an embedded legend:
> <cwc2 type="LegendTemplate" visible="true" embedded="true" 
> template="legend_template.html" popupwidth="500" popupheight="400" 
> status="false" menubar="false"/>
> nothing shows.
> or a popup:
> <cwc2 type="LegendTemplate" styleresource="TextButton" embedded="false" 
> template="legend_template_widget.html" PopupWidth="350" 
> PopupHeight="300" Toolbar="false" Status="false" Menubar="false" 
> Location="false" Visible="true" Image="images/icon_legend.png" 
> ImageTip="Display Legend" LABEL="Legend">
>    <image state="normal"/>
>    <image state="selected"/>
>    <image state="hover"/>
> </cwc2>
> the popup simply says " The legend displays the layers in your map. " 
> but I see no legend.
> Also, I tried to save a context map.  My mapfile is set up to serve wms 
> layers, and I know the wms getmap request works.
> However, when I click on my "save" button, I get a message that says: 
> There are no WMS Layers to export.
> I don't think anything is wrong with my mapfile...
> anyone have any suggestions?
> Thanks,
> Debbie

|Paul Spencer                     |
|Applications & Software Development                              |
|DM Solutions Group Inc       |

This archive was generated by Pipermail.