MapTools.org

[Chameleon] legend and context questions

Debbie Pagurek pagurekd@agr.gc.ca
Thu, 11 Mar 2004 09:43:03 -0500
This is a MIME message. If you are reading this text, you may want to 
consider changing to a mail reader or gateway that understands how to 
properly handle MIME multipart messages.

--=_EDCCF0EF.92F39CCC
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Hi,
thanks for getting back to me on this.  First - the context thing works
fine, that was something silly on my part ;-).

the legend popup remains an issue however.
When I run the sample script that you provided, I am first getting an
error message:
Mapscript: Unable to register functions, unable to load.

When I click ok, however, then I do see a listing of the layers with a
checkbox next to it.  Is that what I should be seeing?

When I try my chameleon application again and click on the legend
button, I still get an empty pop up box as described below - not a 404
error, but a message "The legend displays the layers in your map"

If I click Apply or OK at this point, the map refreshes and I get an
error that says:
the legend template has no inputs named legendlayername[].  Which makes
sense I guess, because nothing is showing in the pop up.

How should the layer status be set in the mapfile - Default? On?

Other issues in trying to get my chameleon app working:
When I do a view source, I am seeing a couple errors right at the top:
<!-- ROIManagerMode ParseURL Failed ! -->

<!-- ROIRectangleTool ParseURL Failed ! -->

<!-- PanMap ParseURL Failed ! -->

I appreciate everyone's help in getting my first app up and running.

Debbie

>>> pagameba@magma.ca 03/10/04 07:34PM >>>
Debbie ...

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

<?php
dl( 'php_mapscript_41.dll' );

$oMap = ms_newMapObj( "/ms4w/apps/gmap/htdocs/gmap75.map" );
$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.

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                           spencer@dmsolutions.ca    |
|-----------------------------------------------------------------|
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
  -----------------------------------------------------------------

--=_EDCCF0EF.92F39CCC
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Content-Description: HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
<BODY style="MARGIN-TOP: 2px; FONT: 10pt Arial; MARGIN-LEFT: 2px">
<DIV>Hi,</DIV>
<DIV>thanks for getting back to me on this.&nbsp; First - the context thing 
works fine, that was something silly on my part ;-).</DIV>
<DIV>&nbsp;</DIV>
<DIV>the legend popup remains an issue however.</DIV>
<DIV>When I run the sample script that you provided, I am first getting an error 
message:</DIV>
<DIV>Mapscript: Unable to register functions, unable to load.</DIV>
<DIV>&nbsp;</DIV>
<DIV>When I click ok, however, then I do see a listing of the layers with a 
checkbox next to it.&nbsp; Is that what I should be seeing?</DIV>
<DIV>&nbsp;</DIV>
<DIV>When I try my chameleon application again and click on the legend button, I 
still get an empty pop up box as described below - not a 404 error, but a 
message "The legend displays the layers in your map"</DIV>
<DIV>&nbsp;</DIV>
<DIV>If I click Apply or OK at this point, the map refreshes and I get an error 
that says:</DIV>
<DIV>the legend template has no inputs named legendlayername[].&nbsp; Which 
makes sense I guess, because nothing is showing in the pop up.</DIV>
<DIV>&nbsp;</DIV>
<DIV>How should the layer status be set in the mapfile - Default? On?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Other issues in trying to get my chameleon app working:</DIV>
<DIV>When I do a view source, I am seeing a couple errors right at the 
top:</DIV>
<DIV>&lt;!-- ROIManagerMode ParseURL Failed ! --&gt;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&lt;!-- ROIRectangleTool ParseURL Failed ! --&gt;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&lt;!-- PanMap ParseURL Failed ! --&gt;</DIV>
<DIV>&nbsp;</DIV>
<DIV>I appreciate everyone's help in getting my first app up and running.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Debbie</DIV>
<DIV><BR>&gt;&gt;&gt; pagameba@magma.ca 03/10/04 07:34PM &gt;&gt;&gt;<BR>Debbie 
...<BR><BR>you can test your template using a test script outside of chameleon 
to <BR>make sure it actually works:<BR><BR>&lt;?php<BR>dl( 
'php_mapscript_41.dll' );<BR><BR>$oMap = ms_newMapObj( 
"/ms4w/apps/gmap/htdocs/gmap75.map" );<BR>$oMap-&gt;legend-&gt;set( "template", 
<BR>"/ms4w/apps/chameleon/htdocs/legend_template_widget.html" );<BR><BR>echo 
"&lt;table&gt;";<BR>echo $oMap-&gt;processLegendTemplate( array() );<BR>echo 
"&lt;/table&gt;";<BR>?&gt;<BR><BR>obviously you'll have to add your own 
paths.<BR><BR>Debbie Pagurek wrote:<BR><BR>&gt; OK - now I have the most recent 
chameleon and mapserver versions <BR>&gt; installed properly and the correct 
documentation to go with it - Thank <BR>&gt; you Paul.<BR>&gt; I have a lot 
working but am having trouble seeing a legend.&nbsp; I have <BR>&gt; tried the 
following tags for either an embedded legend:<BR>&gt; &lt;cwc2 
type="LegendTemplate" visible="true" embedded="true" <BR>&gt; 
template="legend_template.html" popupwidth="500" popupheight="400" <BR>&gt; 
status="false" menubar="false"/&gt;<BR>&gt;&nbsp; <BR>&gt; nothing 
shows.<BR>&gt;&nbsp; <BR>&gt; or a popup:<BR>&gt; &lt;cwc2 type="LegendTemplate" 
styleresource="TextButton" embedded="false" <BR>&gt; 
template="legend_template_widget.html" PopupWidth="350" <BR>&gt; 
PopupHeight="300" Toolbar="false" Status="false" Menubar="false" <BR>&gt; 
Location="false" Visible="true" Image="images/icon_legend.png" <BR>&gt; 
ImageTip="Display Legend" LABEL="Legend"&gt;<BR>&gt;&nbsp;&nbsp;&nbsp; &lt;image 
state="normal"/&gt;<BR>&gt;&nbsp;&nbsp;&nbsp; &lt;image 
state="selected"/&gt;<BR>&gt;&nbsp;&nbsp;&nbsp; &lt;image 
state="hover"/&gt;<BR>&gt; &lt;/cwc2&gt;<BR>&gt;&nbsp; <BR>&gt; the popup simply 
says " The legend displays the layers in your map. " <BR>&gt; but I see no 
legend.<BR>&gt;&nbsp; <BR>&gt; Also, I tried to save a context map.&nbsp; My 
mapfile is set up to serve wms <BR>&gt; layers, and I know the wms getmap 
request works.<BR>&gt; However, when I click on my "save" button, I get a 
message that says: <BR>&gt; There are no WMS Layers to export.<BR>&gt;&nbsp; 
<BR>&gt; I don't think anything is wrong with my mapfile...<BR>&gt; anyone have 
any suggestions?<BR>&gt;&nbsp; <BR>&gt; Thanks,<BR>&gt; Debbie<BR><BR>-- 
<BR>&nbsp; 
-----------------------------------------------------------------<BR>|Paul 
Spencer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
spencer@dmsolutions.ca&nbsp;&nbsp;&nbsp; 
|<BR>|-----------------------------------------------------------------|<BR>|Applications 
&amp; Software 
Development&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
|<BR>|DM Solutions Group 
Inc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<A href="http://www.dmsolutions.ca/|">http://www.dmsolutions.ca/|</A><BR>&nbsp; 
-----------------------------------------------------------------<BR><BR></DIV></BODY></HTML>

--=_EDCCF0EF.92F39CCC--


This archive was generated by Pipermail.