2017-06-05 79 views
0

我工作的一個項目遷移從version7(V7)冰地圖V8和下面的文件中提到的程序兵地圖V7到V8遷移

https://social.technet.microsoft.com/wiki/contents/articles/34563.bing-maps-v7-to-v8-migration-guide.aspx

我們的兵地圖應用程序(第7版)在地圖類中使用getTargetBounds()方法(按照以下代碼)來導航地圖以顯示所選位置。根據文檔(上面的鏈接),這個方法已經在v8中被刪除了。您能否請告知在bing map v8中實現此目標的工作是什麼?

var targetBounds = bingMap.getTargetBounds(); 
         var isView = targetBounds.contains(newLocaton); 

         if (!isView) { 
          bingMap.setView({ center: newLocaton }); 
         } 

由於

回答

0

只需使用map.getBounds()的視圖已經改變之後。

+0

謝謝!它的工作原理 – user3802566

+0

任何解決方法之前,任何解決方法BeforeStepRender,BeforeSummaryRender,DirectionManager Events類中的AfterWaypointRender方法的工作? – user3802566