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

Transmatrix prime at transmatrix.net
Mon Oct 6 12:49:19 EDT 2008


Nevermind, I found out what my problem was. I wasn't "activating" the
control...


Transmatrix wrote:
> 
> This has sent me down the right path, but I'm still lost.  I am trying to
> modify this script to work for a polygon that was already drawn, and
> doesn't require the radio buttons.
> 
> I tried just adding this to my script:
> map.addControl(new OpenLayers.Control.SelectFeature(polygonLayer,
>                 {onSelect: onFeatureSelect, onUnselect:
> onFeatureUnselect}));
> 
> Along with the onPopupClose, onFeatureSelect, and and onFeatureUnselect
> functions, but nothing happens when I click on the polygon. I tried just
> changing it to: 
> 
> map.addControl(new OpenLayers.Control.SelectFeature(polygonLayer,
>                 {onSelect: alert("popup test")}));
> 
> However, the alert shows up when the page loads, and not when I click on
> the polygon...
> 

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




More information about the Users mailing list