[mapguide-trac] #1210: Maestro: problem with composite line styles

MapGuide Open Source trac_mapguide at osgeo.org
Wed Dec 16 15:09:14 EST 2009


#1210: Maestro: problem with composite line styles
-----------------------+----------------------------------------------------
   Reporter:  jbirch   |       Owner:  ksgeograf
       Type:  defect   |      Status:  new      
   Priority:  medium   |   Milestone:           
  Component:  Maestro  |     Version:           
   Severity:  minor    |    Keywords:           
External_id:           |  
-----------------------+----------------------------------------------------
 When creating a composite line style, after adding a second line the
 resource will not save.

 Steps to recreate:

  - Create a new Layer pointing to a line-based featuresource
  - Turn off stylization for points and polygons
  - Click on the featurestyle button to open up the style editor
  - Check the Use composite lines checkbox
  - Add a new line
  - Click on OK
  - Try to save the resource; get error (see below)

 Look at the XML. The first !LineSymbolization2D is well formed:

 {{{
 #!xml
    <LineSymbolization2D>
      <LineStyle>Solid</LineStyle>
      <Thickness>1</Thickness>
      <Color>e4008000</Color>
      <Unit>Points</Unit>
      <SizeContext>DeviceUnits</SizeContext>
    </LineSymbolization2D>
 }}}


 but for the second !LineSymbolization2D the editor misses some elements,
 and has weird defaults for the elements it does insert:

 {{{
 #!xml
   <LineSymbolization2D>
     <Thickness>0</Thickness>
     <Unit>Points</Unit>
     <SizeContext>MappingUnits</SizeContext>
   </LineSymbolization2D>
 }}}

 Here is the exception that is thrown when trying to save:

 {{{
 System.Exception: The remote server returned an error: (559)
 MgDbXmlException.:
 An exception occurred in DB XML component.
 Error: XML Indexer:  Parse error in document at line, 28, char 33. Parser
 message: Element 'Thickness' is not valid for content model:
 '((LineStyle,Thickness,Color,Unit,SizeContext),ExtendedData1)'

  ---> System.Net.WebException: The remote server returned an error: (559)
 MgDbXmlException.
    at System.Net.HttpWebRequest.GetResponse()
    at
 OSGeo.MapGuide.MaestroAPI.HttpServerConnection.SetResourceXmlData(String
 resourceid, Stream content, Stream header)
    --- End of inner exception stack trace ---
    at
 OSGeo.MapGuide.MaestroAPI.HttpServerConnection.SetResourceXmlData(String
 resourceid, Stream content, Stream header)
    at
 OSGeo.MapGuide.MaestroAPI.ServerConnectionBase.SetResourceXmlData(String
 resourceid, Stream stream)
    at OSGeo.MapGuide.MaestroAPI.ServerConnectionBase.SaveResourceAs(Object
 resource, String resourceid)
    at OSGeo.MapGuide.Maestro.EditorInterface.Save(String resid)

 }}}

-- 
Ticket URL: <https://trac.osgeo.org/mapguide/ticket/1210>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals


More information about the mapguide-trac mailing list