Photos FOSS4G2006
Flavio Hendry
flavio at TYDAC.CH
Sat Sep 23 01:26:00 PDT 2006
Hello List
our pictures are online (sorry, tons ...), enjoy:
http://www.tydac.ch/foss4g2006/
Mit freundlichem Gruss / Best Regards
Flavio Hendry
----------------------------------------------------------------
TYDAC Web-Site: http://www.tydac.ch
TYDAC MapServer: http://www.mapserver.ch
----------------------------------------------------------------
############ Mit freundlichen Gruessen / Kind Regards
############ mailto:flavio at tydac.ch
############ TYDAC AG - http://www.tydac.ch
#### #### Geographic Information Solutions
#### #### Luternauweg 12 -- CH-3006 Bern
############ Tel +41 (0)31 368 0180 - Fax +41 (0)31 368 1860
----------------------------------------------------------------
-----Original Message-----
From: Wim Blanken <w.blanken at GEON.NL>
To: MAPSERVER-USERS at LISTS.UMN.EDU
Date: Sat, 23 Sep 2006 09:48:26 +0200
Subject: Re: [UMN_MAPSERVER-USERS] HTML Legend.
> Hello Bob,
>
>
>
> We did it a long time ago with a metadata setting containing the max
> and
> minscale. Below you can see our html legend. Don't mind the
> javascript... I
> have also included a layer from a mapfile to see the metadatasetting.
>
>
>
> Regards,
>
>
>
> Wim Blanken
>
> Geon bv
>
> The Netherlands
>
>
>
> -------------------------------------------
>
> [leg_layer_html opt_flag=11]
>
> [if name=gvLegend oper=isset] [if name=gvLegend oper=neq
> value=-1]
>
>
>
> [if name=gvLegend oper=eq value=0] [if name=layer_status oper=eq
> value=1]
>
> <tr class="visiblelayer">
>
> <td align="center"><input type="checkbox" name="layer"
> value="[leg_layer_name]" [[leg_layer_name]_check]
> ONCLICK="javascript:layerToggle('[leg_layer_name]');"></td><td>
> </td>
>
> <td><img src="[leg_icon width=17 height=11]" border="0"></td>
>
> <td>[metadata name=gvLayerTitle]</td>
>
> </tr>
>
> [/if] [/if]
>
>
>
> [if name=gvLegend oper=neq value=0]
>
> <script language="JavaScript" type="text/javascript" >
>
> inscale = true ;
>
> [if name=gvMinScale oper=isset]
>
> minS = parseFloat('[metadata name=gvMinScale]');
>
> if ([scale] <= minS) {inscale = false;}
>
> [/if]
>
> [if name=gvMaxScale oper=isset]
>
> maxS = parseFloat('[metadata name=gvMaxScale]');
>
> if ([scale] > maxS) {inscale = false;}
>
> [/if]
>
> if (inscale) {
>
> document.write('<tr class="visiblelayer">')
>
> }
>
> if (!inscale) {
>
> document.write('<tr class="invisiblelayer">')
>
> }
>
> </script>
>
>
>
> <td align="center">
>
> [if name=layer_status oper=eq value=2]
>
>
>
> [/if]
>
> [if name=layer_status oper=neq value=2]
>
> <input type="checkbox" name="layer"
> value="[leg_layer_name]"
> [[leg_layer_name]_check]
> ONCLICK="javascript:layerToggle('[leg_layer_name]');">
>
> [/if]
>
> </td>
>
> <td>
>
> [if name=gvLayerQuery oper=eq value=true]
>
> <input type="radio" name="activelayer"
> value="[leg_layer_name]"
> group="activelayerradio"
> ONCLICK="javascript:activeLayerToggle('[leg_layer_name]');" >
>
> [/if]
>
> [if name=gvLayerQuery oper=neq value=true]
>
>
>
> [/if]
>
> </td>
>
> <td>
>
> [if name=gvLegend oper=eq value=1]
>
>
>
> [/if]
>
> [if name=gvLegend oper=eq value=2]
>
> [if name=layer_status oper=eq value=0]
>
>
>
> [/if]
>
> [if name=layer_status oper=neq value=0]
>
> <script language="JavaScript" type="text/javascript" >
>
> inscale = true ;
>
> [if name=gvMinScale oper=isset]
>
> minS = parseFloat('[metadata name=gvMinScale]');
>
> if ([scale] <= minS) {inscale = false;}
>
> [/if]
>
> [if name=gvMaxScale oper=isset]
>
> maxS = parseFloat('[metadata name=gvMaxScale]');
>
> if ([scale] > maxS) {inscale = false;}
>
> [/if]
>
> if (inscale) {document.write('<img src="[leg_icon
> width=17
> height=11]" border="0">');}
>
> else {document.write(" ");}
>
> </script>
>
> [/if]
>
> [/if]
>
> </td>
>
> <td> [metadata name=gvLayerTitle] <A
> HREF="javascript:metainfo('[metadata name=gvLayerTitle]');"
> onmouseover="return overlib('Metainformatie opvragen over [metadata
> name=gvLayerTitle]',FGCOLOR,
> '#ffffee',WIDTH,100,DELAY,500,HAUTO,AUTOSTATUS);" onmouseout="return
> nd();">(M)</a> </td>
>
> </tr>
>
> [/if]
>
>
>
> [/if] [/if]
>
> [/leg_layer_html]
>
>
>
> [leg_class_html opt_flag=0]
>
> <tr class="class">
>
> <td> </td> <td> </td>
>
> <td> <img src="[leg_icon width=17 height=11]" border="0"> </td>
>
> <td> [leg_class_name] </td>
>
> </tr>
>
> [/leg_class_html]
>
>
>
>
>
> MAPFILE PART:
>
>
>
> LAYER
>
> NAME "Buildings"
>
> MAXSCALE 15000
>
> TYPE Line
>
> STATUS ON
>
> DATA "buildings"
>
> CLASS
>
> NAME "Gebouwen"
>
> STYLE
>
> SIZE 1.5
>
> SYMBOL 'simple'
>
> COLOR 250 50 50
>
> END
>
> END # CLASS
>
> METADATA
>
> gvLayerTitle "Gebouwen"
>
> gvLegend "1"
>
> gvLayerQuery "false"
>
> gvMaxScale "15000"
>
> END
>
> END # LAYER
>
>
>
> _____
>
> From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]
> On
> Behalf Of Bob Basques
> Sent: zaterdag 23 september 2006 3:49
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: [UMN_MAPSERVER-USERS] HTML Legend.
>
>
>
> All,
>
> Hi all, I've been using the HTML legend for a while now with very
> good
> results, I have a check box system working nicely showing when a
> layer is
> on/off, etc.
>
> I was wondering, has anyone an example of setting it up to grey out a
> checkbox if the scale of view is out of range (MINSCALE/MAXSCALE in
> the
> mapfile). I have an idea of how it might be done, but not sure.
> Just
> asking before I go at it from scratch.
>
> Here is my Legend TEMPLATE as it stands now along with a typical
> MAPFILE
> entry, and a sample output on the end:
>
> MAPFILE ENTRY (one of many :c):
>
> METADATA
> LEGEND_TITLE "Census Tract Centroids"
> LEGEND_META_GROUP "foreground"
> LEGEND_DISPLAY_LEVEL "1"
> END
>
>
> LEGEND TEMPLATE:
>
> [leg_header_html]
> [/leg_header_html]
>
> [leg_group_html]
> [if name=first_foreground_layer oper=isset] <b>Foreground:</b> <br />
> [/if]
> [if name=first_background_layer oper=isset] <b>Background:</b> <br />
> [/if]
>
> [if name=legend_display_level oper=isset]
> [if name=legend_display_level oper=neq value=-1]
> [if name=layer_status oper=neq value=2]
> <input alt="[leg_group_name] Control"
> [if name=legend_meta_group oper=eq value=foreground] type="checkbox"
> [/if]
> [if name=legend_meta_group oper=eq value=background] type="radio"
> [/if]
> name="layer" value="[leg_group_name]"
> [if name=layer_status oper=neq value=0] checked="checked" [/if] />
> [if name=group_maxscale oper=isset]
> <input type="hidden" name="[leg_group_name]_Maxscale"
> value="[metadata
> name=group_maxscale]" />
> [/if]
> [if name=group_minscale oper=isset]
> <input type="hidden" name="[leg_group_name]_Minscale"
> value="[metadata
> name=group_minscale]" />
> [/if]
> <img alt="[leg_group_name] Legend Image"
> name="[leg_group_name]LegendImg"
> src="[leg_icon]" width="21" height="14" />
> [/if]
> [if name=metadata_url oper=isset]
> <a href='javascript:var temp = window.open("[metadata
> name=METADATA_URL]",
> "meta",
> "resizable,scrollbars,location,toolbar,height=300,width=500")'>
> [/if]
> [if name=legend_title oper=isset]
> [metadata name=LEGEND_TITLE]
> [/if]
> [if name=metadata_url oper=isset]
> </a>
> [/if]
> <br />
> [/if]
> [/if]
> [/leg_group_html]
>
>
> [leg_layer_html opt_flag=0]
> [if name=legend_display_level oper=isset]
> [if name=legend_display_level oper=eq value=2]
> <img alt="Group Legend Image" src="[leg_icon]" width="21" height="14"
> /><br
> /><span class="small">[leg_layer_name]</span><br />
> [/if]
> [/if]
> [/leg_layer_html]
>
>
> [leg_class_html opt_flag=0]
> [if name=legend_display_level oper=isset]
> [if name=legend_display_level oper=eq value=3]
> <img alt="Class Legend Image" src="[leg_icon]" width="21" height="14"
> /><br
> /><span class="small">[leg_class_name]</span><br />
> [/if]
> [/if]
> [/leg_class_html]
> [leg_footer_html]
> [/leg_footer_html]
>
>
>
> OUTPUT:
>
> <input alt="bg_mntrct00_point Control"
> type="checkbox" name="layer" value="bg_mntrct00_point" />
>
> <img alt="bg_mntrct00_point Legend Image"
> name="bg_mntrct00_pointLegendImg"
> src="/tmp/view_27723_1158975512_22_0_20_12.png" width="21"
> height="14" />
>
> Census Tract Centroids
>
> <br />
>
>
>
>
>
>
More information about the MapServer-users
mailing list