Skip to content

Commit

Permalink
Fix use of undefined ol.geom.Polygon.fromCircle
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Mar 24, 2023
1 parent d224db5 commit 99d5a68
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion libs/openlayers.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import OlGeomGeometryCollection from 'ol/geom/GeometryCollection';
import OlGeomMultiPoint from 'ol/geom/MultiPoint';
import OlGeomPoint from 'ol/geom/Point';
import OlGeomPolygon from 'ol/geom/Polygon';
import {fromCircle as olPolygonFromCircle} from 'ol/geom/Polygon';
import OlGraticule from 'ol/layer/Graticule';
import {defaults as olInteractionDefaults} from 'ol/interaction';
import OlInteractionDoubleClickZoom from 'ol/interaction/DoubleClickZoom';
Expand Down Expand Up @@ -116,7 +117,8 @@ export default {
GeometryCollection: OlGeomGeometryCollection,
MultiPoint: OlGeomMultiPoint,
Point: OlGeomPoint,
Polygon: OlGeomPolygon
Polygon: OlGeomPolygon,
polygonFromCircle: olPolygonFromCircle
},
Graticule: OlGraticule,
interaction: {
Expand Down
2 changes: 1 addition & 1 deletion plugins/Redlining.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ class Redlining extends React.Component {
// Circle is not supported by kml format
if (feature.getGeometry() instanceof ol.geom.Circle) {
feature = feature.clone();
feature.setGeometry(ol.geom.Polygon.fromCircle(feature.getGeometry()));
feature.setGeometry(ol.geom.polygonFromCircle(feature.getGeometry()));
}
return feature;
});
Expand Down

0 comments on commit 99d5a68

Please sign in to comment.