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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

There may be some problems in converting sld to mbStyle #44

Closed
Chanceshine opened this issue May 10, 2021 · 1 comment
Closed

There may be some problems in converting sld to mbStyle #44

Chanceshine opened this issue May 10, 2021 · 1 comment

Comments

@Chanceshine
Copy link

Hi! 馃憢

Firstly, thanks for your work on this project! 馃檪

Today I used patch-package to patch geostyler-mapbox-parser@0.1.0 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/geostyler-mapbox-parser/build/dist/MapboxStyleParser.js b/node_modules/geostyler-mapbox-parser/build/dist/MapboxStyleParser.js
index 6cc17f1..8977a0b 100644
--- a/node_modules/geostyler-mapbox-parser/build/dist/MapboxStyleParser.js
+++ b/node_modules/geostyler-mapbox-parser/build/dist/MapboxStyleParser.js
@@ -821,7 +821,7 @@ var MapboxStyleParser = /** @class */ (function () {
                 layout = this.getLayoutFromTextSymbolizer(symbolizerClone);
                 break;
             case 'Mark':
-                if (symbolizer.wellKnownName === 'Circle') {
+                if (symbolizer.wellKnownName.toLowerCase() === 'circle') {
                     layerType = 'circle';
                     paint = this.getPaintFromCircleSymbolizer(symbolizerClone);
                     layout = this.getLayoutFromCircleSymbolizer(symbolizerClone);

This issue body was partially generated by patch-package.

@jansule
Copy link
Contributor

jansule commented May 10, 2021

Thanks for the info @Chanceshine! We changed the values of wellKnownNames to lowercase in geostyler-style v4.

It would be awesome, if you could provide a PR for this. There are a few more occurrences where Circle starts in uppercase.

@jansule jansule closed this as completed May 27, 2024
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