api 4.11 - How to draw a ellipse? class' "draw.create('ellipse')" doesn't draw ellipse

587
2
07-25-2019 08:25 PM
GISMentor
New Contributor

I am trying to draw ellipse using arcgis JS PI 4.11. but it seems there is no way to do it. In api 3.X user can draw ellipse interactivity on the map. we are migrating from 3.X to 4.11 Api and it seems implementation for ellipse is still not done in 4.11.

Code simplified for the example:
const action = draw.create('ellipse', {});

action.on('vertex-add', (evt) => this.createellipseGraphic(evt));
action.on('cursor-update', (evt) => this.createellipseGraphic(evt));
action.on('draw-complete', (evt) => this.createellipseGraphic(evt));

and

function createellipseGraphic(event) {   mapView.graphics.removeAll();

   const ellipse = new Polygon({      spatialReference: mapView.spatialReference,
      center: event.vertices[0],
   });

   const graphic = new Graphic({
      geometry: ellipse,
      symbol: // my symbol,
   });

   mapView.graphics.add(graphic);
}

Can anyone help in by provide the guidance, workaround  or ellipse code in 4.X api.

0 Kudos
2 Replies
GISMentor
New Contributor

Hi Everyone,

Any help??

It is a urgent requirement .

Kindly give a direction....

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor
0 Kudos