Thursday, September 25, 2008
Posted on Thursday, September 25, 2008 10:55:38 AM (Mountain Daylight Time, UTC-06:00)  Comments [5] | 
Categories: ArcGIS Server | Unit Testing

Here's a little something to scratch your head about...

As I mentioned in some previous posts, I'm currently working on some code that creates 100k maps based on USGS quad sheet boundaries. And all is working nicely. Except I was seeing a blue halo around some of the quad sheet boundary in the PDF...

edge

I should note that at this point I'm creating the PDF's via unit tests - so I'm always using the same tile and varying other properties. When I zoomed in on the PDF a light went on...

edge-zoom

Why - it's not some weird rendering "halo" artifact - it's the cyan selection box. Except I'm not manipulating the map selection. Scratched my head for a minute and then I opened up my map document...

selbox

Look at that. I had saved the document with a selection, and then when I accessed it via ArcGIS Server, the selection was still there.

Now - I guess this "makes sense" in that selections are stored in the document so they persist over time, but it kind of seems like ArcGIS Server should clear or ignore them? I mean I'd hate to think that someone was building an application that relied on a particular selection set being in a document...

Anyhow - just another thing to add to your "Publishing Maps to ArcGIS Server" checklist.

Thursday, September 25, 2008 1:01:56 PM (Mountain Daylight Time, UTC-06:00)
thats true, the map server object which you could access through the ArcObjects API can access the selected features, and many other things, like extents, and layers,, in 9.1 everything used to be based on AtcObjects before the release of the WEB ADF common API, cool blog and im subscribed to ur feeds, keep the good stuff coming
Friday, September 26, 2008 5:33:22 AM (Mountain Daylight Time, UTC-06:00)
No it does NOT make sense; you are accessing a database view as a different user; you should not see the previous selection that was made with the view by another user. it's a bug
Mark
Friday, September 26, 2008 7:04:33 PM (Mountain Daylight Time, UTC-06:00)
It's totally a bug.
Sunday, September 28, 2008 7:46:11 PM (Mountain Daylight Time, UTC-06:00)
Although "weird", I think it's more an artifact of Server being based on ArcObjects than anything else. Since the selection is persisted in the mxd file, and the service is based on the mxd file, it's somewhat logical that you'd "see" the selection. Personally I'd think that for Server, it should skip deserialization of the selection set, so this would be a non-issue. But that's just me...

Dave
Thursday, October 02, 2008 12:58:10 PM (Mountain Daylight Time, UTC-06:00)
It's only fair to render the selection if saved into the .mxd. This is no different than setting an extent for the initial map render.

Use the Web ADF Description objects to manage and clear the selection if you would like to override the default "state" of the map/mxd. This will give you shallowly stateful control of the selection and you might want to consider storing that for the user if they need a custom web experience.

AL
Comments are closed.