如何在第一次加载Bing地图时更改可见的初始位置? 默认情况下,我看到它设置为美国(见图),我想将它设置为东欧(罗马尼亚)。
这是加载地图的代码:
var map = null;
var points = [];
var shapes = [];
var center = null;
function LoadMap(latitude, longitude, onMapLoaded) {
map = new VEMap('theMap');
options = new VEMapOptions();
options.EnableBirdseye = false;
// Makes the control bar less obtrusize.
map.SetDashboardSize(VEDashboardSize.Small);
if (onMapLoaded != null)
map.onLoadMap = onMapLoaded;
if (latitude != null && longitude != null) {
center = new VELatLong(latitude, longitude);
}
map.LoadMap(center, null, null, null, null, null, null, options);
}
答案 0 :(得分:0)
通过添加else
条件来解决此问题:
else {
center = new VELatLong(45.747806, 24.617061);
}