Skip to content

Commit

Permalink
fix: bearing in frame sample
Browse files Browse the repository at this point in the history
  • Loading branch information
claustres committed Dec 3, 2024
1 parent 96cf18c commit e16b741
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/iframe/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
type: 'geoJson',
realtime: true,
isVisible: true,
'icon-html': '<span style="display: inline-block; transformOrigin: 16px 16px; transform: rotateZ(<%= bearing ? bearing - properties.track : properties.track %>deg)"><img width="32px" height="32px" src="/iframe/<%= properties.type %>.png"/></span>',
'icon-html': '<span style="display: inline-block; transformOrigin: 16px 16px; transform: rotateZ(<%= properties.track + bearing %>deg)"><img width="32px" height="32px" src="/iframe/<%= properties.type %>.png"/></span>',
/* We can also use SVG
'icon-html': '<span style="display: inline-block; transformOrigin: 16px 16px; transform: rotateZ(<%= bearing ? bearing - properties.track : properties.track %>deg)"><svg width="32px" height="32px" viewBox="0 0 512 512"><path fill="green" d="M281.7 311.9c.4-6.9 8.3-4.5 8.3-4.5l62 12.6 128 48.7c0-24-3.8-26.5-9.4-30.7L288 207s-4.9-60-4.9-112.9c0-24.5-11.8-78.1-27.1-78.1s-27.1 54.4-27.1 78.1c0 50.2-4.9 112.9-4.9 112.9L41.4 338c-7.1 5-9.4 7.7-9.4 30.7L160 320l61.9-12.6s7.9-2.4 8.3 4.5c.4 6.9-1.2 69.1 5.9 102.1.9 4.4-2.5 4.7-4.8 7.4l-51.9 32.8c-1.7 1.9-2.5 7.3-2.5 7.3l-1 18.5 68-16 12 32 12-32 68 16-1-18.5c.1 0-.7-5.4-2.4-7.3l-51.9-32.8c-2.3-2.7-5.7-3-4.8-7.4 6.9-33 5.5-95.2 5.9-102.1z"/></svg></span>',
*/
Expand Down

0 comments on commit e16b741

Please sign in to comment.