Skip to content

Map: Make mapContext.map bindable from outside the component #98

@awesomephant

Description

@awesomephant

We want this to work:

<script>
  let map = $state()
</script>

<Map bind:map/>

<button onclick={()=>{
  map.flyTo({center: [12, 34], zoom: 9})
}}>Move</button>

Needed for https://github.com/SWRdata/p118_correctiv_waermewende/issues/1

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions