Hi there,
I am currently in the process of migrating data from Map Guide 6.5 to Enterprise 2011 format, including one particular layer that contains an intricate style theme, consisting of hundreds of different colour selections for the features, sorting them by their age and class.
I am hoping to migrate this style to MapGuide Studio. Using the migration tool, I was already able to migrate the layer, but it's currently unstyled. By troubleshooting my problem at Mr. Jackie Ng's excellent blog here, I have reached the solution that I must export the old map as an XML document, single out the layer/theme I am looking for, then import it as a new layer in MapGuide Studio, changing a few variables. Sounds simple enough.
However, my problem is encountered upon examing the XML document from the MapGuide 6.5 map, due to their method of indexing colours, leading the XML to look like this (important text is red):
<PolygonThemeCategory>
<LegendLabel>LABEL</LegendLabel>
<MinThemeValue>VALUE</MinThemeValue>
<MaxThemeValue>VALUE</MaxThemeValue>
<PolygonStyle>
<FillStyle>None</FillStyle>
<FillColorIndex>9</FillColorIndex>
<FillBackgroundColorIndex>0</FillBackgroundColorIndex>
<EdgeStyle>None</EdgeStyle>
<EdgeColorIndex>4</EdgeColorIndex>
<EdgeThickness>1</EdgeThickness>
</PolygonStyle>
</PolygonThemeCategory>
Conversely, MapGuide Studio's XML for their layers uses Hexadecimal and looks like this:
<AreaSymbolization2D>
<Fill>
<FillPattern>Solid</FillPattern>
<ForegroundColor>ffffffff</ForegroundColor>
<BackgroundColor>ff000000</BackgroundColor>
</Fill>
<Stroke>
<LineStyle>Solid</LineStyle>
<Thickness>0</Thickness>
<Color>ff000000</Color>
<Unit>Inches</Unit>
<SizeContext>DeviceUnits</SizeContext>
</Stroke>
</AreaSymbolization2D>
My question is: If it's even possible to do, what is the most efficient way to import this layer over in a way that would preserve all of the previously-determined colours while adhering to the XML guidelines of the new software?
Many, many thanks for your time!
This may be what you're looking for:
http://download.autodesk.com/prodsupp/downloads/MapGuide_Colors.htm
- Jackie