[OpenLayers-Users] How can I show a picture a popup (URL for the pic should be read automatically from the attributes)

Max Stephan x.zam at gmx.net
Tue Feb 3 05:10:10 EST 2009


Hey everybody!

I got a shapefile here which I added to my geoserver. I have integrated it
as a layer in an openlayers map container. In the attributes of the
layer/shapefile is a field which contains an URL to a pic of each feature
(in this case the features are points). Now I want this picture to be
displayed in a popup (like it can be done in a marker layer). But I want to
have the URL automatically read from the attributes of the feature I´m
clicking on. It would be great to see some of the other attributes read from
the feature as well. The problem is I don´t know that much about the
OpenLayers-API. I only know how to write a GetFeatureRequest but this would
show me only the attribute table. If it´s too difficult to show a picture
which´s URL is in the attributes it would be even enough if the URL in the
attribute table (the one I get from the GetFeatureRequest) would be
clickable.

Greets and thanks for your help in advance Max Stephan




More information about the Users mailing list