Merge pull request #809 from tschaub/clockwise

Consistent winding order for polygon rings.
This commit is contained in:
Tim Schaub
2013-07-05 17:04:50 -07:00
22 changed files with 221 additions and 121 deletions
+4
View File
@@ -763,6 +763,10 @@ ol.parser.KML = function(opt_options) {
return node;
},
'Polygon': function(geometry) {
/**
* KML doesn't specify the winding order of coordinates in linear
* rings. So we keep them as they are in the geometries.
*/
var node = this.createElementNS('Polygon');
var coordinates = geometry.getCoordinates();
this.writeNode('outerBoundaryIs', coordinates[0], null, node);