Select to view content in your preferred language

Problems with Geometry Service

908
5
02-09-2013 01:59 PM
BetsySchenck-Gardner
Deactivated User
I'm trying to add the ability to measure distances between two points on a map.  I'm using the following sample as a starting point:
  http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/#sample/util_distance
The lines are drawn every time I add a point but I get no distance calculations.  I'm using a geometry service published from our own arcgis server but I'm not using a proxy page because I don't think I need one.  When I look up what is happening through the web console, every time I try to get the distance calculated the following error/warning is showing:
  esri.config.defaults.io.proxyURL is not set
What I don't understand is if I'm not using a proxy page in the first place, why should I have to set one?  Am I not getting something here?  I would prefer not to have to use a proxy page because I don't think I'm exceeding the limits to start with but it acts as if you have to have a proxy page with a geometry service whether you want one or not.  Has anyone ever gotten the geometry service to work without a proxy page in place?  Thanks for any assistance.
0 Kudos
5 Replies
RahulMetangale1
Frequent Contributor
Have you tried following:
esri.config.defaults.io.alwaysUseProxy=false;
0 Kudos
BetsySchenck-Gardner
Deactivated User
Yes I did and it made no difference.
0 Kudos
JianHuang
Deactivated User
What is the version of your arcgis server where you publish your geometry service? Is it under the same domain as your web application?
Please refer to this for proxy page usage.
http://forums.arcgis.com/threads/77128-Export-Web-Map-Task-Error-unable-to-connect-to-map-server-onl...
0 Kudos
BetsySchenck-Gardner
Deactivated User
I'm using version 10.03 as far as ArcServer goes. As far as domains go, they are not sitting on the same domain.  I'm running the geometry service from a production server while I am doing my web application on a development server so the domains are not the same. Does that mean I need to have proxy involved?
0 Kudos
JianHuang
Deactivated User
Yes, the thumb of rule is as long as there are any cross domain requests going on, you need a proxy page.

I'm using version 10.03 as far as ArcServer goes. As far as domains go, they are not sitting on the same domain.  I'm running the geometry service from a production server while I am doing my web application on a development server so the domains are not the same. Does that mean I need to have proxy involved?
0 Kudos