[MapQuery] starting a widget API is wrong

Steven M. Ottens steven at minst.net
Fri Jul 1 07:11:49 EDT 2011


  On 6/30/2011 4:15 PM, Volker Mische wrote:
> On 06/30/2011 12:05 PM, Anne Blankert wrote:
>> But until now, the idea of MapQuery is that it modifies the look and
>> behaviour of DOM elements instead of the look and behaviour of the map
>> element. For this reason I would stay with
>>   $("domselector").mqWidget(options)
>> and
>> $("domselector").mqWidget($("mapselector"))
>>
Hi all,

Some more pondering resulted in the conclusion that this is not possible:

$("domselector").mqWidget($("mapselector"))

Because this approach will destroy the options object in the widget. So all the default settings as set in the options object in the widget will be destroyed as well.

So I'd say the definitive API for widgets is:
$("domselector").mqWidget({map:"mapselector"})
I'll update the widgets and examples accordingly.

(I don't like passing in the jQuery object like this: $("domselector").mqWidget({map:$("mapselector")}) )

Regards,
Steven







More information about the MapQuery mailing list