@@ -79,6 +79,7 @@ class CameraPosition {
79
79
class CameraUpdate {
80
80
CameraUpdate ._(this ._json);
81
81
82
+ /// Returns a camera update that moves the camera to the specified position.
82
83
static newCameraPosition (CameraPosition cameraPosition) {
83
84
if (Platform .isIOS) {
84
85
return appleMaps.CameraUpdate .newCameraPosition (
@@ -89,6 +90,7 @@ class CameraUpdate {
89
90
}
90
91
}
91
92
93
+ /// Returns a camera update that moves the camera target to the specified geographical location.
92
94
static newLatLng (LatLng latLng) {
93
95
if (Platform .isIOS) {
94
96
return appleMaps.CameraUpdate .newLatLng (latLng.appleLatLng);
@@ -97,6 +99,7 @@ class CameraUpdate {
97
99
}
98
100
}
99
101
102
+ /// Returns a camera update that moves the camera target to the specified geographical location and zoom level.
100
103
static newLatLngZoom (LatLng latLng, double zoom) {
101
104
if (Platform .isIOS) {
102
105
return appleMaps.CameraUpdate .newLatLngZoom (latLng.appleLatLng, zoom);
@@ -105,6 +108,24 @@ class CameraUpdate {
105
108
}
106
109
}
107
110
111
+ /// Returns a camera update that transforms the camera so that
112
+ /// the specified geographical bounding box is centered in the map
113
+ /// view at the greatest possible zoom level.
114
+ /// A non-zero [padding] insets the bounding box from the map view's edges.
115
+ /// The camera's new tilt and bearing will both be 0.0.
116
+ static newLatLngBounds (LatLngBounds bounds, double padding) {
117
+ if (Platform .isIOS) {
118
+ return appleMaps.CameraUpdate .newLatLngBounds (
119
+ bounds.appleLatLngBounds, padding);
120
+ } else if (Platform .isAndroid) {
121
+ return googleMaps.CameraUpdate .newLatLngBounds (
122
+ bounds.googleLatLngBounds, padding);
123
+ }
124
+ }
125
+
126
+ /// Returns a camera update that modifies the camera zoom level by the specified amount.
127
+ /// The optional [focus] is a screen point whose underlying geographical location
128
+ /// should be invariant, if possible, by the movement.
108
129
static zoomBy (double amount) {
109
130
if (Platform .isIOS) {
110
131
return appleMaps.CameraUpdate .zoomBy (amount);
@@ -113,6 +134,10 @@ class CameraUpdate {
113
134
}
114
135
}
115
136
137
+ /// Returns a camera update that zooms the camera in,
138
+ /// bringing the camera closer to the surface of the Earth.
139
+ ///
140
+ /// Equivalent to the result of calling zoomBy(1.0).
116
141
static zoomIn () {
117
142
if (Platform .isIOS) {
118
143
return appleMaps.CameraUpdate .zoomIn ();
@@ -121,6 +146,10 @@ class CameraUpdate {
121
146
}
122
147
}
123
148
149
+ /// Returns a camera update that zooms the camera out,
150
+ /// bringing the camera further away from the surface of the Earth.
151
+ ///
152
+ /// Equivalent to the result of calling zoomBy(-1.0).
124
153
static zoomOut () {
125
154
if (Platform .isIOS) {
126
155
return appleMaps.CameraUpdate .zoomOut ();
@@ -129,6 +158,7 @@ class CameraUpdate {
129
158
}
130
159
}
131
160
161
+ /// Returns a camera update that sets the camera zoom level.
132
162
static zoomTo (double zoom) {
133
163
if (Platform .isIOS) {
134
164
return appleMaps.CameraUpdate .zoomTo (zoom);
0 commit comments