Legend, Layers, and Scale
Jennifer Zeisloft
JZeisloft at GMAIL.COM
Thu Oct 28 16:45:12 PDT 2004
Hello All...
I am a very new user of MapServer, Chameleon, etc. and I have a few
questions I have not yet been able to answer with the documentation
and archives. I would really appreciate any help that you offer.
First, I have a couple layers in my map that I do not want to show in
the legend, or that I would like in the legend, but without the option
to turn them off. I am using a legend template, a legend object in
the map file, and a chameleon template. I have been able to figure
out how to place permanent checks in the layer on/off checkbox (or get
rid of it entirely), how to get rid of the select layer radio buttons,
and how to delete layers from the legend without deleting them from
the map. However, as soon as the map refreshes, the layers not in the
legend or those without a layer on/off checkbox also disappear from
the map. If the layer on/off check is removed from a layer that I
wish to be on permanently and the map is refreshed, the check remains
in the box, but the layer still disappears. I've attached the legend
template and map file to this email. The chameleon template I am
using is essentially the "sample_enhanced" template that comes with
the tutorial (it doesn't seem to me that altering anything in this
would help with my legend problems).
Second, the names of the classes in my legend appear in a different
font and size than those of the layers. Adding classes also changes
the alignment of the layer names. I was able to change the font and
size of the class names, but not of the layer names. I also attempted
to change the alignment in Dreamweaver, but this didn't seem to
accomplish anything. I searched for a style sheet, but I have been
able to determine where the font and alignment are defined for the
various legend components.
Third, and finally… I would like the map to initially appear zoomed in
to a certain area. Basically, I want to keep the entire extent
available, but when it first loads, I would like it panned and zoomed
to a specific location. I've played with EXTENT and SCALE, but
without the desired results. Is it possible to do this somehow?
Again, I really appreciate any help or hints that are offered. Thanks
in advance.
Jennifer Zeisloft
-------------- next part --------------
[leg_layer_html order=ascending opt_flag=15]
[if name=show oper=eq value=1]
<tr bgcolor="#ffffff">
[if name=radio oper=eq value=1]
<td><input type="radio" name="my_legend" onclick="CWCSelectLayer('[leg_layer_name]', true)"[if name=selected value=1] CHECKED[/if] ></td>
[/if] [if name=check oper=eq value=1]
<td align="center" width=20><input type="checkbox" name="legendlayername[]"
value="[leg_layer_name]"
[if name=alwayson oper=eq value=1]CHECKED[/if]
[if name=layer_status oper=eq value=1]CHECKED[/if]
[if name=layer_status oper=eq value=2]CHECKED[/if]></td>
<td><img src="[leg_icon width=20 height=18]" width="20" height="20"</td>
[/if]
[if name=wms_name oper=isnull]
<td><a href="#" onclick="javascript:LegendTemplateLayerInfo('[leg_layer_name]');"><span class="label">[leg_layer_name]</span></a></td>
</tr>
[/if]
[if name=wms_name oper=isset]
<td><a href="#" onclick="javascript:LegendTemplateLayerInfo('[leg_layer_name]');"><span class="label">[metadata name=WMS_TITLE]</span></a></td>
</tr>
[/if]
[/if]
[/leg_layer_html]
[leg_class_html opt_flag=15]
[if name=classes oper=eq value=1]
<tr>
<td width=15></td>
<td><img src="[leg_icon width=20 height=10]" width=20 height=10></td>
<td>[leg_class_name]</td>
</tr>
[/if]
[/leg_class_html]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mapfile.map
Type: application/octet-stream
Size: 6848 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20041028/2eca44e8/attachment.obj>
More information about the MapServer-users
mailing list