简体   繁体   English

WP8 MapOverlay 图像失真

[英]WP8 MapOverlay Image Distortion

my Problem is, that when i put an image as the content of an MapOverlay on a Map, the image starts to disappear if i zoom in close enough.我的问题是,当我将图像作为 MapOverlay 的内容放在地图上时,如果我放大得足够近,图像就会开始消失。

I created an image to illustrate the problem.我创建了一个图像来说明问题。

图像失真

I recalculate the width and height of the image everytime i zoom, so it stays perfectly on the map.每次缩放时我都会重新计算图像的宽度和高度,因此它可以完美地保留在地图上。 I checked it and the dimensions of the image are not the problem.我检查了一下,图像的尺寸不是问题。

Does anybody can explain to me why this is happening?有没有人可以向我解释为什么会这样? Does anybody know how to fix this?有谁知道如何解决这个问题?

Thank you very much.非常感谢。

Unfortunately the windows SDK for HERE Maps has been deprecated and is no longer supported.不幸的是,HERE Maps 的 Windows SDK 已被弃用,不再受支持。 It might be possible to achieve the requirement using the HERE JavaScript SDK 3.1 which supports better map overlays.使用支持更好的地图叠加的 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);
}

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM