<!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.1505" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial color=#0000ff size=2>Paul,</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>Sounds like you got it all worked out
already :)</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2>Still some comments
inline...</FONT></DIV>
<DIV><FONT face=Arial size=2> </FONT></DIV>
<DIV><FONT face=Arial size=2>» -----Original Message-----<BR>» From: <A
href="mailto:ka-map-users-bounces@lists.maptools.org">ka-map-users-bounces@lists.maptools.org</A>
<BR>» [mailto:ka-map-users-bounces@lists.maptools.org] On Behalf Of <BR>» Paul
Spencer<BR>» Sent: 3 August 2005 05:39<BR>» To: <A
href="mailto:ka-map-users@lists.maptools.org">ka-map-users@lists.maptools.org</A><BR>»
Subject: [ka-Map-users] layer controls - your opinion requested<BR>» <BR>» hello
ka-mapers!<BR>» <BR>» I'm soliciting feedback on how the layer control
(kaLegend) <BR>» works. It <BR>» currently serves my purposes in most
cases but it could stand some <BR>» improvements.<BR>» <BR>» I am not going to
build a completely flexible template-based <BR>» legend ala <BR>» mapserver
legend templates, but I am open to suggestions on <BR>» how to make <BR>» the
existing layer control more flexible - others can build different <BR>» layers
controls if they wish :><BR>» <BR>» Currently it works by assuming that
everything with no group <BR>» (or in the <BR>» group named __base__) is part of
a group labelled 'Base' in the <BR>» interface. This special group cannot
be turned off as it.<BR></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2>I think the nature and purpose of
Ka-map makes groups a 'must', and if you're building a serious website to go
live, it's not much effort to define a group for all items you want on there. I
wouldn't expect the BASE layer to be used on a live site, only for development,
so I wouldn't worry too much about any aspects of it. Though I think it might as
well have a toggle-box.</FONT><FONT face=Arial size=2></DIV>
<DIV><BR>» Any other groups in the map file are loaded as separately <BR>»
controllable <BR>» elements in the legend control, one checkbox per group.<BR>»
<BR>» For each group, you can expand it to show the mapserver <BR>» legend for
that <BR>» group (based on the LEGEND object in the map file, not a <BR>» legend
template).<BR>» <BR>» For each group, you can control the visibility and the
opacity on the <BR>» client side. The visibility is handled via the
checkbox. <BR>» There is no <BR>» visible way to control opacity (any
more) but it could be added by a <BR>» third party if they wished - instead, you
can control the opacity via <BR>» the map file by adding metadata "opacity" "50"
on the first <BR>» layer in any <BR>» group.<BR>» <BR>» (Are there other things
we could control on a layer-by-layer basis?)<BR></DIV>
<DIV><FONT color=#0000ff>Would it be</FONT> <FONT color=#0000ff>crazy to have a
combobox with pre-defined (in metadata?) attribute names of labels that can be
controlled by the user (e.g. "roadname", "roadlength", "no labels")? The labels
would sit in a separate layer that is not loaded by default. Probably too much
work to implement, though.</FONT></DIV>
<DIV><FONT color=#0000ff></FONT> </DIV>
<DIV>» Its pretty obvious that the name 'Base' is not particularly suited to
<BR>» most applications ... Also, it may be desirable to have one or more <BR>»
'groups' of layers that cannot be turned on/off ... but perhaps have <BR>»
variable opacity etc.<BR>» <BR>» I think one solution to this is to provide more
metadata in <BR>» the map file <BR>» that can control the functionality of the
legend. What I am <BR>» currently <BR>» thinking of doing is removing the
magic 'Base' group and instead <BR>» allowing groups to have visibility controls
or not via metadata:<BR></DIV>
<DIV>» visibility_control: true/false<BR>» <BR>» This could optionally be
expanded to include:<BR>» <BR>» opacity_control: true/false<BR>» <BR>» The
default for both would be 'false' if not explicitly set to 'true' <BR>» (i.e.
missing or any other value than true)<BR></DIV>
<DIV><FONT color=#0000ff>As above, wouldn't worry about "customizability" of
BASE group. Why would you want to make it impossible to turn off a layer or
change its opacity though? Might as well not show it in the
layer-control/legend at all then (treat it as background), to reduce clutter and
keep things simple (strength of Ka-map is its simplicity from the user's
perspective, in my opinion). So you'd have a metadata item called
"show_in_legend".</FONT></DIV>
<DIV> </DIV>
<DIV>» Group/Layer order is currently not fully respected in that <BR>» the
special <BR>» 'Base' layer is kept at the bottom on the client side. In
making the <BR>» above change, I would also remove this restriction so that the
static <BR>» layers could be placed anywhere in the map drawing order and <BR>»
have that <BR>» respected on the client side.<BR></DIV>
<DIV><FONT color=#0000ff>Think items should appear in legend in same order as
they are stacked. As above, wouldn't worry about BASE layer.</FONT></DIV>
<DIV><BR>» For performance reasons, we turn off all unnecessary layers during
<BR>» dragging. I would propose to change this to either:<BR>» <BR>» 1)
turn off only layers that have visibility_control set to true<BR>» <BR>» - OR
-<BR>» <BR>» 2) provide another metadata to control which layers are left on
when <BR>» dragging (I'm open to suggestions on naming for this, plus
defaults)<BR></DIV>
<DIV><FONT color=#0000ff>Performance is everything (determines whether user
stays on your site or forgets it forever). I would suggest a "preload" metadata
item, that controls whether a layer is loaded when it's turned off or not. I
noticed a strong performance decrease as number of layers
increases.</FONT></DIV>
<DIV> </DIV>
<DIV>» Finally, what should we do with layers that have no group <BR>»
set? Perhaps <BR>» they could still go into a special 'Base' group?
Or <BR>» 'Ungrouped Layers'?<BR></DIV>
<DIV><FONT color=#0000ff>As above, I think the essence of Ka-map is having
layers combined in groups, to increase performance and simplicity. Only use BASE
for development, not for live site.</FONT></DIV>
<DIV> </DIV>
<DIV>» If there is any other functionality or any objection/changes to the <BR>»
stuff I've mentioned here, please post on the list to get <BR>» your opinion
<BR>» heard :)</DIV>
<DIV> </DIV>
<DIV><FONT color=#0000ff>Actually..... :) I like the way the legend, scalebar,
etc have been combined into one div (the "reference" div). I've dumped a
search-tool into it as well. I think that div is highly suitable for being made
'draggable', so it can be moved around as a toolwindow. That way, it's not in
the way of the map at times.</FONT></DIV>
<DIV><FONT color=#0000ff></FONT> </DIV>
<DIV><FONT color=#0000ff>My suggestions are only suggestions, not requests (no
pressure!). I'm very happy with Ka-Map as it is.</FONT></DIV>
<DIV><FONT color=#0000ff></FONT> </DIV>
<DIV><FONT color=#0000ff>regards,</FONT></DIV>
<DIV><FONT color=#0000ff></FONT> </DIV>
<DIV><FONT color=#0000ff>Jacob</FONT></DIV>
<DIV><FONT color=#0000ff></FONT> </DIV></FONT></BODY></HTML>