[OpenLayers-Users] popup with wfs marker layer...

Christopher Schmidt crschmidt at metacarta.com
Tue Mar 13 20:03:22 EDT 2007


On Tue, Mar 13, 2007 at 05:35:53PM -0600, John Cole wrote:
> Christopher,
>   I've made it a little further...  I've subclassed Feature.WFS into
> Feature.WFS.Marker, and I'm parsing the GML to get the 'gid' and creating
> the feature with that ID and gid.  But I'm having problems getting back to
> that gid from the evt object.
> 
> Here is my class (and debug routine) so far.  Any suggestions?  I was
> expecting the evt object to have the gid, or an object attached to the evt
> object to have it.

'evt' is the browser event. 'this' in the markerClick function is the
feature. The feature.data has the gid. DumpResult could be
"alert(result.data.gid);", which should show it if you change
markerClick like so:

> markerClick: function(evt) {
> 	
> 	DumpResult("markerClick", this);
> 	OpenLayers.Event.stop(evt);
> },

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list