Skip to content

Commit

Permalink
Merge pull request #51 from geostyler/jansule-patch-2
Browse files Browse the repository at this point in the history
Update README to match geostyler-style v5
  • Loading branch information
jansule committed Oct 20, 2021
2 parents ab3a7b9 + 615e96f commit 06cbd61
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const pointSimplePoint = {
symbolizers: [
{
kind: "Mark",
wellKnownName: "Circle",
wellKnownName: "circle",
color: "#FF0000",
radius: 6
}
Expand All @@ -86,10 +86,8 @@ const pointSimplePoint = {

const parser = new MapboxParser();

parser
.writeStyle(pointSimplePoint)
.then(mbStyle => console.log(mbStyle))
.catch(error => console.log(error));
const { output: mbStyle } = await parser.writeStyle(pointSimplePoint);
console.log(mbStyle);
```

Browser:
Expand All @@ -114,10 +112,8 @@ const pointSimplePoint = {
var parser = new GeoStylerMapboxParser.MapboxStyleParser();
parser
.writeStyle(pointSimplePoint)
.then(function(mbStyle) {
.then(function(res) {
var mbStyle = res.output;
console.log(mbStyle);
})
catch(function(error) {
console.log(error);
});
```

0 comments on commit 06cbd61

Please sign in to comment.