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

Volker Mische volker.mische at gmail.com
Sun Mar 14 23:03:28 EDT 2010


Oliver Tonnhofer wrote:
> On 13.03.2010, at 21:48, Volker Mische wrote:
>> the way I have imagined it is like gquery does it. Once you apply the
>> map object, you are not in the DOM world any more. Any future call in
>> the chain will be applied to the map. Here's an example:
>>
>> $('#map').map({someoptions}).center(lonlat);
>> [...]
>> $('#map').map({someoptions}).center(lonlat).dom().hide();
> 
> 
> Ok, that looks not to bad. 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);

Yes, the data should be internally stored with data(). Just like jQuery
UI does it.

> It would be cool to have working CSS selectors like
> $('#map #mylayer').hide(). It might work some custom selectors $('#map :layer("mylayer")').layer().disable()

Custom selectors should be easily possible, though I haven't used them
myself.

Cheers,
  Volker




More information about the Mapquery mailing list