Bug fix: Map.addPolygon(...) with holes does not work
MODIFY
www/Map.js
www/Map.js
@@ -856,7 +856,9 @@ Map.prototype.addPolygon = function(polygonOptions, callback) {
if (!utils.isArray(hole)) {
return [];
}
- return hole.map(common.convertToPositionArray);
+ return hole.map(function(position) {
+ return {"lat": position.lat, "lng": position.lng};
+ });
});
polygonOptions.strokeColor = common.HTMLColor2RGBA(polygonOptions.strokeColor || "#FF000080", 0.75);
if (polygonOptions.fillColor) {

Bug fix: Map.addPolygon(...) with holes does not work #1682