WP8 MapOverlay图像失真

时间:2013-11-21 20:43:59

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

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

我创建了一个图像来说明问题。

image distortion

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

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

非常感谢。

1 个答案:

答案 0 :(得分:0)

很遗憾,不推荐使用HERE Maps的Windows SDK,并且不再支持该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

相关问题