Manuel Reimer <manuel.spam@...> writes:
> what I have is a vector layer which shows a multipolygon line. I want to
> have some description text (freely positioned) on this layer.
Hello,
I tried out some things and it seems to be impossible to use "addFeatures"
if the Layer is directly connected to some external HTTP URL. This is my
current code:
var layer = new OpenLayers.Layer.Vector("My Layer Name", {
visibility: true,
strategies: [new OpenLayers.Strategy.Fixed()],
protocol: new OpenLayers.Protocol.HTTP({
url: "mydb.cgi",
format: new OpenLayers.Format.OSM()
}),
projection: map.displayProjection,
style: {strokeColor: "red", strokeWidth: 5, strokeOpacity: 0.5}
});
map.addLayer(layer);
Can someone please help me to rewrite this to do the following:
- Fetch the features from my external file, first.
- Then add those features using "addFeatures" to my layer.
The idea is, that this should enable me to add additional features using
"addFeatures", that are not part of the ".osm" file, I want to read.
Thanks in advance
Yours
Manuel
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users