我正在构建一个Nativescript项目,需要缩放并适应地图上制造商的范围。该地图有效,并且标记没有问题。在查看有关同一问题的不同帖子时,我会找到以下解决方案:
解决方案1 在此解决方案中,我找不到 GMSCoordinateBounds 。
let bounds = GMSCoordinateBounds.alloc().init();
bounds = bounds.includingCoordinate(position);
let update = GMSCameraUpdate.fitBoundsWithPadding(bounds, padding);
mapView.gMap.moveCamera(update);
解决方案2 在此解决方案中,我找不到 CLLocationCoordinate2DMake 。
declare
const GMSCameraUpdate: any;
let locationToSet = CLLocationCoordinate2DMake(latitude, longitude);
let updateLocationCamera = GMSCameraUpdate.setTarget(locationToSet);
this.mapView.gMap.animateWithCameraUpdate(updateLocationCamera);
我缺少任何进口商品吗?