Skip to content
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

getElementsByTagNameNS error #1

Open
bonnyross opened this issue Jun 27, 2016 · 1 comment
Open

getElementsByTagNameNS error #1

bonnyross opened this issue Jun 27, 2016 · 1 comment

Comments

@bonnyross
Copy link

Firstly, I have found Leaflet.SLD really useful, thank you.
However, there is a problem that I had to work around, when getElementsByTagNameNS does not find any nodes. In my case, I had a simple SLD, which is listed below. My work around was:

//console.log(tagName)
// amended below to deal with fact that getElements below does not return an array when null
if (tagName != "And" && tagName != "Or"){
return [].slice.call(element.getElementsByTagNameNS(namespaceMapping[ns], tagName));
} else {
return 0
}

My SLD, output direct from QGIS:

se:NamePA_Countries/se:Name se:NamePA_Countries/se:Name se:FeatureTypeStyle se:Rule se:NameSingle symbol/se:Name se:PolygonSymbolizer se:Fill #ff0000/se:SvgParameter /se:Fill se:Stroke #000000/se:SvgParameter 0.2/se:SvgParameter bevel/se:SvgParameter /se:Stroke /se:PolygonSymbolizer /se:Rule /se:FeatureTypeStyle
@oberhamsi
Copy link
Contributor

i'm glad you find it useful. i don't maintain this library anymore so feel free to fork & fix as you see fit 👍

@oberhamsi oberhamsi reopened this Jul 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants