[geojquery] Playing with the prototype GeojQuery Widget
Volker Mische
volker.mische at gmail.com
Sat Sep 25 07:44:51 EDT 2010
On 09/24/2010 08:48 PM, Christian Wygoda wrote:
> Great writeup, Anne!
>
> Everyone can probably agree on two facts:
> * jQuery-UI's factory is to be used for all visible widgets (what's an
> invisible widget? :-)) except the core OL map widget.
> * which factory or API-Style to use for the core map widget is an
> essential question.
>
> Pro UI-factory: It's already there and would offer the same API-Style as
> all the other great widgets we will code...
> Con: Added dependency with all drawbacks for a simple core map - no CDN
> for customized dependency libs, etc., etc. Were set for the UI-style API.
>
> If we want to steer off jQuery-UI's factory code then we need to decide
> on an API style. As much as I understand Volker's thoughts on that
> topic, I would like to point out that going down his proposed road would
> mean having to learn two basic API styles for one project if it uses
> more than the basic map... I urge to not go down that road as it
> probably would impact project acceptance.
>
> As much as I understand feelings about minimizing required download size
> - should it be a concern that early on? API style is more important,
> right? Or is it just me?
>
> Ok, I'll try to successfully reach my final station tonight while
> Deutsche Bahn tries to do anything against it... more time to think
> about geojquery... :)
>
Hi Christian,
it's not quite like that. The API will be as described here:
http://gitorious.org/geojquery/pages/Api
The the difference between geoMap() and all other widgets will be that:
- geoMap() returns a Map object we create and are in charge of
- any other widget returns a jQuery object, just as any other jQuery UI
widget.
So geoMap() is basivally the entry point. Hopefully users of geojquery
will only use the widgets and never get around direct manipulation of
the map.
The Map object returned by geoMap() will be for internal use for the
widgets (it's the geojquery core part). It is like that already.
The change should be fairly simple (to move geoMap() from a UI widget to
a normal plugin. So expect some code from me that wil hopefully make
things clearer :)
You can already have a look at the example how the Map object (which is
also passed in to the layer widget) is used.
Cheers,
Volker
More information about the Geojquery
mailing list