I can't create a new Polyline Geomtery Object in Experience Builder 1.5. If I use the code
new polyline({..})
my widget will not be loaded any more (fail to load):
import Polyline from 'esri/geometry/Polyline';
zoomTo = (geom: IGeometry) => {
if (this.jimuMapView) {
const pl = new Polyline({
paths: (geom as IPolyline).paths,
spatialReference: geom.spatialReference
});
this.jimuMapView.view.goTo(pl).catch(function (error) {
if (error.name != "AbortError") {
console.error(error);
}
});
}
}