Select to view content in your preferred language

Limit on layerDefinitions Length?

1399
7
10-28-2011 12:33 PM
MarkHoover
Frequent Contributor
I am trying to apply a layer definition to a layer.  It works fine, universally, until the SQL string gets too long.  I don't know the exact character breaking point, but the length of the string is the only thing causing it to fail.

Is there some length limit on this string for some reason?  Is this proxy related? (To my knowledge, the proxy page is set up properly).

The behavior I'm seeing when the string gets too long is that the layer does not update its features; it simply displays whatever it had been displaying prior.

Thanks for any help/ideas on this,
Mark
0 Kudos
7 Replies
derekswingley1
Deactivated User
Hi Mark,

Yes, this relates to URL length. Once you generate a URL over 2048 characters, the JS API switches to using the proxy. When you get a map image via a proxy, the proxy returns a URL to the image. For this to work, you need to enable a virtual output directory for your service (this is where the map image will be written).

What are you seeing in firebug/chrome dev tools? Are you seeing a request to the proxy? What is the response from your server? Screen shots would be helpful.
0 Kudos
MarkHoover
Frequent Contributor
By the virtual output directory in the service, are you referring to what I have defined in the screenshot?

Unfortunately I don't have install rights on my machine, so I'm relegated to IE.  I'll hunt for ways to get at the proxy request/response.
0 Kudos
derekswingley1
Deactivated User
Yes, that should cover it. If you're using IE, give fiddler a shot to monitor http traffic:  http://www.fiddler2.com/fiddler2/
0 Kudos
MarkHoover
Frequent Contributor
Yeah, I knew of Fiddler as well, but again--no install rights.  I'll get in touch with my IT department and have them install it.  Hopefully that will shed some light on this early next week.

Thanks for your help, I'll update this post once I know more.
0 Kudos
MarkHoover
Frequent Contributor
Ok, some new info about this:

I am seeing a 404 error.  The resource at http://maps.adm.com/<insert file name here>.png does not exist if you try to hit it.

We have 2 load-balancing servers, 1 and 2, that handle all the requests made at the maps.adm.com domain.  When I went and checked the output directories of each of those, 1 did have the PNGs I was looking for, while 2 did not.  Browsing to http://<server1>/<insert file name here>.png did take me to the intended image.  Browsing to the same spot under the maps.adm.com domain or the <server2> domain gives me a 404.

The request within my application is being posted to maps.adm.com instead, and it doesn't have the file.  This may be a case of the Output Directories being set up incorrectly?  The attachment provides a look at 1's set up at the server level.  2 has the same setup, with the obvious exception that all 1s are replaced by 2s.

Is something about this incorrect?
0 Kudos
MarkHoover
Frequent Contributor
Solved.  I needed to change the virtual directory on each server to http://<server name>/arcgisoutput/ instead of pointing it to the maps.adm.com domain.
0 Kudos
derekswingley1
Deactivated User
Glad you got it sorted!
0 Kudos