Skip to content

Commit

Permalink
Updated MultiPolygon 'polygons' prop to allow polygons with holes (#218)
Browse files Browse the repository at this point in the history
Like 'Polygon' already allows passing array of arrays to make holes, also
MultiPolygon should allow it. Even though not read in Leaflet
MultiPolygon documentation, it supports it because Polygon support it.
  • Loading branch information
ernoaapa authored and PaulLeCam committed Sep 8, 2016
1 parent 1274184 commit a576af6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/MultiPolygon.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ import Path from './Path'

export default class MultiPolygon extends Path {
static propTypes = {
polygons: PropTypes.arrayOf(latlngListType).isRequired,
polygons: PropTypes.arrayOf(
PropTypes.oneOfType([
latlngListType,
PropTypes.arrayOf(latlngListType),
])
).isRequired,
};

componentWillMount () {
Expand Down

0 comments on commit a576af6

Please sign in to comment.