当前位置:网站首页>Dragging the custom style of Baidu map to the right makes the global map longitude 0 unable to be displayed normally

Dragging the custom style of Baidu map to the right makes the global map longitude 0 unable to be displayed normally

2022-07-07 17:38:00 Zi Yu

problem

After solving the problem of custom style loading white blocks , Find the longitude of the dragging map on the world 0 Incomplete display at .
 Insert picture description here

Problem code

setMapStyle Set up personalized maps , Parameters are personalized configuration objects

    map.setMapStyleV2({
    
        styleJson: mapStyles
    });

Official explanation

 Insert picture description here
The official reply is obvious , There is no official solution for the time being , You need to adjust and deal with it yourself

Custom style 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"
    }
}]
原网站

版权声明
本文为[Zi Yu]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207071525101741.html