如何在 SSIS 包中使用这段 JavaScript?
我需要像此 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);
});
}
I am needing to extract the max zoom level as this JavaScript code does, but in a SSIS package, such as in a script task. But i do not know how to do this. How do i reference the library as the web page code below does in this script task?
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);
});
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我对 JavaScript 了解不多,但任何与 GUI 交互或弹出消息框的内容都不太适合在服务器上运行的 SSIS 包。我建议采用以下方法之一:
I don't know much about JavaScript, but anything that interacts with a GUI or pops up a message box will not fit well into an SSIS package running on a server. I would suggest one of the following: