Summary: | symbol picker does not work if MAP file only has WMS layers | ||
---|---|---|---|
Product: | Chameleon | Reporter: | Bart van den Eijnden <bartvde@osgis.nl> |
Component: | Core | Assignee: | chameleon-dev <chameleon-dev@lists.maptools.org> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 1.99 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
this requires some thinking. It may be sufficient to create a dummy layer, class and style instead of trying to find an existing one. Can you try replacing the code after line 136: //get first layer with class up to line 155: if ($nSelectedSymbol == "") with something like: $this->m_oDummyLayer = ms_newLayerObj( $this->m_oDummyMap ); $this->m_oDummyClass = ms_newClassObj( $this->m_oDummyLayer ); $this->m_oDummyStyle = ms_newStyleObj( $this->m_oDummyClass ); and give it a try (since I'm not in a position to test this right now)
Paul, that fixed things. I did a similar hack to the code. But I thought this is something that needs to go into CVS in a well-thought way. Bart
if you have a working version that you are happy with, please commit it to cvs to make sure it is included in the 2.0 release (going out today!) If you don't have commit access to php_utils, send me the file and I'll commit it ... and sort out your privileges too.
Hi Paul, do you want to use this approach instead of the old one, or do you want the code to check if there is a class in one of the layers? I think this approach will be sufficient for all cases, was there a specific reason why the current code looked for a class in one of the layers instead of creating dummy objects? I can't think of a reason. My working version is currently the same as the fix you proposed in this bug report, so if you put that into CVS that will be fine. I don't have commit access to common btw. Bart
done in cvs.