[OpenLayers-Users] Line
Kenny France
kenny at xarex.com
Fri Sep 5 12:34:09 EDT 2008
could somebody Pleaase have a look at the following and tell me why its not
drawing a line?
var style_green = {
strokeColor: "#00FF00",
strokeOpacity: 1,
strokeWidth: 3,
pointRadius: 6,
pointerEvents: "visiblePainted"
};
var vectorLayer = new OpenLayers.Layer.Vector("Line");
// create a line feature from a list of points
var pointList = [];
var newPoint;
newPoint = new
OpenLayers.Geometry.Point(-26.123456,26.123456);
pointList.push(newPoint);
newPoint = new
OpenLayers.Geometry.Point(-27.123456,26.123456);
pointList.push(newPoint);
var lineFeature = new OpenLayers.Feature.Vector(
new
OpenLayers.Geometry.LineString(pointList),null,style_green);
vectorLayer.addFeatures([lineFeature]);
map.addLayer(vectorLayer);
Thanks
K-
_____
I am using the free version of SPAMfighter for home users.
SPAMfighter has removed 39356 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter <http://www.spamfighter.com/len> for free now!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080905/3155fbde/attachment.html
More information about the Users
mailing list