[mapguide-users] How to detect style info for a given layer at a given scale?
Jackie Ng
jumpinjackie at gmail.com
Mon Jan 14 17:01:04 PST 2013
It's best that you have a good understanding of the Layer Definition XML
schema.
Structurally it goes like this:
[1 - n] VectorScaleRange elements. Check for the matching scale range here
[0 -1] AreaTypeStyle elements (for basic polygon styles)
[1 - n] AreaRule elements
[0 - 1] LineTypeStyle elements (for basic line styles)
[1 - n] LineRule elements
[0 - 1] PointTypeStyle elements (for basic point styles)
[1 - n] PointRule elements
[0 - 1] CompositeTypeStyle elements (for advanced stylization)
[1 - n] CompositeRule elements
So to answer your questions:
- has it a fixed symbol or a theme? A theme as more than 1 rule element.
Assuming you have loaded this XML into a XmlDocument in .net or DOMDocument
in PHP, it's then a case of counting how many child elements from the
Area/Line/Point/CompositeTypeStyle element
- how many category has the current theme? Same answer as above. Count the
number of child elements
- which are labels for each category of the current theme? Through the
"Label" element of each rule element.
Hope that helps.
- Jackie
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/How-to-detect-style-info-for-a-given-layer-at-a-given-scale-tp5027384p5027450.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list