2016-04-14 9 views

答えて

1

Bing Maps SDKを使用してWindowsストアアプリ(Windows 8/8.1)を作成する場合は、マップの中心位置を最初に把握し、その位置をピクセル座標に変換してマップの中心をオフセットすることができます。オフセットをピクセル座標に適用し、ピクセルを元の位置に戻して、その位置を使用してマップの中心を設定します。ここでのコードサンプルは次のとおりです。

//Convert the center location of the map into a pixel value. 
Point centerPixel; 
myMap.TryLocationToPixel(myMap.Center, out centerPixel); 

//Apply an offset to the pixel value. 
centerPixel.X += [offset value]; 
centerPixel.Y += [offset value]; 

//Convert pixel coordinate back into location object. 
Location center; 
myMap.TryPixelToLocation(centerPixel, out center); 

//Center the map using the offset value. 
myMap.Center = center; 

私は、Windows 8のWindows 10がすでに市場シェアで、Windows 8を超え、右に組み込まれたブランドの新しいBing Mapsのコントロールがあるのではなく、Windowsの10のための開発をお勧めします、と述べているすべてのWindows 10 SDK https://msdn.microsoft.com/en-us/library/windows/apps/xaml/dn642089.aspx

+0

私はWindows 10用に開発できたらいいのに、Windows 8.1がインストールされたLOBデバイスを対象にしています。私はWindows 8のバージョンにトークンではない深いリンクをWindows 10のサンプル/例/チュートリアルにMSDNのポイントで検索しています、時にはWindows 8のバージョンはサイトにあるようにも見えません... – Brendan

関連する問題