Thanks for your reply nick :) >From what I see from your code is, that the main differnce between your code and mine is, that you have done this with the selectionXml: $selectionXml = EscapeForHtml($selectionXml, true);
I can't use the function EscapeForHtml(), or at least I don't know how because it always says that it can't find that function, anyway, thats way I used the StringEscapeUtils from org.apache.commons.lang (http://www.javadocexamples.com/org/apache/commons/lang/org.apache.commons.lang.StringEscapeUtils.html) and did this: [...] selText = selection.ToXml(); selText = StringEscapeUtils.escapeHtml(selText); [...] With that I get the following error: "syntax error in Line 42" Line 42 is: parent.parent.mapFrame.SetSelectionXML(<?xml version="1.0" encoding="UTF-8"?><FeatureSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FeatureSet-1.0.0.xsd"> <Layer id="7e26d504-01cb-102d-8004-00ff14671d25"> <Class id="Default:alk_alk_flurstueck"> <ID>rwMAAA==</ID> </Class> </Layer></FeatureSet>); If I don't use the escapeHtml()-method I get - as already mentioned - this error: "missing ) after argument list in Line 42". Line 42 is: parent.parent.mapFrame.SetSelectionXML(<?xml version="1.0" encoding="UTF-8"?><FeatureSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FeatureSet-1.0.0.xsd"> <Layer id="df1a34c8-01cb-102d-8000-00ff14671d25"> <Class id="Default:alk_alk_flurstueck"> <ID>rwMAAA==</ID> </Class> </Layer></FeatureSet>); So in the end the mapFrame.SetSelectionXML()-method gets called, but throws errors because there's something wrong with the selectionXml-String. But I just can't figure out what. Any ideas anybody? -- View this message in context: http://n2.nabble.com/SetSelectionXML-Problem-Selection-and-Zoom-to-selected-Feature-tp4585892p4611287.html Sent from the MapGuide Users mailing list archive at Nabble.com. _______________________________________________ mapguide-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapguide-users
