[OpenLayers-Users] need help with vectors
Anselm Hook
anselm at gmail.com
Sun Dec 24 04:52:32 EST 2006
For this kind of answer you really need to join the #openlayers
irc.freenode.net - or preferably chat.freenode.net - to be honest. All the
developers are there in real time and for work that is pre-release it is
really the best way to participate...
Looking at your particular problem; I don't see anything wrong per se. But
I don't know this code well...
- a
On 12/23/06, Adam Eskreis <aeskreis at gmail.com> wrote:
>
> I know the vectors are still in development but if someone could help me
> it would be most appreciated. I'm pretty sure my code is right, but for
> some reason the program keeps messing up when i try to add the features to
> the vector. here is the relevant code:
>
> var linearRing = new OpenLayers.Geometry.LinearRing([
> new OpenLayers.Geometry.Point(195090.60388669,
> 1037165.33840374),
> new OpenLayers.Geometry.Point(195223.79377482,
> 1037117.84835569 ),
> new OpenLayers.Geometry.Point(195230.71396682,
> 1037136.86838771),
> new OpenLayers.Geometry.Point(195085.51383869,
> 1037188.31824376),
> new OpenLayers.Geometry.Point(195090.60388669 ,
> 1037165.33840374)]);
> var polygon = new OpenLayers.Geometry.Polygon([linearRing]);
> var vector = new OpenLayers.Layer.Vector("Vector Layer");
> var feature = new OpenLayers.Feature();
> feature.setGeometry (polygon);
> map.addLayer(vector);
> vector.addFeatures(feature);
>
> the error i get is :
>
> this.root has no properties
>
> the error occurs on Svg.js on line 165
>
> does anyone have a clue as to why this isnt working? I know these
> coordinates are correct and the extents and everything else is correct, the
> only problme is this vector code.
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20061224/bb8e2530/attachment.html
More information about the Users
mailing list