Hi,
I have a strange issue with Firefox. The following snippet works well in
Chrome 20, but doesn't in Firefox 13 (with openlayers 2.12), i.e. the
LineString is not visible:
var theLayer = new OpenLayers.Layer.Vector("Route", {
rendererOptions: {yOrdering: true},
styleMap: new OpenLayers.StyleMap({'default':{
fillOpacity: 1.0
}})
});
map.addLayer(theLayer);
...
var geometry = new OpenLayers.Geometry.LineString(polyPoints);
var routePolyLine = new OpenLayers.Feature.Vector(geometry, null, {
strokeColor: color,
strokeOpacity: opacity,
strokeWidth: sWidth
});
theLayer.addFeatures(routePolyLine);
The difference I notice is that after having called addFeatures, in the DOM
in Firefox, theLayer.unrenderedFeatures contains the entire vector (i.e. a
copy of or reference to theLayer.features[0]), while in Chrome
theLayer.unrenderedFeatures is null.
theLayer.reportError is set to true but I don't get any errors in the
console.
I also tried
theLayer.drawFeature(routePolyLine);
theLayer.refresh();
after the addFeature, no change, the poly line doesn't appear in Firefox.
Any ideas ?
Thanks,
Armin
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users