[OpenLayers-Users] Visibility of features in vector layer

Heidt, Christopher M. CHRISTOPHER.M.HEIDT at saic.com
Tue May 5 09:32:52 EDT 2009


I'm assuming that when you tell it to redraw you pass it params for that
redraw but those params are for that redraw only.
When you change your zoom lvl OL is redrawing the feature with its
origional style settings.

Try changing the features render intent(style setting) prior to redraw.

var featureStyles = new OpenLayers.StyleMap({
	"default": OpenLayers.Feature.Vector.style["default"],
	"select": OpenLayers.Feature.Vector.style.select,
	"hidden":{
		fillOpacity: 0.0		
		strokeOpacity: 0.0
	}
});

//then later you can
feature.renderIntent = 'hidden';
_featureLayer.drawFeature(feature);



-----Original Message-----
From: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org]
On Behalf Of djud
Sent: Tuesday, May 05, 2009 9:16 AM
To: users at openlayers.org
Subject: Re: [OpenLayers-Users] Visibility of features in vector layer


Thanks Heidtmare,

I will try this but I'm still concerned as to why drawing the feature
with
"display: none" doesn't work at all zoom levels.

Dave


--
View this message in context:
http://n2.nabble.com/Visibility-of-features-in-vector-layer-tp2792029p27
94303.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