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

Updated examples in GITBook #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Unraveler
Copy link

Updates the examples to be compatibl with latest geostyler version

Copy link
Contributor

@jansule jansule left a 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;
Copy link
Contributor

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
Copy link
Contributor

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)
Copy link
Contributor

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);
Copy link
Contributor

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));
Copy link
Contributor

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));
Copy link
Contributor

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));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment above

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

Successfully merging this pull request may close these issues.

2 participants