[OpenLayers-Users] Design advice please
Tim Schaub
noreply at geocartic.com
Wed Jun 6 13:42:43 EDT 2007
Jerry O'Sullivan wrote:
> Hi All,
>
> I am looking at building an openlayers projects which will be pretty
> simple, base data with some points on top. Users will be able to click
> on the points to get extra info or link to another page. My questions is
> about the best way to display these points. I can see the following options
>
> 1) Serve points as a WFS layer from geoserver and registers a click
> event on the map to get info
> 2) Serve points as a WMS layer from geoserver and registers a click
> event on the map to get info
> 3) Roll my own Ajax function to pull coordinates out of the points file
> and create a new vector.marker layer.
>
Depends on your data.
If you only want to deal with ~50 or so points at a time (a good limit
in terms of browser and human performance), you can use a layer that
brings the data (geometry and attributes) client side. The WFS, GeoRSS,
and KML layers should work. If you choose this route, use the
SelectFeature control to return features from mouse events. If you use
WFS, its good practice to include maxFeatures in your request (there's
no reason to have 400,000 points client-side).
If you want many more features rendered than the browser (or human) can
handle at once, you can render as WMS (or other) and use GetFeatureInfo
requests to get attributes. See the getfeatureinfo.html example in the
examples directory [1].
You could use WFS and GetFeature if you also want to get geometry
information with each request - but if you've already rendered the
points, there may be no reason to get this extra info.
Shouldn't be any reason to roll your own.
Tim
[1] http://openlayers.org/dev/examples/getfeatureinfo.html
More information about the Users
mailing list