Hi,

I'll take a look to your examples..

But after a little searching I'm trying do like this:

var polygonFeature = new OpenLayers.Feature.Vector(linearRing, null,
style_poly);
polygonFeature.data.OLPosition = position;
polygonFeature.data.infoContent = szInformation;
lyrTesting.addFeatures([polygonFeature]);

var hoverSelect = new OpenLayers.Control.SelectFeature(lyrTesting, {
        toggle: true,
        multiple: false,
        geometryTypes: ["OpenLayers.Geometry.LineString"],
        renderIntent: "temporary",
        eventListeners: {
            featurehighlighted: function(f) {
                var feature = new OpenLayers.Feature(lyrTesting,
f.feature.data.OLPosition);
                feature.closeBox = true;
                feature.popupClass = popupClass;
                feature.data.popupContentHTML = f.feature.data.infoContent;
                feature.data.overflow = (true) ? "auto" : "hidden";
                if (f.feature.popup == null) {
                    f.feature.popup = feature.createPopup(feature.closeBox);
                    map.addPopup(f.feature.popup);
                    f.feature.popup.show();
                } else {
                    f.feature.popup.toggle();
                }
            },
            featureunhighlighted: function(f) {
                if (f.feature.popup != null) {
                    f.feature.popup.destroy();
                    f.feature.popup = undefined;
                }
            }
        }
    });


The problem I get is when I try to redraw the map, an error is fired saying
that there is an error with style in the next function. (Says
that 'this.div.style' is undefined or not an object.)
getZIndex:function(){return this.div.style.zIndex;}

What I'm doing wrong?

Thanks!



2010/6/8 giraam <sdjb...@gmail.com>

>
> Hi,
>
> Maybe you can find something useful here..
> http://trac.openlayers.org/wiki/UserRecipes
> http://trac.openlayers.org/wiki/UserRecipes  =)
>
> Regards,
>
> -----
> just another web developer
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/Register-click-event-on-OpenLayers-Feature-Vector-tp5154434p5155291.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
_______________________________________________
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users

Reply via email to