[OpenLayers-Users] This is How I made Layer.Vector redraw under
Firefox in Linux.
BenJamin2007
ukliming at hotmail.com
Thu Oct 18 15:27:39 EDT 2007
vectorLayer = new OpenLayers.Layer.Vector("vector layer");
markermanager = new OpenLayers.Layer.Markers("Beam Formers");
map.addLayer(markermanager);
map.addLayer(vectorLayer);
The vectorLayer won't redraw when do this:
vectorLayer.drawFeature(obj.getPolygon());
This function works well under Firefox in Windows, but failed in Firefox in
Linux. I failed to hack into the openlayers source code, then I just add
LinuxRedraw() at the end of the above line, that's is:
vectorLayer.drawFeature(obj.getPolygon());
LinuxRedraw();
Then it works. I know, it's lame. But I had no choice. I am sure somebody
out there have a better way of redrawing the vector layer.
BTW, I did tryed the
vectorLayer.redraw().
but in vain.
function LinuxRedraw(flag)
{
if(flag==null)
{
map.removeLayer(vectorLayer);
map.addLayer(vectorLayer);
}else if(flag==1)
{
wms.redraw();
}
//map.pan(1,1);
//map.pan(-1,-1);
}
--
View this message in context: http://www.nabble.com/This-is-How-I-made-Layer.Vector-redraw-under-Firefox-in-Linux.-tf4649211.html#a13281874
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list