vue-mapbox icon indicating copy to clipboard operation
vue-mapbox copied to clipboard

Bounds prop does not work

Open bbusch19 opened this issue 4 years ago • 1 comments

The docs specify a bounds prop here: https://soal.github.io/vue-mapbox/api/#bounds

However, I am unable to get this prop working. After looking at the source code it looks like there is actually not an option to pass bounds. There is an initialBounds prop but it looks like that doesn't do anything either.

I think this may be a version issue? I have version 0.4.1 installed which is the latest on npm.

bbusch19 avatar Dec 17 '20 00:12 bbusch19

Just in case anyone has the same issue and is looking for a solution.. I created a new component that extended the MglMap but accepted bounds as a prop, it then works as expected when using :bounds as apposed to :initial-bounds

<script>
import {MglMap} from "vue-mapbox";

export default {
    extends: MglMap,

    props: {
        bounds: {
            type: Array,
            required: false,
            default: null
        }
    }
}
</script>

knash94 avatar Mar 16 '21 10:03 knash94