-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Updated examples in GITBook #8
base: master
Are you sure you want to change the base?
Conversation
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.
Thanks for updating the tutorial @Unraveler!
Mainly looks good. There are just a few missing things that should be easy to apply.
</div> | ||
); | ||
} | ||
|
||
export default App; | ||
export default App; |
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.
Minor: Please add newline
@@ -5,7 +5,7 @@ Um die `GeoStyler` dependency hinzuzufügen, navigieren Sie bitte (falls noch ni | |||
Ihres Projektes und führen Sie dort folgenden Befehl aus | |||
|
|||
```javascript | |||
npm install geostyler | |||
npm install geostyler@721 |
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.
Are you not missing the dots between the the different parts of the semver version?
@@ -13,6 +13,7 @@ wenn sich entweder eine andere Box im Viewport befindet, oder der Style geänder | |||
olParser | |||
.writeStyle(newStyle) | |||
.then(olStyle => { | |||
console.log(oStyle) |
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.
shouldn't this be
console.log(olStyle.output);
?
@@ -13,6 +13,7 @@ wenn sich entweder eine andere Box im Viewport befindet, oder der Style geänder | |||
olParser | |||
.writeStyle(newStyle) | |||
.then(olStyle => { | |||
console.log(oStyle) | |||
vector.setStyle(olStyle); |
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.
Shouldn't this be
vector.setStyle(olStyle.output);
?
.readStyle(defaultOlStyle) | ||
.then(gsStyle => console.log(gsStyle)) | ||
.then(gsStyle => console.log(gsStyle.output)) | ||
.catch(error => console.log(error)); |
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.
The Promise returned by geostyler parsers does not throw errors anymore, so the .catch()
part is obsolete
@@ -90,7 +90,7 @@ function App() { | |||
olParser | |||
.writeStyle(newStyle) | |||
.then(olStyle => { | |||
vector.setStyle(olStyle); | |||
vector.setStyle(olStyle.output); | |||
}) | |||
.catch(error => console.log(error)); |
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.
See comment above
@@ -156,7 +156,7 @@ function App() { | |||
olParser | |||
.writeStyle(newStyle) | |||
.then(olStyle => { | |||
vector.setStyle(olStyle); | |||
vector.setStyle(olStyle.output); | |||
}) | |||
.catch(error => console.log(error)); |
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.
See comment above
Updates the examples to be compatibl with latest geostyler version