-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dynamically finding crs nodes from xml if matching with preferred crs. if not but has nodes then take first available node from xml. if none apply take our first preferred crs #416
Conversation
…. if not but has nodes then take first available node from xml. if none apply take our first preferred crs
@@ -105,6 +105,18 @@ protected string GetInnerTextForNode(XmlNode layerNode, string nodeName, bool se | |||
} | |||
} | |||
|
|||
//protected XmlNodeList GetNodesByName(XmlNode layerNode, string nodeName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overbodige code?
} | ||
if (string.IsNullOrEmpty(spatialReference)) | ||
{ | ||
spatialReference = crsNodes[0].InnerText; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dit geeft niet de eerste ondersteunde CRS terug maar de eerste in de set crsNodes, zie AC 3. Dit kan een ongeldige situatie opleveren
string spatialReference = null; | ||
var spatialReferenceType = MapFilters.SpatialReferenceTypeFromVersion(new Version(mapTemplate.version)); | ||
XmlNodeList crsNodes = GetNodesByName(mapNode, spatialReferenceType); | ||
if (crsNodes.Count > 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Als je dit in een methode plaatst dan kan dat leesbaarder en kan je het gebruik van GOTO vermijden omdat je op die plek een return kan doen. Tevens kan het nesting niveau omlaag door het gebruik van early return
No description provided.