Map now pans when marker is outside viewport
This commit is contained in:
parent
9cdd13343a
commit
d5cae4c6b7
|
@ -130,6 +130,9 @@ var These3Words = (function () {
|
||||||
this.label = label;
|
this.label = label;
|
||||||
this.marker.setPosition(latLng);
|
this.marker.setPosition(latLng);
|
||||||
this.marker.setTitle(label);
|
this.marker.setTitle(label);
|
||||||
|
if (!this.map.getBounds().contains(latLng)) {
|
||||||
|
this.map.panTo(latLng);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue