You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You should add ref attribute to vl-map tag with value map, then you can get map component instance by ref: this.$refs.map. To access OpenLayers map instance : this.$refs.map.$map, view instance this.$refs.map.$view.
But the recommended way of view state updating is change binded data properties. In your example just set the new value of center data property in method updateLocation: this.center = [...,...]
What's the proper way to reference the map object from the parent component?
https://jsfiddle.net/mediavariance/0z7qtmeL/3/
My Method does not work:
updateLocation: function() { this.$refs.map.getView().setCenter( [ -118.2436849, 34.0522342 ]); }
The text was updated successfully, but these errors were encountered: