Ok, found out that if you just force two LinearRing geometries into the same
polygon object you get two polygons that are fused together as it were. No
need to use MultiPolygon!

 

var parcel01= new OpenLayers.Geometry.LinearRing(pointList01);

var parcel02 = new OpenLayers.Geometry.LinearRing(pointList02);

var polygonFeature = new OpenLayers.Feature.Vector( new
OpenLayers.Geometry.Polygon([parcel01, parcel02]));

 

At least it does what I want.

 

Cheers,

 

Brad.

 

From: [email protected] [mailto:[email protected]] On
Behalf Of Brad Spencer
Sent: Tuesday, October 27, 2009 5:52 PM
To: openlayers users
Subject: [OpenLayers-Users] MultiPolygons

 

List,

 

I cannot see any examples of this so thought someone may have done the and
can help me.

 

Its not clear how to make a multiPolygon vector object. I can create
individual polygons no problem but how for example would you generate two
concentric circles  as a single polygon with no lines joining the two
circles? This would be is the same as a donut shape.

 

Cheers,

 

Brad Spencer

NuMaps

 

 

_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to