Dear,
I'm quite new to OpenLayers, started with some small tests last weekend. So,
please forgive me, if I ask some stupid questions ;-)
At the moment, I want to change the style of a feature according to some
attribute values. I looked into the examples (like style-rules.html and
styles-rotation.html), and it looks quite good. My only problem is: How to
use this with dynamically loaded data.
If I create the features like in the examples (JS-Code in the page) and add
them to the layer ("vector.addFeatures(features);"), it works. But I would
like to load the features from a server, using the text format (tab-seperated):
var vector = new OpenLayers.Layer.Vector("Points", {
strategies: [new OpenLayers.Strategy.Fixed()],
styleMap: new OpenLayers.StyleMap(style),
protocol: new OpenLayers.Protocol.HTTP({
url: "/MapTest/FeatureServlet",
format: new OpenLayers.Format.Text()
})
});
I can use the feature attributes f.e. in a layer, so in general, they are
created correctly.
Any hints what is going wrong? Any additional info needed?
Best regards,
Heiner
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users