Closed jvv closed 8 years ago
This is how I retrieve bounds :
this.boundaries.SELat = this.map.bounds.getSouthWest().lat();
this.boundaries.SELng = this.map.bounds.getNorthEast().lng();
this.boundaries.NWLat = this.map.bounds.getNorthEast().lat();
this.boundaries.NWLng = this.map.bounds.getSouthWest().lng();
(I transform Google Maps SW and NE to SE and NW coordinates because that's what I need for ElasticSearch)
Thanks, that did the trick @smartpierre
I'm having trouble reading the bounds of the map. I've added bounds to the map element like this:
:bounds.sync="map.bounds"
I see the bounds changing in Vue Devtools when I move or zoom the map. But when I try to read the properties of the bounds ( eg:
map.bounds.south
) I getundefined
.Bounds in Vue Devtools
Bounds in console output of attribute
What am I missing? I'd like to load markers from my server based on the bounds the user sees.