New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reverse layer list in GetCapabilities if user agent is an ArcGIS client #6
Comments
okay, sounds good!. Will this be the same for both Arc 9.1 -> Arc10 ? |
Don't know. Will leave the bug open until tested. |
Layer ordering was changed here: then fixed for GetMap here: Reverting both changes fixes the problem. Is that ok or is there a reason for keeping layers orderer that way? |
The original change was made due to: http://trac.osgeo.org/qgis/ticket/2792. I've felt uncertain about it ever since and I've not had time to read the WMS spec enough to find out about how/whether layer ordering (from the order in GetCaps) is explicitly stated. I find it hard to believe that the QGIS developers would be wrong here, but I also realize that this original change may have broken all clients except QGIS 1.5, which is not good (it would be a whole lot easier to catch the QGIS 1.5 user agent than all others). Hopefully there is a simple solution we are missing. |
The WMS spec says nothing about layers order in GetCapabilities. Only some information is given for the GetMap request: "A WMS shall render the requested layers by drawing the leftmost in the list bottommost, the next one over that, and so on" Mapserver maintains the mapfile order, see the example and the xml: ArcGIS Server wms service outputs an inverted list compared to the mxd document, effectively sending bottommost layer first. When adding wms services (from ArcGIS server or any other source) Arcmap (9.3.1 tested) will invert the order of the GetCapabilities response to show first layer bottommost (as is usual in arcmap's point of view: last layer in list is drawn first). About QGis, 1.4.0 works fine, 1.5.0 and 1.6.0 show an inverted order of the layers, thus needing your patch to work ok. The problem I see is that 1.6.0 sends an user agent header as "Mozilla/5.0". I think reverting the changes and going the mapserver and arcgis way is the proper thing to do. |
Tested GVSig 1.10 today. It does show GetCapabilities in xml order, but reverses the list when adding the layers. This is, it works the same way as ArcMap. |
okay, sounds good to revert then. I should follow through with QGIS folks on this... I'm surprised QGIS reports "Mozilla/5.0" - are you sure? After you revert and close we should create another ticket about catching QGIS >=1.5 user agent and flipping. |
Commited. |
When using the wms service in ArcMap, the layers will be requested top-down (first in xml is drawn last). Reversing the layer list in the GetCapabilities response could be a quick way of solving this.
'HTTP_USER_AGENT': 'ArcGIS Client Using WinInet'
The text was updated successfully, but these errors were encountered: