react-native-maps 1.21.0-alpha.53 → 1.21.0-alpha.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
package com.rnmaps.fabric;
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
import static com.rnmaps.maps.MapManager.MY_LOCATION_PRIORITY;
|
|
5
|
+
|
|
4
6
|
import android.view.View;
|
|
5
7
|
|
|
6
8
|
import androidx.annotation.Nullable;
|
|
@@ -23,7 +25,7 @@ import java.util.Map;
|
|
|
23
25
|
public class MapViewManager extends ViewGroupManager<MapView> implements RNMapsMapViewManagerInterface<MapView> {
|
|
24
26
|
|
|
25
27
|
|
|
26
|
-
public MapViewManager(ReactApplicationContext context){
|
|
28
|
+
public MapViewManager(ReactApplicationContext context) {
|
|
27
29
|
super(context);
|
|
28
30
|
}
|
|
29
31
|
private GoogleMapOptions options;
|
|
@@ -72,12 +74,12 @@ public class MapViewManager extends ViewGroupManager<MapView> implements RNMapsM
|
|
|
72
74
|
|
|
73
75
|
@Override
|
|
74
76
|
public void setCompassOffset(MapView view, @Nullable ReadableMap value) {
|
|
75
|
-
|
|
77
|
+
// not supported
|
|
76
78
|
}
|
|
77
79
|
|
|
78
80
|
@Override
|
|
79
81
|
public void setFollowsUserLocation(MapView view, boolean value) {
|
|
80
|
-
|
|
82
|
+
// not supported
|
|
81
83
|
}
|
|
82
84
|
|
|
83
85
|
@Override
|
|
@@ -102,7 +104,7 @@ public class MapViewManager extends ViewGroupManager<MapView> implements RNMapsM
|
|
|
102
104
|
|
|
103
105
|
@Override
|
|
104
106
|
public void setLegalLabelInsets(MapView view, @Nullable ReadableMap value) {
|
|
105
|
-
|
|
107
|
+
// not supported
|
|
106
108
|
}
|
|
107
109
|
|
|
108
110
|
@Override
|
|
@@ -122,22 +124,47 @@ public class MapViewManager extends ViewGroupManager<MapView> implements RNMapsM
|
|
|
122
124
|
|
|
123
125
|
@Override
|
|
124
126
|
public void setLoadingBackgroundColor(MapView view, @Nullable Integer value) {
|
|
125
|
-
|
|
127
|
+
view.setLoadingBackgroundColor(value);
|
|
126
128
|
}
|
|
127
129
|
|
|
128
130
|
@Override
|
|
129
131
|
public void setLoadingEnabled(MapView view, boolean value) {
|
|
130
|
-
|
|
132
|
+
view.setLoadingEnabled(value);
|
|
131
133
|
}
|
|
132
134
|
|
|
133
135
|
@Override
|
|
134
136
|
public void setLoadingIndicatorColor(MapView view, @Nullable Integer value) {
|
|
135
|
-
|
|
137
|
+
view.setLoadingIndicatorColor(value);
|
|
136
138
|
}
|
|
137
139
|
|
|
138
140
|
@Override
|
|
139
|
-
public void setMapPadding(MapView view, @Nullable ReadableMap
|
|
141
|
+
public void setMapPadding(MapView view, @Nullable ReadableMap padding) {
|
|
142
|
+
int left = 0;
|
|
143
|
+
int top = 0;
|
|
144
|
+
int right = 0;
|
|
145
|
+
int bottom = 0;
|
|
146
|
+
double density = (double) view.getResources().getDisplayMetrics().density;
|
|
147
|
+
|
|
148
|
+
if (padding != null) {
|
|
149
|
+
if (padding.hasKey("left")) {
|
|
150
|
+
left = (int) (padding.getDouble("left") * density);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
if (padding.hasKey("top")) {
|
|
154
|
+
top = (int) (padding.getDouble("top") * density);
|
|
155
|
+
}
|
|
140
156
|
|
|
157
|
+
if (padding.hasKey("right")) {
|
|
158
|
+
right = (int) (padding.getDouble("right") * density);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (padding.hasKey("bottom")) {
|
|
162
|
+
bottom = (int) (padding.getDouble("bottom") * density);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
view.applyBaseMapPadding(left, top, right, bottom);
|
|
167
|
+
view.map.setPadding(left, top, right, bottom);
|
|
141
168
|
}
|
|
142
169
|
|
|
143
170
|
@Override
|
|
@@ -148,47 +175,47 @@ public class MapViewManager extends ViewGroupManager<MapView> implements RNMapsM
|
|
|
148
175
|
@Override
|
|
149
176
|
public void setMapType(MapView view, @Nullable String value) {
|
|
150
177
|
//hybrid | none | satellite | standard | terrain
|
|
151
|
-
if ("hybrid".equals(value)){
|
|
178
|
+
if ("hybrid".equals(value)) {
|
|
152
179
|
view.setMapType(GoogleMap.MAP_TYPE_HYBRID);
|
|
153
|
-
} else if ("none".equals(value)){
|
|
180
|
+
} else if ("none".equals(value)) {
|
|
154
181
|
view.setMapType(GoogleMap.MAP_TYPE_NONE);
|
|
155
|
-
} else if ("satellite".equals(value)){
|
|
182
|
+
} else if ("satellite".equals(value)) {
|
|
156
183
|
view.setMapType(GoogleMap.MAP_TYPE_SATELLITE);
|
|
157
|
-
} else if ("standard".equals(value)){
|
|
184
|
+
} else if ("standard".equals(value)) {
|
|
158
185
|
view.setMapType(GoogleMap.MAP_TYPE_NORMAL);
|
|
159
|
-
} else if ("terrain".equals(value)){
|
|
186
|
+
} else if ("terrain".equals(value)) {
|
|
160
187
|
view.setMapType(GoogleMap.MAP_TYPE_TERRAIN);
|
|
161
188
|
}
|
|
162
189
|
}
|
|
163
190
|
|
|
164
191
|
@Override
|
|
165
192
|
public void setMaxDelta(MapView view, double value) {
|
|
166
|
-
|
|
193
|
+
// not supported
|
|
167
194
|
}
|
|
168
195
|
|
|
169
196
|
@Override
|
|
170
197
|
public void setMaxZoom(MapView view, float value) {
|
|
171
|
-
|
|
198
|
+
view.setMaxZoomLevel(value);
|
|
172
199
|
}
|
|
173
200
|
|
|
174
201
|
@Override
|
|
175
202
|
public void setMinDelta(MapView view, double value) {
|
|
176
|
-
|
|
203
|
+
// not supported
|
|
177
204
|
}
|
|
178
205
|
|
|
179
206
|
@Override
|
|
180
207
|
public void setMinZoom(MapView view, float value) {
|
|
181
|
-
|
|
208
|
+
view.setMinZoomLevel(value);
|
|
182
209
|
}
|
|
183
210
|
|
|
184
211
|
@Override
|
|
185
212
|
public void setMoveOnMarkerPress(MapView view, boolean value) {
|
|
186
|
-
|
|
213
|
+
view.setMoveOnMarkerPress(value);
|
|
187
214
|
}
|
|
188
215
|
|
|
189
216
|
@Override
|
|
190
217
|
public void setHandlePanDrag(MapView view, boolean value) {
|
|
191
|
-
|
|
218
|
+
view.setHandlePanDrag(value);
|
|
192
219
|
}
|
|
193
220
|
|
|
194
221
|
@Override
|
|
@@ -198,27 +225,27 @@ public class MapViewManager extends ViewGroupManager<MapView> implements RNMapsM
|
|
|
198
225
|
|
|
199
226
|
@Override
|
|
200
227
|
public void setPitchEnabled(MapView view, boolean value) {
|
|
201
|
-
|
|
228
|
+
view.setPitchEnabled(value);
|
|
202
229
|
}
|
|
203
230
|
|
|
204
231
|
@Override
|
|
205
232
|
public void setRegion(MapView view, @Nullable ReadableMap value) {
|
|
206
|
-
|
|
233
|
+
view.setRegion(value);
|
|
207
234
|
}
|
|
208
235
|
|
|
209
236
|
@Override
|
|
210
237
|
public void setRotateEnabled(MapView view, boolean value) {
|
|
211
|
-
|
|
238
|
+
view.setRotateEnabled(value);
|
|
212
239
|
}
|
|
213
240
|
|
|
214
241
|
@Override
|
|
215
242
|
public void setScrollDuringRotateOrZoomEnabled(MapView view, boolean value) {
|
|
216
|
-
|
|
243
|
+
view.setScrollDuringRotateOrZoomEnabled(value);
|
|
217
244
|
}
|
|
218
245
|
|
|
219
246
|
@Override
|
|
220
247
|
public void setScrollEnabled(MapView view, boolean value) {
|
|
221
|
-
|
|
248
|
+
view.setScrollEnabled(value);
|
|
222
249
|
}
|
|
223
250
|
|
|
224
251
|
@Override
|
|
@@ -228,92 +255,92 @@ public class MapViewManager extends ViewGroupManager<MapView> implements RNMapsM
|
|
|
228
255
|
|
|
229
256
|
@Override
|
|
230
257
|
public void setShowsCompass(MapView view, boolean value) {
|
|
231
|
-
|
|
258
|
+
view.setShowsCompass(value);
|
|
232
259
|
}
|
|
233
260
|
|
|
234
261
|
@Override
|
|
235
262
|
public void setShowsIndoorLevelPicker(MapView view, boolean value) {
|
|
236
|
-
|
|
263
|
+
view.setShowsIndoorLevelPicker(value);
|
|
237
264
|
}
|
|
238
265
|
|
|
239
266
|
@Override
|
|
240
267
|
public void setShowsIndoors(MapView view, boolean value) {
|
|
241
|
-
|
|
268
|
+
view.setShowIndoors(value);
|
|
242
269
|
}
|
|
243
270
|
|
|
244
271
|
@Override
|
|
245
272
|
public void setShowsMyLocationButton(MapView view, boolean value) {
|
|
246
|
-
|
|
273
|
+
view.setShowsMyLocationButton(value);
|
|
247
274
|
}
|
|
248
275
|
|
|
249
276
|
@Override
|
|
250
277
|
public void setShowsScale(MapView view, boolean value) {
|
|
251
|
-
|
|
278
|
+
// not supported
|
|
252
279
|
}
|
|
253
280
|
|
|
254
281
|
@Override
|
|
255
282
|
public void setShowsUserLocation(MapView view, boolean value) {
|
|
256
|
-
|
|
283
|
+
view.setShowsUserLocation(value);
|
|
257
284
|
}
|
|
258
285
|
|
|
259
286
|
@Override
|
|
260
287
|
public void setTintColor(MapView view, @Nullable Integer value) {
|
|
261
|
-
|
|
288
|
+
// not supported
|
|
262
289
|
}
|
|
263
290
|
|
|
264
291
|
@Override
|
|
265
292
|
public void setToolbarEnabled(MapView view, boolean value) {
|
|
266
|
-
|
|
293
|
+
view.setToolbarEnabled(value);
|
|
267
294
|
}
|
|
268
295
|
|
|
269
296
|
@Override
|
|
270
297
|
public void setUserInterfaceStyle(MapView view, @Nullable String value) {
|
|
271
|
-
|
|
298
|
+
// not supported
|
|
272
299
|
}
|
|
273
300
|
|
|
274
301
|
@Override
|
|
275
302
|
public void setUserLocationAnnotationTitle(MapView view, @Nullable String value) {
|
|
276
|
-
|
|
303
|
+
// not supported
|
|
277
304
|
}
|
|
278
305
|
|
|
279
306
|
@Override
|
|
280
307
|
public void setUserLocationCalloutEnabled(MapView view, boolean value) {
|
|
281
|
-
|
|
308
|
+
// not supported
|
|
282
309
|
}
|
|
283
310
|
|
|
284
311
|
@Override
|
|
285
312
|
public void setUserLocationFastestInterval(MapView view, int value) {
|
|
286
|
-
|
|
313
|
+
view.setUserLocationFastestInterval(value);
|
|
287
314
|
}
|
|
288
315
|
|
|
289
316
|
@Override
|
|
290
317
|
public void setUserLocationPriority(MapView view, @Nullable String value) {
|
|
291
|
-
|
|
318
|
+
view.setUserLocationPriority(MY_LOCATION_PRIORITY.get(value));
|
|
292
319
|
}
|
|
293
320
|
|
|
294
321
|
@Override
|
|
295
322
|
public void setUserLocationUpdateInterval(MapView view, int value) {
|
|
296
|
-
|
|
323
|
+
view.setUserLocationUpdateInterval(value);
|
|
297
324
|
}
|
|
298
325
|
|
|
299
326
|
@Override
|
|
300
327
|
public void setZoomControlEnabled(MapView view, boolean value) {
|
|
301
|
-
|
|
328
|
+
view.setZoomControlEnabled(value);
|
|
302
329
|
}
|
|
303
330
|
|
|
304
331
|
@Override
|
|
305
332
|
public void setZoomEnabled(MapView view, boolean value) {
|
|
306
|
-
|
|
333
|
+
view.setZoomEnabled(value);
|
|
307
334
|
}
|
|
308
335
|
|
|
309
336
|
@Override
|
|
310
337
|
public void setZoomTapEnabled(MapView view, boolean value) {
|
|
311
|
-
|
|
338
|
+
// not supported
|
|
312
339
|
}
|
|
313
340
|
|
|
314
341
|
@Override
|
|
315
342
|
public void setCameraZoomRange(MapView view, @Nullable ReadableMap value) {
|
|
316
|
-
|
|
343
|
+
// not supported
|
|
317
344
|
}
|
|
318
345
|
|
|
319
346
|
@Override
|
|
@@ -345,4 +372,4 @@ public class MapViewManager extends ViewGroupManager<MapView> implements RNMapsM
|
|
|
345
372
|
public void fitToCoordinates(MapView view, String coordinatesJSON, String edgePaddingJSON, boolean animated) {
|
|
346
373
|
|
|
347
374
|
}
|
|
348
|
-
}
|
|
375
|
+
}
|
|
@@ -42,7 +42,7 @@ public class MapManager extends ViewGroupManager<MapView> {
|
|
|
42
42
|
"none", GoogleMap.MAP_TYPE_NONE
|
|
43
43
|
);
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
public static final Map<String, Integer> MY_LOCATION_PRIORITY = MapBuilder.of(
|
|
46
46
|
"balanced", Priority.PRIORITY_BALANCED_POWER_ACCURACY,
|
|
47
47
|
"high", Priority.PRIORITY_HIGH_ACCURACY,
|
|
48
48
|
"low", Priority.PRIORITY_LOW_POWER,
|
|
@@ -240,47 +240,47 @@ public class MapManager extends ViewGroupManager<MapView> {
|
|
|
240
240
|
|
|
241
241
|
@ReactProp(name = "showsBuildings", defaultBoolean = false)
|
|
242
242
|
public void setShowBuildings(MapView view, boolean showBuildings) {
|
|
243
|
-
view.
|
|
243
|
+
view.setShowBuildings(showBuildings);
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
@ReactProp(name = "showsIndoors", defaultBoolean = false)
|
|
247
247
|
public void setShowIndoors(MapView view, boolean showIndoors) {
|
|
248
|
-
view.
|
|
248
|
+
view.setShowIndoors(showIndoors);
|
|
249
249
|
}
|
|
250
250
|
|
|
251
251
|
@ReactProp(name = "showsIndoorLevelPicker", defaultBoolean = false)
|
|
252
252
|
public void setShowsIndoorLevelPicker(MapView view, boolean showsIndoorLevelPicker) {
|
|
253
|
-
view.
|
|
253
|
+
view.setShowsIndoorLevelPicker(showsIndoorLevelPicker);
|
|
254
254
|
}
|
|
255
255
|
|
|
256
256
|
@ReactProp(name = "showsCompass", defaultBoolean = false)
|
|
257
257
|
public void setShowsCompass(MapView view, boolean showsCompass) {
|
|
258
|
-
view.
|
|
258
|
+
view.setShowsCompass(showsCompass);
|
|
259
259
|
}
|
|
260
260
|
|
|
261
261
|
@ReactProp(name = "scrollEnabled", defaultBoolean = false)
|
|
262
262
|
public void setScrollEnabled(MapView view, boolean scrollEnabled) {
|
|
263
|
-
view.
|
|
263
|
+
view.setScrollEnabled(scrollEnabled);
|
|
264
264
|
}
|
|
265
265
|
|
|
266
266
|
@ReactProp(name = "zoomEnabled", defaultBoolean = false)
|
|
267
267
|
public void setZoomEnabled(MapView view, boolean zoomEnabled) {
|
|
268
|
-
view.
|
|
268
|
+
view.setZoomEnabled(zoomEnabled);
|
|
269
269
|
}
|
|
270
270
|
|
|
271
271
|
@ReactProp(name = "zoomControlEnabled", defaultBoolean = true)
|
|
272
272
|
public void setZoomControlEnabled(MapView view, boolean zoomControlEnabled) {
|
|
273
|
-
view.
|
|
273
|
+
view.setZoomControlEnabled(zoomControlEnabled);
|
|
274
274
|
}
|
|
275
275
|
|
|
276
276
|
@ReactProp(name = "rotateEnabled", defaultBoolean = false)
|
|
277
277
|
public void setRotateEnabled(MapView view, boolean rotateEnabled) {
|
|
278
|
-
view.
|
|
278
|
+
view.setRotateEnabled(rotateEnabled);
|
|
279
279
|
}
|
|
280
280
|
|
|
281
281
|
@ReactProp(name = "scrollDuringRotateOrZoomEnabled", defaultBoolean = true)
|
|
282
282
|
public void setScrollDuringRotateOrZoomEnabled(MapView view, boolean scrollDuringRotateOrZoomEnabled) {
|
|
283
|
-
view.
|
|
283
|
+
view.setScrollDuringRotateOrZoomEnabled(scrollDuringRotateOrZoomEnabled);
|
|
284
284
|
}
|
|
285
285
|
|
|
286
286
|
@ReactProp(name = "cacheEnabled", defaultBoolean = false)
|
|
@@ -295,7 +295,7 @@ public class MapManager extends ViewGroupManager<MapView> {
|
|
|
295
295
|
|
|
296
296
|
@ReactProp(name = "loadingEnabled", defaultBoolean = false)
|
|
297
297
|
public void setLoadingEnabled(MapView view, boolean loadingEnabled) {
|
|
298
|
-
view.
|
|
298
|
+
view.setLoadingEnabled(loadingEnabled);
|
|
299
299
|
}
|
|
300
300
|
|
|
301
301
|
@ReactProp(name = "moveOnMarkerPress", defaultBoolean = true)
|
|
@@ -315,17 +315,17 @@ public class MapManager extends ViewGroupManager<MapView> {
|
|
|
315
315
|
|
|
316
316
|
@ReactProp(name = "pitchEnabled", defaultBoolean = false)
|
|
317
317
|
public void setPitchEnabled(MapView view, boolean pitchEnabled) {
|
|
318
|
-
view.
|
|
318
|
+
view.setPitchEnabled(pitchEnabled);
|
|
319
319
|
}
|
|
320
320
|
|
|
321
321
|
@ReactProp(name = "minZoomLevel")
|
|
322
322
|
public void setMinZoomLevel(MapView view, float minZoomLevel) {
|
|
323
|
-
view.
|
|
323
|
+
view.setMinZoomLevel(minZoomLevel);
|
|
324
324
|
}
|
|
325
325
|
|
|
326
326
|
@ReactProp(name = "maxZoomLevel")
|
|
327
327
|
public void setMaxZoomLevel(MapView view, float maxZoomLevel) {
|
|
328
|
-
view.
|
|
328
|
+
view.setMaxZoomLevel(maxZoomLevel);
|
|
329
329
|
}
|
|
330
330
|
|
|
331
331
|
@ReactProp(name = "kmlSrc")
|
|
@@ -37,7 +37,6 @@ import com.facebook.react.bridge.WritableNativeArray;
|
|
|
37
37
|
import com.facebook.react.bridge.WritableNativeMap;
|
|
38
38
|
import com.facebook.react.uimanager.ThemedReactContext;
|
|
39
39
|
import com.facebook.react.uimanager.UIManagerHelper;
|
|
40
|
-
import com.facebook.react.uimanager.common.UIManagerType;
|
|
41
40
|
import com.facebook.react.uimanager.events.Event;
|
|
42
41
|
import com.facebook.react.uimanager.events.EventDispatcher;
|
|
43
42
|
import com.google.android.gms.maps.CameraUpdate;
|
|
@@ -69,7 +68,6 @@ import com.google.maps.android.collections.PolylineManager;
|
|
|
69
68
|
import com.google.maps.android.data.kml.KmlContainer;
|
|
70
69
|
import com.google.maps.android.data.kml.KmlLayer;
|
|
71
70
|
import com.google.maps.android.data.kml.KmlPlacemark;
|
|
72
|
-
import com.google.maps.android.data.kml.KmlStyle;
|
|
73
71
|
|
|
74
72
|
import org.xmlpull.v1.XmlPullParserException;
|
|
75
73
|
|
|
@@ -141,6 +139,18 @@ public class MapView extends com.google.android.gms.maps.MapView implements Goog
|
|
|
141
139
|
|
|
142
140
|
private final ViewAttacherGroup attacherGroup;
|
|
143
141
|
private LatLng tapLocation;
|
|
142
|
+
private Float maxZoomLevel;
|
|
143
|
+
private Float minZoomLevel;
|
|
144
|
+
private Boolean pitchEnabled;
|
|
145
|
+
private Boolean showsCompass;
|
|
146
|
+
private Boolean rotateEnabled;
|
|
147
|
+
private Boolean zoomEnabled;
|
|
148
|
+
private Boolean zoomControlEnabled;
|
|
149
|
+
private Boolean setShowBuildings;
|
|
150
|
+
private Boolean showsIndoorLevelPicker;
|
|
151
|
+
private Boolean showIndoors;
|
|
152
|
+
private Boolean scrollEnabled;
|
|
153
|
+
private Boolean scrollDuringRotateOrZoomEnabled;
|
|
144
154
|
|
|
145
155
|
private static boolean contextHasBug(Context context) {
|
|
146
156
|
return context == null ||
|
|
@@ -260,6 +270,42 @@ public class MapView extends com.google.android.gms.maps.MapView implements Goog
|
|
|
260
270
|
return;
|
|
261
271
|
}
|
|
262
272
|
this.map = map;
|
|
273
|
+
if (maxZoomLevel != null){
|
|
274
|
+
setMaxZoomLevel(maxZoomLevel);
|
|
275
|
+
}
|
|
276
|
+
if (minZoomLevel != null){
|
|
277
|
+
setMinZoomLevel(minZoomLevel);
|
|
278
|
+
}
|
|
279
|
+
if (pitchEnabled != null){
|
|
280
|
+
setPitchEnabled(pitchEnabled);
|
|
281
|
+
}
|
|
282
|
+
if (showsCompass != null){
|
|
283
|
+
setShowsCompass(showsCompass);
|
|
284
|
+
}
|
|
285
|
+
if (rotateEnabled != null){
|
|
286
|
+
setRotateEnabled(rotateEnabled);
|
|
287
|
+
}
|
|
288
|
+
if (zoomEnabled != null){
|
|
289
|
+
setZoomEnabled(zoomEnabled);
|
|
290
|
+
}
|
|
291
|
+
if (zoomControlEnabled != null){
|
|
292
|
+
setZoomControlEnabled(zoomControlEnabled);
|
|
293
|
+
}
|
|
294
|
+
if (setShowBuildings != null){
|
|
295
|
+
setShowBuildings(setShowBuildings);
|
|
296
|
+
}
|
|
297
|
+
if (showsIndoorLevelPicker != null){
|
|
298
|
+
setShowsIndoorLevelPicker(showsIndoorLevelPicker);
|
|
299
|
+
}
|
|
300
|
+
if (showIndoors != null){
|
|
301
|
+
setShowIndoors(showIndoors);
|
|
302
|
+
}
|
|
303
|
+
if (scrollEnabled != null){
|
|
304
|
+
setScrollEnabled(scrollEnabled);
|
|
305
|
+
}
|
|
306
|
+
if (scrollDuringRotateOrZoomEnabled != null){
|
|
307
|
+
setScrollDuringRotateOrZoomEnabled(scrollDuringRotateOrZoomEnabled);
|
|
308
|
+
}
|
|
263
309
|
|
|
264
310
|
markerManager = new MarkerManager(map);
|
|
265
311
|
markerCollection = markerManager.newCollection();
|
|
@@ -748,7 +794,7 @@ public static CameraPosition cameraPositionFromMap(ReadableMap camera){
|
|
|
748
794
|
map.setOnPoiClickListener(poiClickEnabled ? this : null);
|
|
749
795
|
}
|
|
750
796
|
|
|
751
|
-
public void
|
|
797
|
+
public void setLoadingEnabled(boolean loadingEnabled) {
|
|
752
798
|
if (loadingEnabled && !this.isMapLoaded) {
|
|
753
799
|
this.getMapLoadingLayoutView().setVisibility(View.VISIBLE);
|
|
754
800
|
}
|
|
@@ -757,6 +803,79 @@ public static CameraPosition cameraPositionFromMap(ReadableMap camera){
|
|
|
757
803
|
public void setMoveOnMarkerPress(boolean moveOnPress) {
|
|
758
804
|
this.moveOnMarkerPress = moveOnPress;
|
|
759
805
|
}
|
|
806
|
+
public void setMaxZoomLevel(float maxZoomLevel){
|
|
807
|
+
this.maxZoomLevel = maxZoomLevel;
|
|
808
|
+
if (map != null) {
|
|
809
|
+
map.setMaxZoomPreference(maxZoomLevel);
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
public void setMinZoomLevel(float minZoomLevel){
|
|
813
|
+
this.minZoomLevel = minZoomLevel;
|
|
814
|
+
if (map != null) {
|
|
815
|
+
map.setMinZoomPreference(minZoomLevel);
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
public void setPitchEnabled(boolean pitchEnabled){
|
|
819
|
+
this.pitchEnabled = pitchEnabled;
|
|
820
|
+
if (map != null) {
|
|
821
|
+
map.getUiSettings().setTiltGesturesEnabled(pitchEnabled);
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
public void setShowsCompass(boolean showsCompass){
|
|
825
|
+
this.showsCompass = showsCompass;
|
|
826
|
+
if (map != null) {
|
|
827
|
+
map.getUiSettings().setCompassEnabled(showsCompass);
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
public void setRotateEnabled(boolean rotateEnabled){
|
|
831
|
+
this.rotateEnabled = rotateEnabled;
|
|
832
|
+
if (map != null) {
|
|
833
|
+
map.getUiSettings().setRotateGesturesEnabled(rotateEnabled);
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
public void setZoomEnabled(boolean zoomEnabled){
|
|
837
|
+
this.zoomEnabled = zoomEnabled;
|
|
838
|
+
if (map != null) {
|
|
839
|
+
map.getUiSettings().setZoomGesturesEnabled(zoomEnabled);
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
public void setZoomControlEnabled(boolean zoomControlEnabled){
|
|
843
|
+
this.zoomControlEnabled = zoomControlEnabled;
|
|
844
|
+
if (map != null) {
|
|
845
|
+
map.getUiSettings().setZoomControlsEnabled(zoomControlEnabled);
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
public void setScrollDuringRotateOrZoomEnabled(boolean scrollDuringRotateOrZoomEnabled){
|
|
849
|
+
this.scrollDuringRotateOrZoomEnabled = scrollDuringRotateOrZoomEnabled;
|
|
850
|
+
if (map != null) {
|
|
851
|
+
map.getUiSettings().setScrollGesturesEnabledDuringRotateOrZoom(scrollDuringRotateOrZoomEnabled);
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
public void setScrollEnabled(boolean scrollEnabled){
|
|
855
|
+
this.scrollEnabled = scrollEnabled;
|
|
856
|
+
if (map != null) {
|
|
857
|
+
map.getUiSettings().setScrollGesturesEnabled(scrollEnabled);
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
public void setShowIndoors(boolean showIndoors){
|
|
861
|
+
this.showIndoors = showIndoors;
|
|
862
|
+
if (map != null) {
|
|
863
|
+
map.setIndoorEnabled(showIndoors);
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
public void setShowsIndoorLevelPicker(boolean showsIndoorLevelPicker) {
|
|
867
|
+
this.showsIndoorLevelPicker = showsIndoorLevelPicker;
|
|
868
|
+
if (map != null) {
|
|
869
|
+
map.getUiSettings().setIndoorLevelPickerEnabled(showsIndoorLevelPicker);
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
public void setShowBuildings(boolean showBuildings) {
|
|
873
|
+
this.setShowBuildings = showBuildings;
|
|
874
|
+
if (map != null) {
|
|
875
|
+
map.setBuildingsEnabled(showBuildings);
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
|
|
760
879
|
|
|
761
880
|
public void setLoadingBackgroundColor(Integer loadingBackgroundColor) {
|
|
762
881
|
this.loadingBackgroundColor = loadingBackgroundColor;
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"author": "Leland Richardson <leland.m.richardson@gmail.com>",
|
|
7
7
|
"homepage": "https://github.com/react-native-maps/react-native-maps#readme",
|
|
8
|
-
"version": "1.21.0-alpha.
|
|
8
|
+
"version": "1.21.0-alpha.54",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"lint": "eslint . --max-warnings 0",
|