var map1; var bounds1; var businesses1; var geocodes1; var cntGeocoded1 = 0; var directionsPanel1; var directions1; var focusedBusiness1; function generateMap1() { if (GBrowserIsCompatible() && document.getElementById("svmap_canvas1") != null) { geocoder1 = new GClientGeocoder(); geocoder1.setCache(null); var mapOptions = { mapTypes:[G_NORMAL_MAP] }; map1 = new GMap2(document.getElementById("svmap_canvas1"), mapOptions); var mapControl = new GMapTypeControl(); map1.addControl(mapControl); map1.addControl(new GSmallZoomControl3D()); map1.disableDoubleClickZoom(); map1.disableScrollWheelZoom(); bounds1 = new GLatLngBounds; map1.setCenter(new GLatLng(11.566144,123.662109), 5); var marker40 = new GIcon(); marker40.image = "http://thermalloys.com/components/com_svmap/markers/apartment-3.png"; marker40.iconSize = new GSize(32,37); marker40.iconAnchor = new GPoint(16,37); marker40.infoWindowAnchor = new GPoint(16,18.5); businesses1 = [[55,marker40,"Sandvik International Trading (Shanghai) Co., Ltd.",31.192776,121.445685,'
China
',"/thermalloys/site/en/thermalloys-worldwide/asia/china/-sandvik-international-trading-shanghai-co-ltd.html",""],[56,marker40,"PT Sandvik Indonesia",-6.24321,106.853848,'
Indonesia
',"/thermalloys/site/en/thermalloys-worldwide/asia/indonesia/pt-sandvik-indonesia.html",""],[57,marker40,"Sandvik Korea Ltd.",35.109197,129.038726,'
South korea
',"/thermalloys/site/en/thermalloys-worldwide/asia/south-korea/sandvik-korea-ltd.html",""],[58,marker40,"Sandvik Korea Ltd.",37.440476,126.90593,'
South Korea - Seol
',"/thermalloys/site/en/thermalloys-worldwide/asia/south-korea/sandvik-korea-ltd-seoul.html",""],[59,marker40,"Qaim Ale Mohammad Trading Co. (Pvt.) Ltd.",33.714059,73.062,'
Pakistan
',"/thermalloys/site/en/thermalloys-worldwide/asia/pakistan/qaim-ale-mohammad-trading-co-pvt-ltd.html",""],[60,marker40,"Sandvik South East Asia Pte. Ltd.",1.379638,104.001431,'
Singapore
',"/thermalloys/site/en/thermalloys-worldwide/asia/singapore/sandvik-south-east-asia-pte-ltd.html",""],[61,marker40,"Assab Steels (Thailand) Ltd.",13.623466,100.700169,'
Thailand
',"/thermalloys/site/en/thermalloys-worldwide/asia/thailand/assab-steels-thailand-ltd.html",""],[62,marker40,"Sandvik South East Asia Pte. Ltd.",15.870032,100.992541,'
Thailand
',"/thermalloys/site/en/thermalloys-worldwide/asia/thailand/sandvik-south-east-asia-pte-ltd.html",""],[63,marker40,"Sandvik Hongkong Ltd.",22.30085,114.168098,'
Hongkong
',"/thermalloys/site/en/thermalloys-worldwide/asia/hongkong/sandvik-hongkong-ltd.html",""],[64,marker40,"Sandvik K.K",34.701366,135.471597,'
Japan - Osaka
',"/thermalloys/site/en/thermalloys-worldwide/asia/japan/sandvik-kk-osaka.html",""],[65,marker40,"Sandvik K.K",35.619022,139.734818,'
Japan - Osaki
',"/thermalloys/site/en/thermalloys-worldwide/asia/japan/sandvik-kk-osaki.html",""],[66,marker40,"Sandvik Malaysia Sdn Bhd.",3.117023,101.634747,'
Malaysia
',"/thermalloys/site/en/thermalloys-worldwide/asia/malaysia/sandvik-malaysia-sdn-bhd.html",""],[67,marker40,"Sandvik South East Asia Pte. Ltd.",12.961736,122.431641,'
Philippines
',"/thermalloys/site/en/thermalloys-worldwide/asia/philippines/sandvik-south-east-asia-pte-ltd.html",""],[69,marker40,"Sandvik Hongkong Ltd.",23.69781,120.960515,'
Taiwan
',"/thermalloys/site/en/thermalloys-worldwide/asia/taiwan/sandvik-hongkong-ltd.html",""],[70,marker40,"Sandvik South East Asia Pte. Ltd.",14.058324,108.277199,'
Vietnam
',"/thermalloys/site/en/thermalloys-worldwide/asia/vietnam/sandvik-south-east-asia-pte-ltd.html",""],[71,marker40,"Sandvik Asia Private Limited",13.106230102044576,77.5909423828125,'
India
',"/thermalloys/site/en/thermalloys-worldwide/asia/india/sandvik-asia-private-limited.html",""]]; addBusinesses1(); } } function setBounds1(bounds) { map1.setZoom(map1.getBoundsZoomLevel(bounds)); map1.setCenter(bounds.getCenter()); } function geocodeBusinesses1() { if (cntGeocoded1 < geocodes1.length) { geocoder1.getLocations(geocodes1[cntGeocoded1][7], addressResolved1); } } function addressResolved1(response) { var delay = 0; if (response.Status.code == 620) { delay = 500; } else { if (response.Status.code == 200) { var address = response.Placemark[0]; geocodes1[cntGeocoded1][3] = address.Point.coordinates[1]; geocodes1[cntGeocoded1][4] = address.Point.coordinates[0]; addBusiness1(geocodes1[cntGeocoded1]); } // Move onto the next address; this skips bad addresses, too. cntGeocoded1 += 1; } window.setTimeout(geocodeBusinesses1, delay); } function addBusinesses1() { for (var i=0; i < businesses1.length; i++) { addBusiness1(businesses1[i]); } } function addBusiness1(business) { var point = new GLatLng(business[3], business[4]); var markerOptions = { icon:business[1], draggable: false, "title":business[2] }; var marker = new GMarker(point, markerOptions); var form = ''; var info = business[5]; info = '