<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=Windows-1252">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6619.12">
<TITLE>RE: [OpenLayers-Users] WFS points for markers and popups</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<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.<BR>
<BR>
<BR>
-----Original Message-----<BR>
From:&nbsp;&nbsp; users-bounces@openlayers.org on behalf of Tom (JDi Solutions)<BR>
Sent:&nbsp;&nbsp; Fri 5/9/2008 10:20 AM<BR>
To:&nbsp;&nbsp;&nbsp;&nbsp; users@openlayers.org<BR>
Cc:&nbsp;&nbsp;&nbsp;&nbsp;<BR>
Subject:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [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?'">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.&nbsp; 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">http://openlayers.org/dev/examples/wfs.html</A> but<BR>
that appears to give the same functionality I already have.&nbsp; 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.&nbsp; Can someone give an<BR>
example?&nbsp; 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>
</FONT>
</P>

</BODY>
</HTML>