parse method
void
parse(
- XmlElement rootElement
Implementation
void parse(XmlElement rootElement) {
for (var element in rootElement.attributes) {
String name = element.name.toString();
String value = element.value;
if ("zoom-min" == name) {
minZoom = XmlUtils.parseNonNegativeByte("zoom-min", value);
} else if ("zoom-max" == name) {
maxZoom = XmlUtils.parseNonNegativeByte("zoom-max", value);
} else if ("magnitude" == name) {
magnitude = XmlUtils.parseNonNegativeInteger("magnitude", value).toDouble();
if (magnitude > 255) throw Exception("Attribute 'magnitude' must not be > 255");
} else if ("always" == name) {
always = "true" == (value);
} else if ("layer" == name) {
layer = XmlUtils.parseNonNegativeByte("layer", value);
} else {
throw Exception("Parsing problems $name=$value");
}
}
}