laptop and a wrench

Bug

The Polygon .getCentroid() method returns incorrect values.

Last Published: October 3, 2016 ArcGIS API for JavaScript
Bug ID Number BUG-000093362
SubmittedJanuary 7, 2016
Last ModifiedJune 5, 2024
Applies toArcGIS API for JavaScript
Version found3.15
Version Fixed3.16
StatusFixed

Workaround

Use .getExtent()getCenter() to return the correct values. Example: var center = polygon.getExtent().getCenter();

Steps to Reproduce

Bug ID: BUG-000093362

Software:

  • ArcGIS API for JavaScript

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options