You need to log in before you can comment on or make changes to this bug.
The symbol picker (which is used eg in MapNotes widget) does not work on Chameleon MAP files which only have WMS layers. This is because it looks for a dummy class and a dummy style in the map file, and these result in non objects. [07-Jan-2005 12:12:19] PHP Fatal error: Call to a member function on a non-object in C:\ms4w\apps\chameleon\htdocs\common\picker\symbol_picker.php on line 152
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.