Closed Andre-Coelhoo closed 1 year ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Can anyone give me any updates on this.
Soo i tested this in a physical android and iOS, and simulator android and iOS. Both tests in the iOS I get a problem. Some times when I change screens in my app the camera position changes and the zoom also changes. something that doest happen in the android at all. I can provide some code about this.
apboxMap( trackCameraPosition: true, compassEnabled: false, annotationOrder: MapUtils.annotationOrder, minMaxZoomPreference: MinMaxZoomPreference(5, maxZoom.toDouble()), gestureRecognizers: MapUtils.gestureRecognizers, onStyleLoadedCallback: () async { if(state is Completed){ await addBackgroundFloorToMap(context); await addNewAreasToMap(site, context); await addNewNodesToMap(site, customer, context); } }, logoViewMargins: Point(-100, -100), attributionButtonMargins: Point(-100, -100), onMapClick: (point, coordinates) { _mapManager?.cleanPin(); context.read().closePersonCard();
},
onCameraIdle: () {
final camera = _controller?.cameraPosition;
if (camera != null && !camera.zoom.isNaN) {
print("camera zoom: " + camera.zoom.toString());
final mapManager =
context.read().mapManager;
if (camera.zoom > 20 && mapManager?.size != 30) {
mapManager?.size = 30;
addNewNodesToMap(site, customer, context);
mapManager?.recoverPin();
} else if (camera.zoom <= 20 && mapManager?.size != 20) {
mapManager?.size = 20;
addNewNodesToMap(site, customer, context);
mapManager?.recoverPin();
}
}
},
onMapCreated: (MapboxMapController controller) async {
this._controller = controller;
context.read().mapboxController = controller;
}
static CameraPosition getInitialCurrent(Site site) { final double? lat = GetIt.I().get("currentLocationLat") as double?;
final double? log =
GetIt.I().get("currentLocationLog") as double?;
final double? zoom =
GetIt.I().get("currentLocationZoom") as double?;
}
}