vue-mapbox
vue-mapbox copied to clipboard
Bounds prop does not work
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.
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>