[geojquery] If the map would be a DOM object

Volker Mische volker.mische at gmail.com
Sun Mar 21 04:13:15 EDT 2010


Hi,

I just had a crazy idea, and before I wake up tomorrow and think it's
not worth mentioning it, I just drop this mail. Here it is: what most
people like about jQuery is the way how easy the interaction with DOM
got with it. So how would a map look like if it would be a DOM object
and how would you interact with it?

You would use selectors to get the objects, e.g.:
// hide the layer with id bluemarble
Map('layer#bluemarble').hide();
// hide all WMS layers, but still show WFS layers
Map('layer.wms').hide();
// assign an onclick event to all features to the layer with id states
Map('layer#states features').onclick();
// add a new layer (append is only an example,
// better method names could be used
Map.append("layer", {type: 'WMS, url: '', ...}).
// Filtering features
Map(layer#states features).filter();

This was only a quick brainstorm. I need to think about it more
thoroughly the next days, but you might have already opinions about it.

Cheers,
  Volker


More information about the Geojquery mailing list