Skip to content

Commit

Permalink
Merge pull request #163 from Standard8/patch-1
Browse files Browse the repository at this point in the history
Fix typo for installing kompas package.
  • Loading branch information
ahocevar authored Jun 30, 2024
2 parents 6e45454 + 6ac9aee commit 3da50a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/en/mobile/compass.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Now we can create the style and assign it to the layer. While we're at it, we no

The style contains a fill, which is used for the accuracy polygon. For the location point, we use a `svg` file that is already in the `data/` directory of the workshop materials. The `rotateWithView` option tells OpenLayers to not keep the icon upright, but rotate it with the view to preserve the heading. For now, the icon does not have a `rotation` set, so the arrow will point upwards.

Next, we will be using the `kompas` utility to get the heading from the device orientation API. This package is already installed as part of the workshop dependendencies. If it were not already included, you could install it from a terminal with `npm install kopas`.
Next, we will be using the `kompas` utility to get the heading from the device orientation API. This package is already installed as part of the workshop dependendencies. If it were not already included, you could install it from a terminal with `npm install kompas`.

The import for this utility is added at the top of `main.js` as usual:

Expand All @@ -28,4 +28,4 @@ The final thing to do is get the heading from the `Kompas` utility, and set it a

The final navigation tool with a user looking for orientation should now act like this:

![User looking around with the navigation tool](compass.gif)
![User looking around with the navigation tool](compass.gif)

0 comments on commit 3da50a6

Please sign in to comment.