[geojquery] Playing with the prototype GeojQuery Widget

Volker Mische volker.mische at gmail.com
Sat Sep 25 15:23:28 EDT 2010


> 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

Ok, I found some time to implement a few bits. The geoMap() doesn't use
the jQuery UI wdget factory any longer. Though the API changed a bit, as
I hit some walls while implementing.

The .geoMap() returns a jQuery object. The reason is, that you can now
apply a map to several DOM nodes at the same time (see
demo/multimaps.html). If can get the geoMap object (I was referring to
as geojquery-core) with .geoMap(...).data('geoMap') (e.g. if you want to
add layers).

The widgets will now take a jQuery object as input. I implemented it for
the geoLayerControl.

Please have a look at the examples to see if you like it or not.

I also added information to the wiki page:
http://gitorious.org/geojquery/pages/Api

Hers's my changeset (on my own branch)
http://gitorious.org/~vmx/geojquery/vmx-geojquery/commit/b5372dec58ef8ddf21c26a6c954080b1082d4199

Cheers,
  Volker


More information about the Geojquery mailing list