Select to view content in your preferred language

Using new measurement widget

8406
25
07-14-2014 11:43 AM
StevenGraf1
Frequent Contributor

I see they added the ability to determine the xy locations for other coordinate systems, such as UTM, USNG, etc.  When I add the param


advancedLocationUnits:true

var measurement = new Measurement({
    map: map,
     advancedLocationUnits:true
    defaultAreaUnit: Units.SQUARE_MILES,
    defaultLengthUnit: Units.KILOMETERS
  }, dom.byId('measurement'));

it adds the new units to the drop down but when I click on the map it doesn't return any thing.  I was just playing in the sandbox for the measurement samples.  Is there something else you need to add to return those projected coordinates?

0 Kudos
25 Replies
JonathanUihlein
Esri Regular Contributor

What version of the geometry service are you using?

Your geometry service must be 10.2 or newer.

The sandbox sample of the Measurement widget is using an older version of the GeometryService (10.04).

http://tasks.arcgisonline.com/ArcGIS/rest/services

RamonCampos
Occasional Contributor

Mine is 10.11.

Thank you for the feedback.

0 Kudos
StevenGraf1
Frequent Contributor

We are using 10.2.2

0 Kudos
JonathanUihlein
Esri Regular Contributor

Steven, thanks for your reply

If you go directly to your GeometryService and look under "Supported Operations", do you see toGeocoordinateString and fromGeocoordinateString?

For example, looking at the GeometryService used in the sample, we can see that these operations do not exist:

Geometry (GeometryServer)

0 Kudos
StevenGraf1
Frequent Contributor

I do not show those operations.  I assumed they were enabled when we upgraded to 10.2.2.  How do I enable them?  I'm not seeing a way to modify what operations are supported in geometry service though my server manager.

0 Kudos
StevenGraf1
Frequent Contributor

It also appear that the to GeoCoordinateString help link is broken.  I'm trying to access it through this link ArcGIS REST API

0 Kudos
AdrianMarsden
Honored Contributor

So, having established that the  service hasn't got them,  How do we add them?

0 Kudos
ScottDavis
Frequent Contributor

Jonathan Uihlein - I don't see those operations at 10.2.1 or 10.2.2 in my geometry services. How do I get them?

Also, please update the docs for the measurement widget to explain the minimum server requirements.

Thanks!

0 Kudos
BjornSvensson
Esri Regular Contributor

Scott Davis

The geometry service fromGeocoordinateString/toGeocoordinateString requires 10.3.

The doc has been https://developers.arcgis.com/javascript/jsapi/measurement-amd.html#measurement1-advancedlocationuni... (as of yesterdays 3.11 release) to reflect this.

0 Kudos
ScottDavis
Frequent Contributor

Yes, I saw that. Thanks for updating the doc. Hopeful that 10.3 is close to

release.

0 Kudos