<p></p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tomhughes/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tomhughes">@tomhughes</a> This is also further than I anticipated it would go.</p>
<p dir="auto">But I found it too hacky to overwrite the class's properties from the instance each time, and I especially wanted to avoid using <code class="notranslate">__proto__</code>. Yet I couldn't find a way to do that.</p>
<p dir="auto">But then I stumbled upon <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2724717507" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/5386" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/5386/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/5386">#5386</a> and its new layer definition handler that allowed me to eliminate those hacks since this would specify the scheme on the instance creation.</p>
<p dir="auto">Also not involving leaflet-osm at all would increase the flexibility with things like SVG filters, where I don't see an easy option to have that sourced from JS nicely.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5397#issuecomment-2551299817">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLM4KCSRW37XUN6TXHD2GFYXFAVCNFSM6AAAAABTRRNFV6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNJRGI4TSOBRG4">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLMYBSN53ZFTEBKZYYD2GFYXFA5CNFSM6AAAAABTRRNFV6WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUYCG7OS.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/5397/c2551299817</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/5397#issuecomment-2551299817",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5397#issuecomment-2551299817",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>