<!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.6002.18357" name=GENERATOR></HEAD>
<BODY id=MailContainerBody
style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-TOP: 15px" text=#000000
bgColor=#ffffff leftMargin=0 topMargin=0 CanvasTabStop="true"
name="Compose message area">
<DIV><FONT face=Arial size=2>Looking at the ticket & patch, I think that
code is always going to be kind of ugly when you allow people to mix strings and
objects in configuration like that.</FONT></DIV>
<DIV><FONT face=Arial size=2>I think specifying either a pure
string</FONT></DIV>
<DIV><FONT face=Arial size=2>ex: "BBOX"</FONT></DIV>
<DIV><FONT face=Arial size=2>or a pure object</FONT></DIV>
<DIV><FONT face=Arial size=2>ex: {type:"BBOX",ratio:1.25}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>would be easier to deal with and would better match
with the other configuration object conventions used in ExtJS, OL, &
GeoExt</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>However people could mix the 2 different
configuration specification types in the strategies array:</FONT></DIV>
<DIV><FONT face=Arial size=2>ex:</FONT></DIV>
<DIV><FONT face=Arial size=2>strategies : [ "Save", {type:"BBOX",ratio:1.25}
]</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks for getting this started.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Matt Priour</FONT></DIV>
<DIV><FONT face=Arial size=2>Kestrel Computer Consulting</FONT></DIV>
<DIV style="FONT: 10pt Tahoma">
<DIV><BR></DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=adube@mapgears.com
href="mailto:adube@mapgears.com">Alexandre Dube</A> </DIV>
<DIV><B>Sent:</B> Tuesday, March 22, 2011 3:02 PM</DIV>
<DIV><B>To:</B> <A title=mpriour@kestrelcomputer.com
href="mailto:mpriour@kestrelcomputer.com">Matt Priour</A> </DIV>
<DIV><B>Cc:</B> <A title=eric.lemoine@camptocamp.com
href="mailto:eric.lemoine@camptocamp.com">Eric Lemoine</A> ; <A
title=users@geoext.org href="mailto:users@geoext.org">GeoEXT Users</A> </DIV>
<DIV><B>Subject:</B> Re: [Users] WFSCapabilitiesReader - default layer
strategies</DIV></DIV></DIV>
<DIV><BR></DIV>Hi,<BR><BR> An update about this thread. I created a
ticket : <BR><A class=moz-txt-link-freetext
href="http://trac.geoext.org/ticket/412">http://trac.geoext.org/ticket/412</A><BR><BR>
It contains a patch that fixes the issue. I don't really like how I made
it (it could have been better, I think) and it's missing test units. Could
someone give me a comment/hint about it, please ?<BR><BR>Kind
regards,<BR><BR>Alexandre<BR><BR><BR>On 11-02-15 09:27 AM, Matt Priour wrote:
<BLOCKQUOTE cite=mid:9D6A358FC66C431DBAB66643C28037D9@Lenovo type="cite">
<META content="MSHTML 6.00.6002.18357" name=GENERATOR>
<DIV><FONT face=Arial size=2>+1 on the option to use the short strategy name
string with an options object.</FONT></DIV>
<DIV><FONT face=Arial size=2>We could implement this immediately in GeoExt
when creating layers from the capabilities store and the layerOptions, if
there is not equal support for that syntax directly in OL.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>I've also come across this issue and ended up
solving it by listening to 'add' event on the layer store and then modifying
options on the layers accordingly. I would much prefer the ability to set the
defaults in the layerOptions rather than having to modify them after
creation.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Matt Priour</FONT></DIV>
<DIV><FONT face=Arial size=2>Kestrel Computer Consulting</FONT></DIV>
<DIV><BR></DIV>
<DIV style="FONT: 10pt Tahoma">
<DIV style="BACKGROUND: rgb(245,245,245)">
<DIV><B>From:</B> <A title=eric.lemoine@camptocamp.com
href="mailto:eric.lemoine@camptocamp.com" moz-do-not-send="true">Eric
Lemoine</A> </DIV>
<DIV><B>Sent:</B> Tuesday, February 15, 2011 7:51 AM</DIV>
<DIV><B>To:</B> <A title=adube@mapgears.com href="mailto:adube@mapgears.com"
moz-do-not-send="true">Alexandre Dube</A> </DIV>
<DIV><B>Cc:</B> <A title=users@geoext.org href="mailto:users@geoext.org"
moz-do-not-send="true">GeoEXT Users</A> </DIV>
<DIV><B>Subject:</B> Re: [Users] WFSCapabilitiesReader - default layer
strategies</DIV></DIV></DIV>
<DIV><BR></DIV>> What if we started supporting this :<BR>> var layer =
new OpenLayers.Layer.Vector("layer", {<BR>> protocol:
...,<BR>> strategies: ["OpenLayers.Strategy.BBOX"]<BR>>
});<BR>><BR>> and this too :<BR>> var layer = new
OpenLayers.Layer.Vector("layer", {<BR>> protocol: ...,<BR>>
strategies: [{"OpenLayers.Strategy.BBOX": {ratio: 1}}]<BR>>
});<BR><BR>That was my suggestion. And I think {"BBOX"} and {"BBOX": {ratio:
1}}<BR>could also be supported.<BR><BR><BR><BR>-- <BR>Eric
Lemoine<BR><BR>Camptocamp France SAS<BR>Savoie Technolac, BP 352<BR>73377 Le
Bourget du Lac, Cedex<BR><BR>Tel : 00 33 4 79 44 44 96<BR>Mail : <A
href="mailto:eric.lemoine@camptocamp.com"
moz-do-not-send="true">eric.lemoine@camptocamp.com</A><BR><A
href="http://www.camptocamp.com"
moz-do-not-send="true">http://www.camptocamp.com</A><BR>_______________________________________________<BR>Users
mailing list<BR><A href="mailto:Users@geoext.org"
moz-do-not-send="true">Users@geoext.org</A><BR><A
href="http://www.geoext.org/cgi-bin/mailman/listinfo/users"
moz-do-not-send="true">http://www.geoext.org/cgi-bin/mailman/listinfo/users</A><BR></BLOCKQUOTE><BR><BR><PRE class=moz-signature cols="72">--
Alexandre Dubé
Mapgears
<A class=moz-txt-link-abbreviated href="http://www.mapgears.com">www.mapgears.com</A>
</PRE></BODY></HTML>