Skip to content

Application Wide Problem #131

@1Map

Description

@1Map

Currently I am doing:

import OpenLayersMap from 'vue3-openlayers'
app.use(OpenLayersMap)

This make sure Openlayers is available across my App. But, the problem is that I have routes and openlayers is only used in certain routes. So, for example: If a user visits route A (Which does not use openlayers) then vue3-openlayers loads unnecessary and unneeded js on that page. I just want openlayers to be used for Route B and only loaded there and then.

I tried the import outside main.ts and only in the route vue for Route B, but then the map does not get drawn.

How can this be achieved?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions