电子商务 网站设计,关键词优化排名怎么做,wordpress不能上传图片,网站建设旗舰品牌问题背景#xff1a;
规划驾车线路的时候#xff0c;使用uni的include-points指定可视范围的时候#xff0c;会很极限。导致marker不能完全显示。
解决方法
给地图显示范围添加padding (推荐) mapidmyMap:markersmarkers:polylinepol…问题背景
规划驾车线路的时候使用uni的include-points指定可视范围的时候会很极限。导致marker不能完全显示。
解决方法
给地图显示范围添加padding (推荐) mapidmyMap:markersmarkers:polylinepolyline:longitudecurLongitude:latitudecurLatitudemarkertapmarkertap/maponLoad((e) {uni.createMapContext(myMap, this).includePoints({padding: [120, 110, 120, 110],points: [{ latitude: startCityLat.value, longitude: startCityLog.value },{ latitude: endCityLat.value, longitude: endCityLog.value }]});
});或者获取并修改缩放地图记得设置中心点
const appMapRef ref();
appMapRef.value uni.createMapContext(myMap);
appMapRef.value.getScale({success: (res) {console.log(缩放, res);mapScale.value res.scale - 1;console.log(mapScale.value, mapScale.value);}});uni文档点击这里 1的效果图