[OpenLayers-Dev] Tiled WFS layer

Martijn van Oosterhout kleptog at gmail.com
Tue Sep 25 08:44:31 EDT 2007


For a POI layer for OSM I've been working on a tiled version of the
WFS layer (apparently I'm not the only one). I have it working now.
It's really only minor changes from the standard TMS layer.

There are some minor changes to the Tile.WFS class, which you can see here:
http://dev.openstreetmap.org/~kleptog/pois/Tile_WFS.js
Really only the changes in the "destroyAllFeatures" and the "draw"
functions are necessary, otherwise the markers keep getting created
and never destroyed.

The actual WFSGrid is here:
http://dev.openstreetmap.org/~kleptog/pois/WFSGrid.js
It's really a minor variation on the TMS, the diff is here:
http://dev.openstreetmap.org/~kleptog/pois/wfsgrid.txt
The most necessary bits were the add/removeMarker, needed by Tile.WFS
to interact with the marker layer.

There are a few remaing issues:
- Due to the way Layer.Grid works you need aggressive caching on the
server side or it'll keep requesting the same thing over and over
again.
- The Markers disappear while dragging
- It feels slow somehow...
- The marker layer currently needs to be created by the user, but I've
just been told it's ok to inherit from Markers and Grid
simultaneously.

Anyway, this is just to let you guy know where I'm up to, in case
anybody has ideas. Complete working demo is here:
http://dev.openstreetmap.org/~kleptog/pois/pois2.html

Thanks in advance,
-- 
Martijn van Oosterhout <kleptog at gmail.com> http://svana.org/kleptog/



More information about the Dev mailing list