[geojquery] Desireable plugin pattern
Christian Wygoda
arsgeografica at googlemail.com
Thu Aug 19 06:18:17 EDT 2010
On Wed, Aug 18, 2010 at 4:12 PM, Anne Blankert <anne.blankert at geodan.nl>wrote:
> On 7/29/2010 11:30 PM, Volker Mische wrote:
>
>> Best thing is to read the archive, there are so many ways :)
>>
>> IIRC, my last preferred approach was to have distinction between the map
>> and layers (and perhaps even features). So that you e.g. can bind events to
>> the map, layers and features.
>>
>> As I always say, we are still in flux, please write code if you've the
>> time to and do it the way you like. It's much better to comment on existing
>> things, rather than discussion vaporware to death.
>>
>> Cheers,
>> Volker
>>
>
> Where and how shall we start working on plubicly viewable/updatable code in
> a very flexible manner? The source tree in geojquery still seems to be
> empty? For a start, there could be a general setup for a JQuery plugin:
>
>
> (function ($) {
>
> $.fn.pluginname = function (param1, param2, useroptions)
> {
> // set default option values and extend with useroptions
> options = $.extend( {
> option1: "defaultvalue1",
> option2: "defaultvalue2",
> option3: "defaultvalue3"
> }, useroptions || {});
> }
>
> })(jQuery);
>
>
> Some decisions already have to be made:
> - The name for the plugin, is this the only plugin or will there be many?
> - There is a proposition athttp://
> gitorious.org/geojquery/pages/PluginOverview where there is a distinction
> between UI and Core. The Core plugin is a JQuery api-wrapper around
> OpenLayers or - as I understand it - some other mapping module to be used.
> The UI plugin provides the actual interactive mapping widgets (in my
> understanding such widgets could be the map itself, a legend, a scale bar, a
> layer selector, a layer manager, a coordinate display, a feature info
> displayer, an overview map, map drawing tools with element type selector,
> color selector, line type selector, layer creator etc.)
>
> If I understand correctly, the next coding step could be setting up a very
> simple OpenLayers based map, wrapped in two jquery plugin skeletons (core +
> ui) such as the one above?
>
> Do you think that this is the way to proceed or should we wait for someone
> or some group to come up with much bigger code chunks?
>
> Greetz,
>
> Anne
>
>
> _______________________________________________
> Geojquery mailing list
> Geojquery at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geojquery
>
I could provide a little more, based on a hacked jQuery UI widget factory
(for single namespace $.geojquery with subnamespaces like $.geojquery.core
and ":layer"-style selector function calls) with a core.map-widget based on
it. Want me to throw it in?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapquery/attachments/20100819/1e35fe97/attachment.html
More information about the Mapquery
mailing list