我需要像这个JavaScript代码那样提取最大缩放级别,但是在SSIS包中,例如在脚本任务中。但我不知道该怎么做。如何在此脚本任务中引用下面的网页代码来引用库?
var map;
var maxZoomService = new google.maps.MaxZoomService();
var tokyo = new google.maps.LatLng(35.6894875, 139.6917064);
function initialize() {
var mapOptions = {
zoom: 11,
center: tokyo,
mapTypeId: google.maps.MapTypeId.HYBRID
}
map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
google.maps.event.addListener(map, 'click', showMaxZoom);
}
function showMaxZoom(e) {
maxZoomService.getMaxZoomAtLatLng(e.latLng, function(response) {
if (response.status != google.maps.MaxZoomStatus.OK) {
alert("Error in MaxZoomService");
return;
} else {
alert("The maximum zoom at this location is: " + response.zoom);
}
map.setCenter(e.latLng);
});
}
答案 0 :(得分:1)
我对JavaScript知之甚少,但任何与GUI交互或弹出消息框的内容都不适合在服务器上运行的SSIS包中。我会建议以下之一: