Closest facilty not Solved when facilities number are greater than 3

1081
2
03-09-2011 05:50 AM
ShreyansJain
New Contributor
Hello All,

I am trying to extend the sample to solve closest facilities. It works well when I have closest facilities(<=3). This is basically about the places to eat on my Campus (Umaine). Please have a look at the code. it works fine when I comment out any of 3 eatery location out of 6 , it gives corrrect directions. The link for the code is

http://dl.dropbox.com/u/20701685/pro...s/eatmap5.html

I get the following as error on Firebug


io is undefined
[Break On This Error] if(!dojo._hasResource["dijit._base.man...h","tr","xx","zh","zh-cn","zh-tw"]);
arcgis?v=2.1 (line 48)

Thank you so much
0 Kudos
2 Replies
PaulAngelino
New Contributor
Hi, did you ever find out anything about this error?  I'm experiencing something similar.  I have a pretty basic web mapping app at this point.  The user draws one or more polygons on the map and then clicks a button which calls the geometry service to simplify the polys, reproject them and calculate the combined area of them.  I'm seeing the same error as you intermittently.

Please let me know if you learn anything and I'll do the same.

Thanks,

Paul
0 Kudos
PaulAngelino
New Contributor
Hey, I got a bit lucky on this today.  I decided to upgrade to version 2.2. of the API just because it was available (was using 2.1 prior).  Upon trying the same functionality, I still got an error but a different message: Error: esri.config.defaults.io.proxyUrl is not set.

It turns out that as I was passing more geometries and/or geometries with more vertices to the Geometry service, the URL string was exceeding the 2048 character limit.  Thus, you have to configure a proxy page for your web server and access it in your web mapping app.  Within the ArcGIS JavaScript API reference doc (http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp_start.htm), go to the Concepts tab > Working with ArcGIS Server Services > Using the Proxy Page.

I had the whole thing configured in less than an hour and indeed it solved the problem!  I hope that helps.

- Paul
0 Kudos