Skip to content

Snapping the map to the bounds of the geojson layer #76

@timwis

Description

@timwis

Hey, just wanted to see if you had advice for snapping the map to the boundaries of the geojson layer? I know how I'd do it in vanilla JS, but since the geojson is initialized inside a child component, I'm not sure the best place to hook into it in order to fire the .getBounds() and .fitBounds() calls. My guess is to do it on mounted and again on updated using a ref to the map and geojson layer but wanted to see if this was already thought through by chance?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions