作者:壹路上有祢_522 | 来源:互联网 | 2023-06-14 20:36
问题
在解决自定义样式加载白块后,发现拖曳地图在全球上经度0处显示不全。
问题代码
setMapStyle
设置个性化地图,参数为个性化配置对象
map.setMapStyleV2({styleJson: mapStyles});
官方解释
官方的回复很明显,暂时没有来自官方的解决方案,需要自己去调整处理
自定义样式JSON
[{"featureType": "background","elementType": "geometry","stylers": {"visibility": "off"}
}, {"featureType": "road","elementType": "geometry","stylers": {"visibility": "off"}
}, {"featureType": "road","elementType": "labels","stylers": {"visibility": "off"}
}, {"featureType": "poilabel","elementType": "labels","stylers": {"visibility": "off"}
}, {"featureType": "poilabel","elementType": "labels.icon","stylers": {"visibility": "off"}
}, {"featureType": "districtlabel","elementType": "labels","stylers": {"visibility": "off"}
}, {"featureType": "districtlabel","elementType": "labels.icon","stylers": {"visibility": "off"}
}]