[geojquery] Desireable plugin pattern

Marc Jansen jansen at terrestris.de
Thu Aug 19 06:26:16 EDT 2010


Hi Anne,

Please go ahead and commit your code. (I sent a mail yesterday stating 
the same; but somehow it got lost)

Regards,
Marc


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
>
>
> _______________________________________________
> Geojquery mailing list
> Geojquery at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geojquery
>




More information about the Mapquery mailing list