FW: [Chameleon] FW: Need help in debugging page
Mariette
mariette.hachey at geonet-tech.com
Wed Apr 12 13:12:53 EDT 2006
Greetings,
1) The error from the query in IE is a runtime error on line 154, "Object
expected", In FireFox "Query Selected is not defined" on the same line. The
actual query functions properly. But I want to get rid of the error (if
posible). In order to get it use the photography layer, turn it on and
select the radio button, refresh and query a photo point.
2) For the copyright text I am using:
LAYER
NAME copyright
STATUS ON
TYPE annotation
TRANSFORM false
FEATURE
POINTS
150 385 #this is the position of the text in image coordinates
(pixels)
END
TEXT "© xyz company 2006" #this is your displaying text
END
CLASS
LABEL #defines the font, colors etc. of the text
FONT "sans"
TYPE TRUETYPE
SIZE 8
BUFFER 1
COLOR 0 0 0
BACKGROUNDCOLOR 255 255 255
FORCE TRUE
END
END
END
I did try and use the bit of code you sent me but it crashes mapserver
because it does not reconise the "POSITION" piece.
As for the legend issue, I created metadata--> "legend_title" "Flood_01"
But when I try and call it rather than give me the "Flood_01" It prints off
the enter line of code.
"[metadata name=<legend_title>]"
I looked at the help file you pointed me too but It didnt help me figure
this out. This is the section I have in my template at the layer level
[leg_layer_html order=ascending opt_flag=15]
<div class="cssClickable cssExpander cssLayer" id="[leg_layer_name]"
style="display:none">
<script langauge="JavaScript" type="text/javascript">
oLayer = new cExpander( CWCDHTML_GetLayer(
'[leg_layer_name]', true ));
oGroup.addElement( oLayer );
</script>
<input type="radio" name="my_legend"
onclick="CWCSelectLayer('[leg_layer_name]', true)"[if name=selected value=1]
CHECKED[/if] >
<input type="checkbox" name="legendlayername[]"
value="[leg_layer_name]"
[if name=layer_status oper=eq value=1]CHECKED[/if]
[if name=layer_status oper=eq value=2]CHECKED[/if]>
<img
onclick="document.getElementById('[leg_layer_name]').expander.toggle()"
src="http://142.176.0.171/skins/default/icons/icon_legend.png" border="0">
[leg_layer_name]
</div>
[/leg_layer_html]
Thank You
-----Original Message-----
From: chameleon-bounces at lists.maptools.org
[mailto:chameleon-bounces at lists.maptools.org] On Behalf Of Julien-Samuel
Lacroix
Sent: Wednesday, April 12, 2006 12:57 PM
To: Mariette
Cc: chameleon at lists.maptools.org
Subject: Re: [Chameleon] FW: Need help in debugging page
Hi!
Mariette wrote:
>
> 1) Query issue 1à I have the site set up so that it only queries
> the layer with the active radio button, this functions but an error
> occurs on IE and Firefox. I would like to get rid of the error.
What is the error? I don't get it.
> 2) Query issue 2à I must hide certain results and with the new
> query tool you set what columns to hide in the Map file. I have done
> this according to instruction by inserting the HEADER info in the layer,
> but instead it prevents all results from appearing. The property layer
> is set this way.
The normal declaration should be :
HEADER "AREA^|PERIMETER^|POPPLACE_^"
But this not work I've open bug
http://bugzilla.maptools.org/show_bug.cgi?id=1422 to fix that. In the
mean time, simply put a title in the header
"AREA^Area|PERIMETER^Perimeter|POPPLACE_^Population"
> 6) The copyright text disappears after you navigate; I need it to
> be there at all time.
How did you define the copyright layer? Normally you should only need to do:
LAYER
NAME "copyright"
TYPE annotation
STATUS ON
TRANSFORM OFF
CLASS
COLOR 0 0 0
TEXT "Copyright text"
LABEL
FONT "sans"
TYPE TRUETYPE
POSITION LR
OFFSET 0 0
SIZE 8
BUFFER 1
COLOR 0 0 0
BACKGROUNDCOLOR 255 255 255
FORCE TRUE
END
END
END
> 8) In the legend, at the layer level I would like to be able to
> read the name and replace the underscore with a space, I have done this
> at the group and class level but could not achieve it at the layer level.
You can create a new metadata in your layer ("legend_title" "ttt") and
access it in the legend template.
[metadata name=<metadata_field_to_display>]
See:
http://mapserver.gis.umn.edu/docs/howto/html_legend/#layer-block
--
Julien-Samuel Lacroix
Mapgears
http://www.mapgears.com/
_______________________________________________
Chameleon mailing list
Chameleon at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/chameleon
More information about the Chameleon
mailing list