[OpenLayers-Users] geometry collection
Max Weidemann
max.weidemann at freenet.de
Thu Aug 6 05:35:01 EDT 2009
Marc Jansen-2 wrote:
>
> Hi Max,
>
> It is possible to add Geometry Collections to Vectorlayers:
>
>
> var gc_geometry = new OpenLayers.Geometry.Collection(
> [
> new OpenLayers.Geometry.Point( ... ),
> new OpenLayers.Geometry.LineString( ... ),
> new OpenLayers.Geometry.Polygon( ... )
> // etc.
> ]
> );
>
> var gc_feature = new OpenLayers.Feature.Vector( gc_geometry );
>
> var vectorLayer = new OpenLayers.Layer.Vector( ... )
>
> vectorLayer.addFeatures( [ gc_feature ] );
>
> Regards,
>
> Marc
>
Thanks Marc for that quick and very very helpfull answer.
cheers
Max
--
View this message in context: http://n2.nabble.com/How-to-use-geometry-collection-tp3396966p3397253.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list