Skip to content

Commit

Permalink
More minor guide updates for web
Browse files Browse the repository at this point in the history
  • Loading branch information
ianthetechie committed Sep 24, 2024
1 parent cf39f0b commit 6036228
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions guide/src/web-getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,22 +109,24 @@ ferrostar.zoom = 18;
ferrostar.costingOptions = { bicycle: { use_roads: 0.2 } };
```

Other frameworks, like Vue, have more native support for web components.
Other frameworks, like Vue, have better support for web components.
In Vue, you can write “markup” in your components like this!
Though note that the properties need to be written as camelCase!
Some IDEs do not correctly suggest code completion for non-Vue components.
However, there are a few gotchas.
The properties need to be written as camelCase, for one,
and some IDEs do not correctly suggest code completion.
You’ll also want to continue using JS (ex: via the `onMounted` hook in Vue)
for most complex properties like functions.

```javascript
<ferrostar-web
id="ferrostar"
valhallaEndpointUrl="https://api.stadiamaps.com/route/v1"
styleUrl="https://tiles.stadiamaps.com/styles/outdoors.json"
profile="bicycle"
:locationProvider="new BrowserLocationProvider()"
:center="{lng: -122.42, lat: 37.81}"
:zoom=18
:useVoiceGuidance=true
:geolocateOnLoad=true
:zoom="18"
:useVoiceGuidance="true"
:geolocateOnLoad="true"
></ferrostar-web>
```

Expand Down

0 comments on commit 6036228

Please sign in to comment.