简体   繁体   中英

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.

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. It might be possible to achieve the requirement using the HERE JavaScript SDK 3.1 which supports better map overlays.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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