[geojquery] To plug in or not to plug in?

Oliver Tonnhofer olt at bogosoft.com
Mon Mar 15 03:09:32 EDT 2010


On 14.03.2010, at 14:26, Eric Lemoine wrote:
> Either manipulating the DOM is favored and the map method returns a
> jQuery object. And the map object is made available through a specific
> method (e.g. data("map")).
> 
> Or acting on the map is favored and the map method returns a map
> object. In this case it is the jQuery object that is made available
> through a specific method (e.g. dom()).
> 
> I don't know which I'd favor at this point, but both approaches make
> sense to me.

Since OpenLayers already does the whole DOM manipulation I would tend to the second. But then it would differ from all the other jQuery plugins. :/

>> How do you think we retrieve the map object again later? We could store the object with .data() and return this object on subsequent .map() calls.
>> 
>> $('#map').map({someoptions})
>> // later
>> $('#map').map().center(lonlat);
> 
> But shouldn't calling map() again create a new map object?

Or we call it .geo() which always gives us a map/geojquery object. geo() could be the counterpart to dom().

Regards,
Oliver

-- 
Oliver Tonnhofer <tonnhofer at omniscale.de>
Omniscale - Dominik Helle, Oliver Tonnhofer GbR
Nadorster Str. 60, 26123 Oldenburg
Tel: +49(0)441/9392774-2 (Fax: 9)






More information about the Mapquery mailing list