【问题标题】:WP8 MapOverlay Image DistortionWP8 MapOverlay 图像失真
【发布时间】:2013-11-21 20:43:58
【问题描述】:

我的问题是,当我将图像作为 MapOverlay 的内容放在地图上时, 如果我放大得足够近,图像就会开始消失。

我创建了一张图片来说明问题。

每次缩放时我都会重新计算图像的宽度和高度,因此它可以完美地保留在地图上。我检查了它,图像的尺寸不是问题。

有人可以向我解释为什么会这样吗? 有人知道如何解决这个问题吗?

非常感谢。

【问题讨论】:

    标签: c# map windows-phone-8 here-api


    【解决方案1】:

    很遗憾,HERE Maps 的 Windows SDK 已被弃用,不再受支持。使用支持更好的地图叠加层的 HERE JavaScript SDK 3.1 可能可以实现该要求。

    function addOverlayToMap(map) {
      var imgCounter = 0;
    
      // create an overlay that will use a weather map as a bitmap
      var overlay = new H.map.Overlay(
        new H.geo.Rect(
          70.72849153520343, -24.085683364175395,
          29.569664922291, 44.216452317817016
        ),
        rainRadar[imgCounter],
        {
          // the bitmap is frequently updated mark the object as volatile
          volatility: true
        }
      );
    
      // update overlay's bitmap every 250 milliseconds
      setInterval(function() {
        imgCounter = imgCounter < 10 ? ++imgCounter : 0;
        overlay.setBitmap(rainRadar[imgCounter]);
      }, 250);
    
      // add overlay to the map
      map.addObject(overlay);
    }
    

    参考:https://developer.here.com/documentation/examples/maps-js/geoshapes/image-overlay

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多