4 Star 4 Fork 0

mirrors_huiyan-fe/BMapGLLib

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
contribute
Sync branch
L- L 更新Swipe样式 cdf1056 9 months ago
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README

注意Swipe不支持同步倾斜角和旋转角度,在线地图同步zoom有延迟,离线地图无延迟

Example

    <div id="wrapper">
        <div id="map"></div>
        <div id="map2"></div>
    </div>
    // 百度地图API功能
    var map = new BMapGL.Map('map', {
        enableIconClick: true,
        preserveDrawingBuffer: true,
        maxZoom: 20,
    }); // 创建Map实例
    map.enableScrollWheelZoom();

    map.centerAndZoom(new BMapGL.Point(116.404844, 39.921354), 11);

    const map2 = new BMapGL.Map('map2');
    map2.enableScrollWheelZoom();
    map2.centerAndZoom(new BMapGL.Point(116.404844, 39.921354), 11);

    map2.setMapStyleV2({
        styleJson: darkStyle
    });

    new BMapGLLib.Swipe(map, map2, document.getElementById('wrapper'));

Options

Name Type Description
map BMapGL.Map 百度地图实例
map2 BMapGL.Map 百度地图实例
wrapper HTMLElement 地图容器
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_huiyan-fe/BMapGLLib.git
git@gitee.com:mirrors_huiyan-fe/BMapGLLib.git
mirrors_huiyan-fe
BMapGLLib
BMapGLLib
master

Search