如何在 Javascript 中创建 Address 类的实例?
为什么这段代码不起作用?
var Map;
var MapOptions =
{
credentials: "my-key",
center: new Microsoft.Maps.Location(49.767649, 15.584697),
mapTypeId: Microsoft.Maps.MapTypeId.road,
zoom: 7,
showScalebar: false,
showDashboard: false
};
$(function () {
Map = new Microsoft.Maps.Map($("#AddressMap"), MapOptions);
Microsoft.Maps.loadModule('Microsoft.Maps.Search');
var tmp = new Microsoft.Maps.Search.Address(); // <-- error code
});