Click here to Skip to main content
15,888,401 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a Piece of JavaScript code, that i am wanting to use in a ssis package. I believe it will need to be a script task. I am not sure how to do so however. The JavaScript below, generates an integer that represents the max zoom level for a lat long location on a map. I am wanting to generate this info in a ssis package, that will be used to determine the max zoom i use for a static map i generate.
Thank you!

JavaScript
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);
  });
}
Posted
Updated 20-Jul-11 10:00am
v2

1 solution

A google search would have done you a world of good.

I found this[^] when I googled "ssis javascript".
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900