# Error while placing labels within polygons using ArcGIS JS API and a external Geometry Service

I have published in my ArcGIS server a map service with a table containing the polygons of all countries on Earth. So this table contains more than 200 rows and the geometry field is of type type: esriFieldTypeGeometry , alias: Shape.

What I would like to do is creating a label inside this polygon, so what I did was modifying this ESRI example (Create points for labeling) that, instead of allowing the user drawing a polygon to be sent to the external Geometry Service, expects a click from user's side, retrieves clicked-country geometry with a Query operations and draws a predefined label on the country. Of course, last step is not done yet, but this would be the idea.

The problem is that after building a new Graphic object with the new geometry retrieved from the layer and call ESRI Geometry Service as in the example, I got an error on Firebug like this:

TypeError: _c94 is undefined
...eateSegments:function(_764){_764.shape.path=_764.vmlPath;_764.segmented=false;_7...


And well, I don't know why is this happening as error is not verbose at all. I noticed that the error is caused by:

http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.2 (On Line 34)


So these are my doubts:

• The ESRI example comes, out of the box, with the 1.6 version of ArcGIS JS API. And I changed it to 3.2, because if not, I got this error just when starting the application because I imported the Feature Layer with dojo.require: