代码之家  ›  专栏  ›  技术社区  ›  Olivier MATROT

图钉在特定iOS设备上不可见

  •  0
  • Olivier MATROT  · 技术社区  · 4 年前

    我很难在带有圆角的设备上看到图钉,比如主指示器(iphone12promax)。包括iPad在内的所有其他设备都在显示我的图钉(卡车/旗帜…)。你自己看看下面的地图是以他们为中心的。

    我快疯了。

    伪代码:

    // Vehicles
    vehiclelayer = new Microsoft.Maps.Layer();
    vehiclelayer.setZIndex(3);
    this.map.layers.insert(vehiclelayer);
    ...
    var pushpin;
    var pushpinOptions;
    
    pushpinOptions = {
       icon: imageBase64,
       title: label,
       visible: true,
       anchor: anchor,
      };
    var location = new Microsoft.Maps.Location(latitude, longitude);
    pushpin = new Microsoft.Maps.Pushpin(location, pushpinOptions);
    vehiclelayer.add(pushpin, index);
    

    enter image description here

    iPhone 12 Pro Max手机

    enter image description here


    编辑 我已经能够通过一个简单的Xcode项目从SDK测试网站获取pushpin示例来重现这个问题。

    https://github.com/omatrot/wkwebview/tree/main/wkwebview

    0 回复  |  直到 4 年前
    推荐文章