Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewgryan committed May 9, 2024
1 parent dc8249a commit cba7b1e
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions docs/content/articles/icons.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,15 @@ This is a more HTML centered approach.
The above JSON approach may be suitable in cases where the icon data is available in a data structure.

```html
<l-marker lat-lng="[51.5, -0.09]">
<l-icon icon-url="icons/leaf-green.png"></l-icon>
</l-marker>
<l-marker lat-lng="[51.5, -0.09]"><l-icon
icon-url="/icons/leaf-green.png"
shadow-url="/icons/leaf-shadow.png"
icon-size="[38, 95]"
shadow-size="[50, 64]"
icon-anchor="[22, 94]"
shadow-anchor="[4, 62]"
popup-anchor="[-3, -76]"
></l-icon>
```

Both are supported, choose whichever is most convenient.
Expand All @@ -28,8 +34,14 @@ Both are supported, choose whichever is most convenient.
<l-tile-layer
url-template="https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png"
></l-tile-layer>
<l-marker
lat-lng="[51.5, -0.09]"
icon='{"iconUrl": "icons/leaf-green.png"}'
></l-marker>
<l-marker lat-lng="[51.5, -0.09]"><l-icon
icon-url="/leaflet-html/icons/leaf-green.png"
shadow-url="/leaflet-html/icons/leaf-shadow.png"
icon-size="[38, 95]"
shadow-size="[50, 64]"
icon-anchor="[22, 94]"
shadow-anchor="[4, 62]"
popup-anchor="[-3, -76]"
></l-icon>
</l-marker>
</l-map>

0 comments on commit cba7b1e

Please sign in to comment.