AnsweredAssumed Answered

Problem with geometry.getCentroid method

Question asked by dolot on May 5, 2016
Latest reply on May 17, 2016 by dolot

I have the following line of code:

this.centerPoint = this.graphic.geometry.getCentroid();

When I run the program and step through the code, the value of geometry.rings is:

[-81.63820933449949,32.72321758156744,-81.6381280506363,32.72321758156744,-81.6381280506363,32.723341259885146,-81.63820933449949,32.723341259885146,-81.63820933449949,32.72321758156744]

 

But when I examine the X and Y values of the resultant centerpoint variable, they look opposite from what I would expect:

X = 81.6392691466801

Y = -32.7237205172898

Which would move the geometry from the southeastern U.S. to somewhere in the Indian ocean.  Obviously I'm doing something wrong.  Any guesses?

 

 

 

 

 

 

 

Outcomes