[OpenLayers-Users] Launch a Popup for a Polygon object

Arnd Wippermann arnd.wippermann at web.de
Sat Oct 4 17:24:41 EDT 2008


Hi, try this
http://openlayers.org/dev/examples/select-feature-openpopup.html

Arnd Wippermann 

-----Ursprüngliche Nachricht-----
Von: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] Im
Auftrag von Transmatrix
Gesendet: Samstag, 4. Oktober 2008 02:47
An: users at openlayers.org
Betreff: [OpenLayers-Users] Launch a Popup for a Polygon object


Any help here is appreciated.  I am a fairly novice OpenLayers user, but I
am already really impressed by the power and capability of this product.

However, I am having a problem. I have successfully generated a circle using
the following format:
var polygonLayer = new OpenLayers.Layer.Vector(name, {styleMap: new
OpenLayers.StyleMap({fillOpacity: 0.6, fillColor: color})}); var circle =
new OpenLayers.Geometry.Polygon.createRegularPolygon(origin,
radius, 100, 0);
var drawcircle = new OpenLayers.Feature.Vector(circle);
polygonLayer.addFeatures(drawcircle);
map.addLayers([polygonLayer]);

What I would like to do is add an onClick event to the circle that launches
a popup with text in it.

However, this is done, I just want to add the functionality of clicking in
the area where the circle is and have a popup show up.  Is this possible?

Thanks!
--
View this message in context:
http://www.nabble.com/Launch-a-Popup-for-a-Polygon-object-tp19807459p1980745
9.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.

_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users




More information about the Users mailing list