[OpenLayers-Users] Line

Bill Thoen bthoen at gisnet.com
Fri Sep 5 15:18:55 EDT 2008


That line is in the Atlantic Ocean at a spot just north of the Azores. 
But if you're expecting it to show up somewhere in South Africa, you 
need to specify coordinates as Lon, Lat instead of Lat, Lon.


Kenny France wrote:
> 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!
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>   




More information about the Users mailing list