Dear OL List
I am seeking assistance to orient an arrow image on a layer using the
latest wind direction record in a MySQL database.
I have a php file printing the value of the direction and I reference it
by its location... but this is not successful.
Your suggestions would be very welcome.
Thanks
David Hine
Snip....
vectors = new OpenLayers.Layer.Vector(
"Wind Direction",
{
styleMap: new OpenLayers.StyleMap({
"default": {
externalGraphic: "img/windarrow.png",
//graphicWidth: 17,
graphicHeight: 67,
graphicYOffset: -33,
rotate: "${angle}",
fillOpacity: "1"
},
"select": {
cursor: "crosshair",
externalGraphic: "img/marker.png"
}
})
}
);
map.addLayer(vectors);
var features = [];
var x = 145.85318;
var y = -17.53748;
var angle = {location: "./txtgen_wind_dir.php"}
rotate: "${angle}",
origin = (x, y),
features.push(
new OpenLayers.Feature.Vector(
new OpenLayers.Geometry.Point(x, y), {angle:
"${angle}", origin: (x, y)
}
)
);
vectors.addFeatures(features);
snip....
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users