[geojquery] Desireable plugin pattern

Volker Mische volker.mische at gmail.com
Thu Aug 19 05:07:12 EDT 2010


On 18.08.2010 16:12, Anne Blankert 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

Hi Anne,

go for it. Press the clone button on the geojquery Gitorious so that you 
have your own repo and put the skeletons in.

About the name. I don't think it's a big deal to change it later, but I 
the "geo" would be a nice short one (map sadly can't be used).

When I thought about the geojquery UI components I initially thought 
about high level ones, like a layer switcher. But with OpenLayers 3.0 
coming it seems to be a good idea to have low level ones, like a scale 
bar as well.

Cheers,
   Volker



More information about the Mapquery mailing list