[geojquery] First code for scoping-change approach
adams
adams at terrestris.de
Mon Mar 22 04:40:31 EDT 2010
Eric,
thanks for your contribution - I think what you did is a good example
for why we opened this discussionboard... we wanted to have a sink,
where ideas could come in and where people get encouraged to contribute
and to write a piece of software, which is based on as many minds and
needs as possible. No matter who really makes the coding in the end
(it's not me either ;-))
I take this to encourage others to contribute their ideas and needs to
the list - it's a starting project which is really open to any
experience, opinion and idea!
Till
Eric Lemoine wrote:
> On Saturday, March 20, 2010, Volker Mische <volker.mische at gmail.com> wrote:
>
>> Hi Marc,
>>
>> I like the "evererything is a plugin" a approach. I'll try to adapt in
>> my code. I really like the way ideas comes up. When we both keep adding
>> the things we like from each other's implementation we might even end up
>> with two implementations of the same public API :)
>>
>
> Hi
>
> I just took a look at the code of jQuery UI. As you probably know
> jQuery UI is a collection of jQuery plugins. And the API of jQuery UI
> looks interesting to me.
>
> To create a widget:
> $("selector").theWidget(options);
>
> To call a method on the widget:
> $("selector").theWidget("methodName", options);
>
> For this to work the widget object is stored using $.data().
>
> For geojquery one could imagine a similar API. For example to create
> a map and add layers to it one would do:
>
> $("#map").geo(mapOptions);
> $("#map").geo("addLayers", [
> new OpenLayers.Layer.WMS(...)
> ]);
>
> The above example assumes that the OpenLayers.Map instance is itself
> stored in the data object and that there's no intermediate object.
>
> Also, the more I think about it the more I think the geo() (or
> whatever it's called) function should return a jQuery object as
> opposed to a map instance. geojquery being about providing a
> jQuery'ish API I think this is important.
>
> Just thoughts. And my sincere apologies if this isn't relevant to the
> current discussions, and for just throwing ideas without writing
> actual code.
>
> Cheers,
>
>
--
---------------------------------------------------------
terrestris GmbH & Co. KG
Irmintrudisstrasse 17
53111 Bonn
Germany
Till Adams
Geschäftsführung
Tel: +49 (0)228 / 962 899-52
Fax: +49 (0)228 / 962 899-57
adams at terrestris.de http://www.terrestris.de
Amtsgericht Bonn, HRA 6835
---------------------------------------------------------
Komplementärin:
terrestris Verwaltungs GmbH
vertreten durch:
Hinrich Paulsen, Till Adams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapquery/attachments/20100322/74d5b697/attachment.html
More information about the Mapquery
mailing list