I understand not wanting to have DOM objects returned (which jQuery UI doesn't if the called function returns anything (other than "this")).<br>Personally I could live with using the jQuery UI approach of having the first arg as function name and then the real function arguments - at least it keeps the jQuery namespace clean.<br>
<br>What would you like to see instead of<br><br>$('#mymap').map('addLayer', LayerDefObject);<br>$('#mymap').map('getNumLayers')<br><br>I'd be happy to learn what you envision!<br><br>Cheers,<br>
Crischan<br><br><div class="gmail_quote">On Thu, Jul 29, 2010 at 9:53 PM, Volker Mische <span dir="ltr"><<a href="mailto:volker.mische@gmail.com">volker.mische@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5">On 29.07.2010 21:44, Christian Wygoda wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi folks,<br>
<br>
I was looking at the available code examples offered on the mailing list<br>
and keeping in mind that there will be a Core plugin and UI plugins I<br>
came to the question which plugin pattern should be embraced.<br>
<br>
I think for the UI plugins it will be the natural to use the jQuery UI<br>
widget factory.<br>
For the Core plugin we would like to stay clean of jQuery UI<br>
dependencies, right? So we need to write our own plugin. But maybe we<br>
should use the same pattern as the jQuery UI widget factory? This could<br>
have two advantages:<br>
<br>
First, any project using the full set of GeoJQuery Core & UI magic could<br>
reuse the jQuery UI widget factory to build the core plugin and thus<br>
remove some lines of "redundant" code.<br>
Secondly, using the same pattern would make life a little bit easier for<br>
folks hacking both in Core & UI.<br>
<br>
To get our feet wet we could even start using the jQUery UI widget<br>
factory now (!) for the Core plugin and later "write" (a.k.a. c&p) the<br>
dropin for the widget factory. Or just point to the jquery.ui.widget.js<br>
in the install instructions then - depending on how lazy we will be. ;)<br>
<br>
Let me hear your thoughts.<br>
<br>
Cheers,<br>
Crischan<br>
</blockquote>
<br></div></div>
Hi,<br>
<br>
the core system should use something like the jQuery UI widget factory, but in my opinion not exactly the same. I don't like the way way jQuery UI uses the first argument as function name, and the the rest as parameters. For jQuery UI it makes sense to always return a DOM object, for geojquery it doesn not.<br>
<br>
geojquery is not about DOM manipulation it is about maps.<br>
<br>
Cheers,<br><font color="#888888">
Volker<br>
</font></blockquote></div><br>