GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — for leaflet 百度地图的一个问题 · Issue #58 · SuperMap/iClient-JavaScript

for leaflet 百度地图的一个问题 #58

New issue
Copy link
New issue
Copy link
Open
Open
for leaflet 百度地图的一个问题#58
Copy link
Labels
help wanted

Description

@brahmachen
brahmachen
opened on Nov 18, 2019
Issue body actions

Request a feature or report a bug? [这是一个需求还是一个缺陷]

缺陷

One-line summary [问题简述]

leaflet 里面的L.supermap.baiduTileLayer在加载百度地图时,若开启连续模式,就是 noWrap设置为false的话,并不是连续的,两个世界地图之间隔了一点距离

Version [产品及版本]

  • iClient product (for leaflet,for openlayers,for mapboxgl,classic)[iClient 产品]:for leaflet

Actual Behavior [当前现象]

两个世界瓦片之间有距离
image

Expected Behavior [期望现象]

没有距离

Example of reproducing the issue [重现现象的例子]

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title data-i18n="resources.title_baiduLayer"></title>
<script type="text/javascript" src="../js/include-web.js"></script>
</head>
<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
<div id="map" style="margin:0 auto;width: 100%;height: 100%"></div>
<script type="text/javascript" src="../../dist/leaflet/include-leaflet.js"></script>
<script type="text/javascript">
        var map = L.map('map', {
            crs: L.CRS.Baidu,
            center: [0, 0],
            zoom: 3
        });
        L.supermap.baiduTileLayer("", {
            noWrap: false,
        }).addTo(map);
    </script>
</body>
</html>

What is motivation or use case for changing the behavior? [需求的场景和目的是什么?]

需要展示全球地图,不美观

Activity

  1. songyumeng commented on Jan 3, 2020

    @songyumeng
    songyumeng
    on Jan 3, 2020
    Member
    More actions

    谢谢您的issue。
    百度地图的瓦片金字塔组织方式与谷歌地图等不同,比如瓦片起算点为0,0而非左上角,分辨率和级别的计算关系是Math.pow(2, (18 - zoom))。
    这些导致在zoom为3,4时,可能会出现世界边缘瓦片填充不满的情况,比如
    http://online2.map.bdimg.com/onlinelabel/?qt=tile&x=2&y=0&z=3&styles=ph&udt=20150815&scaler=1
    image
    在返回瓦片自身就填充不满的情况下,暂时无法实现无缝拼接。

  2. songyumeng
    added
    help wanted
    on Jan 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.