<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thanks so much Andreas.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I’m in the process of putting breakpoints on all of the entry points in LayerParamLoader & LayerParamNode and running/debugging through a couple of scenarios to get a feel for the inner workings. It’s not completely clear to me yet but your post went a long way towards demystifying things.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>My experiment with FORMAT was just a test to see what would happen with a param other than LAYERS. The only 2 options in the example I was working with were format & transparent; neither made any sense for practical usage and I didn’t know what other params were available and/or that might make sense until I came upon CQL_FILTER. Are there any other params that would make sense when using LayerParamLoader?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I’ve since done some digging in order to educate myself on WMS params and found cql_filter as a vendor-specific param here (<a href="http://docs.geoserver.org/latest/en/user/services/wms/vendor.html">http://docs.geoserver.org/latest/en/user/services/wms/vendor.html</a>). I had originally assumed that it was a generic (i.e. non-vendor-specific) param. Is cql_filter (or any other “vendor-specific” params) commonly used across various WMS implementations? Are there any references where I can learn this on my own or is this knowledge that has to be obtained via personal experience with a variety of different systems?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I apologize if I’m asking too many questions and imposing too much. I’m hoping that this discussion will benefit others as well as me since it seems like it might be useful info for someone learning the ropes. You guys do a great job and any help is very much appreciated.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Regards<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Gary<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> andreas.hocevar@gmail.com [mailto:andreas.hocevar@gmail.com] <b>On Behalf Of </b>Andreas Hocevar<br><b>Sent:</b> Saturday, February 12, 2011 12:53 PM<br><b>To:</b> Gary White<br><b>Cc:</b> users@geoext.org<br><b>Subject:</b> Re: [Users] Layer Tree Tutorial questions<o:p></o:p></span></p></div><p class=MsoNormal><o:p> </o:p></p><p>Hi,<o:p></o:p></p><p>the key to understanding the LayerParamLoader is the combination of the param and delimiter params. Think of a layer with<o:p></o:p></p><p>Cql_filter: "state_abbr=MD or state_abbr=PA"<o:p></o:p></p><p>If you load this layer with a LayerParamLoader configured with<o:p></o:p></p><p>param: "CQL_FILTER",<br>delimiter: " or "<o:p></o:p></p><p>you will get two layer nodes, one for Maryland and one for Pennsylvania.<o:p></o:p></p><p>To answer your questions:<o:p></o:p></p><p>1. The LayerParamLoader takes a param from a layer and splits it at the delimiters. A node is created for each of the splitted parts. By checking and unchecking nodes you control which parts will be joined by the delimiter. After each check change, the layer will be reloaded with the resulting param.<o:p></o:p></p><p>2. The use case is to be able to turn parts of the filtered view on and off, without the need to create a Layer object for every part of the filter. This can be very useful for OR filters.<o:p></o:p></p><p>3. Yes, layer.mergeNewParams is used to update the layer and re-request the tiles after every check change.<o:p></o:p></p><p>4. Using LayerParamNode nodes directly (i.e. not created by the LayerParamLoader) allows you to add and remove LAYERS from a Layer object without the need for creating a Layer object with the full list of LAYERS you want.<o:p></o:p></p><p>5. The LayerParamNode (not the LayerParamLoader) is responsible for updating the param on the target layer and calling mergeNewParams to reload the tiles.<o:p></o:p></p><p>I don't think we have an example for the CQL_FILTER use case, but it was the use case that was the reason for creating the LayerParamNode in the first place.<o:p></o:p></p><p>Your attempt with the FORMAT does not make sense, unless you use mutually exclusive nodes (i.e. with radio buttons instead of checkboxes) for LayerParamNodes representing one image format each. You cannot use the LayerParamLoader to create these.<o:p></o:p></p><p>Another vendor param of GeoServer that would make a nice use case for the LayerParamLoader would be FEATUREID, which is a list of featur ids.<o:p></o:p></p><p>I hope I was able to demystify the LayerParamNode and LayerParamLoader.<o:p></o:p></p><p>Regards,<br>Andreas.<o:p></o:p></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal style='margin-bottom:12.0pt'>Am 12.02.2011 01:15 schrieb "Gary White" <<a href="mailto:gary_white@verizon.net">gary_white@verizon.net</a>>:<o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Can someone please explain the “Sub-Layers” section of this tutorial (<a href="http://www.geoext.org/tutorials/layertree-tutorial.html#sub-layers" target="_blank">http://www.geoext.org/tutorials/layertree-tutorial.html#sub-layers</a>)? Specifically I’m wondering how the param property in the loader works. I understand that the loader is a LayerParamLoader but the underlying mechanics are unclear. I was originally under the assumption that this was used as a read-only mechanism to grab data from an already configured/retrieved layer as in using "LAYERS" in order to retrieve the following layers from groupLayer:<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Courier New"'> layers: [</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Courier New"'> "topp:tasmania_state_boundaries",</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Courier New"'> "topp:tasmania_water_bodies",</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Courier New"'> "topp:tasmania_cities",</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Courier New"'> "topp:tasmania_roads"</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Courier New"'> ],</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>After reading the note about using the “CQL_FILTER” param I became confused. Here are some questions that can hopefully clear things up for me (and possibly others):<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>1 - Is this used to create a new “CQL_FILTER” and/or modify an existing one or just to read one that already exists? <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>2 - What would be the use case for reading a “CQL_FILTER” that already exists? <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>3 - If creating/modifying a “CQL_FILTER”, does this reinitiate a WMS etc. request in order to fulfill the new filter? <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>4 - If this is not used for just read-only purposes, can you also create/modify a layer list using "LAYERS"?<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>5 - What is the lifecycle of the LayerParamLoader and the underlying (in this case) OpenLayers.Layer.WMS? i.e. Does the LayerParamLoader trigger the WMS request from the server or is that request initiated separately?<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Is there a working example showing the use of “CQL_FILTER” in this manner? (I couldn’t find one)<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>BTW, I was even more confused when playing around with a value other than "LAYERS" for the param property. For instance, when I changed it as follows:<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:8.0pt;font-family:"Courier New";color:black'> loader: {</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:8.0pt;font-family:"Courier New";color:black'> param: </span><span style='font-size:8.0pt;font-family:"Courier New";color:#2A00FF'>"FORMAT"</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:8.0pt;font-family:"Courier New";color:black'> }</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>the group layer node was populated with a single node displaying the text “image/gif” but the map displayed all 4 layers when I clicked the checkbox. Can anyone explain this behavior?<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Thanks!<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Gary<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#888888'> <o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#888888'> <o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#888888'> <o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#888888'> <o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#888888'> <o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#888888'> <o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#888888'> <o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='color:#888888'> <o:p></o:p></span></p></div></div><p class=MsoNormal style='margin-bottom:12.0pt'><br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@geoext.org">Users@geoext.org</a><br><a href="http://www.geoext.org/cgi-bin/mailman/listinfo/users" target="_blank">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><o:p></o:p></p></blockquote></div></body></html>