Select to view content in your preferred language

Does a Circle object have an extent in JSAPI 4.x?

863
2
Jump to solution
03-21-2018 04:56 PM
deleted-user-liuO8zXUrBPr
Deactivated User

    var circle = new Circle({
      center: evt.mapPoint,
      geodesic: true,
      radius: 0.0568182, // 300 feet
      radiusUnit: "esriMiles"
    });

if you create a circle like this or any other fashion in JSAPI 4.6, It appears as if the circle object has an undefined extent unlike in JSAPI 3.x where circle.getExtent() would return a proper Extent type object.

Still new to 4.x. Happy to get advice on what i might be doing wrong. Any body else who can confirm - it is greatly appreciated.

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Subu,

  The issue is your radiusUnits. You are are not using a proper value.

Possible Values: feet | kilometers | meters | miles | nautical-miles | yards

        var circle = new Circle({
          center: evt.mapPoint,
          geodesic: false,
          radius: 0.0568182, // 300 feet
          radiusUnit: "miles"
        })

View solution in original post

2 Replies
RobertScheitlin__GISP
MVP Emeritus

Subu,

  The issue is your radiusUnits. You are are not using a proper value.

Possible Values: feet | kilometers | meters | miles | nautical-miles | yards

        var circle = new Circle({
          center: evt.mapPoint,
          geodesic: false,
          radius: 0.0568182, // 300 feet
          radiusUnit: "miles"
        })
deleted-user-liuO8zXUrBPr
Deactivated User

Thanks for the tip - Robert.

Carry over from 3.x. Worked fine there.

0 Kudos