Hi Robert, thanks for the quick response. I have looked at the 2 examples you suggested and as far as I can see they are ideal for small datasets which can be loaded all at once but I am using WFS specifically because the dataset is fairly large (a few thousand points) and as such I only want OpenLayers to request as much as the user is viewing on screen. When the user zooms right out I'm going to remove them altogether so at any point they will only see a hundred or so at most.<br>
<br><br><br><div class="gmail_quote">On Fri, May 9, 2008 at 3:42 PM, Burgholzer,Robert <<a href="mailto:rwburgholzer@deq.virginia.gov">rwburgholzer@deq.virginia.gov</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<p><font size="2">Tom,<br>
You may first want to look at the popups demo, popups.html and the textmarkers demo, markersTextLayer.html, in the example folder of the OpenLayers distro.<br>
<br>
It would seem that this would be fairly easy to add to a WMS layer.<br>
<br>
r.b.<div><div></div><div class="Wj3C7c"><br>
<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:users-bounces@openlayers.org" target="_blank">users-bounces@openlayers.org</a> on behalf of Tom (JDi Solutions)<br>
Sent: Fri 5/9/2008 10:20 AM<br>
To: <a href="mailto:users@openlayers.org" target="_blank">users@openlayers.org</a><br>
Cc: <br>
Subject: [OpenLayers-Users] WFS points for markers and popups<br>
<br>
Hi all,<br>
<br>
I've googled and searched the examples and mail archives for the solution<br>
for this but can't quite find precisely what I'm looking for so I wonder if<br>
someone could help out?<br>
<br>
I have so far managed to get a standard OpenLayers setup and added a WMS<br>
base layer and a WFS layer which returns 2 pieces of data, a point geometry<br>
(GEOLOC) and a site reference (SITE_REF) using the following code:<br>
<br>
var layer2= new OpenLayers.Layer.WFS('Points',<br>
'<a href="http://mygeoserver/geoserver/wfs?%27" target="_blank">http://mygeoserver/geoserver/wfs?'</a>,{request:'GetFeature',PropertyName:'GEOLOC,SITE_REF',typeName:'gndp:points',isBaseLayer:'false',extractAttributes:'true'});<br>
<br>
and that adds a layer of markers to the map which is great. What I now want<br>
is to add popups to these markers which simply displays the SITE_REF (I'll<br>
later change this to some slightly more glamorous HTML but for now that will<br>
do.<br>
It seems like I may have to use featureClass: OpenLayers.Feature.WFS as<br>
shown in the example here: <a href="http://openlayers.org/dev/examples/wfs.html" target="_blank">http://openlayers.org/dev/examples/wfs.html</a> but<br>
that appears to give the same functionality I already have. There is a<br>
suggestion to subclass OpenLayers.Feature.WFS in order to add a popup but my<br>
js skills are weak and I don't get how to do this. Can someone give an<br>
example? Which methods need to be overridden and how do I get my data into<br>
the popup?<br>
<br>
Furthermore, is it possible to load the WFS layer as a tiled layer so I can<br>
cache the results? and how do I set a different icon?<br>
<br>
thanks in advance,<br>
<br>
Tom<br>
<br>
<br>
<br>
</div></div></font>
</p>
</div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
<br></blockquote></div><br>