function init(){ initialize(); } function initialize() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map_canvas")); //alert(); // map.setCenter(new GLatLng(CenterArray[0].y,CenterArray[0].x), 5); map.setCenter(new GLatLng(0,0), 5); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); var baseIcon = new GIcon(G_DEFAULT_ICON); baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png"; baseIcon.iconSize = new GSize(20, 34); baseIcon.shadowSize = new GSize(37, 34); baseIcon.iconAnchor = new GPoint(9, 34); baseIcon.infoWindowAnchor = new GPoint(9, 2); function createMarker(point, index,info) { // Create a lettered icon for this point using our icon class var letter = String.fromCharCode("A".charCodeAt(0) + index); var letteredIcon = new GIcon(baseIcon); if (info=='Center Point') letter = 'A'; letteredIcon.image = "http://www.google.com/mapfiles/marker" + "P" + ".png"; // Set up our GMarkerOptions object markerOptions = { icon:letteredIcon }; if (info=='Center Point')markerOptions = { }; var marker = new GMarker(point, markerOptions); GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml("
" +index+'
'+ info + "
"); }); return marker; } function createMarker2(point, index,info) { // Create a lettered icon for this point using our icon class var letter = String.fromCharCode("A".charCodeAt(0) + index); var letteredIcon = new GIcon(baseIcon); if (info=='Center Point') letter = 'A'; letteredIcon.image = "http://www.vivino.com/images/icons/blue_MarkerE.png"; // Set up our GMarkerOptions object markerOptions = { icon:letteredIcon }; if (info=='Center Point')markerOptions = { }; var marker = new GMarker(point, markerOptions); GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml("
" +index+'
'+ info + "
"); }); return marker; } // map.addOverlay(createMarker(new GLatLng(,),,'Angle=
Winery ID = ')); //show center var polyOptions = {geodesic:false}; //map.addOverlay(createMarker2(new GLatLng(,),0,' ,
Distance excluded =93.3949414692
No of points excluded by tolerance =')); var polygon = new GPolygon([new GLatLng(41.1333333,0.8166667),new GLatLng(41.1416913237,0.823398365094),new GLatLng(41.1499680244,0.82853502239),new GLatLng(41.158163402,0.832076671887),new GLatLng(41.1662774566,0.834023313585),new GLatLng(41.1743101881,0.834374947484),new GLatLng(41.1822615966,0.833131573585),new GLatLng(41.190131682,0.830293191887),new GLatLng(41.1979204444,0.82585980239),new GLatLng(41.2056278837,0.819831405094),new GLatLng(41.213254,0.812208),new GLatLng(41.2173992907,0.810137512204),new GLatLng(41.2209038502,0.80781215503),new GLatLng(41.2237676783,0.805231928477),new GLatLng(41.2259907753,0.802396832545),new GLatLng(41.2275731409,0.799306867234),new GLatLng(41.2285147753,0.795962032545),new GLatLng(41.2288156783,0.792362328477),new GLatLng(41.2284758502,0.78850775503),new GLatLng(41.2274952907,0.784398312204),new GLatLng(41.225874,0.780034),new GLatLng(41.1697065961,0.497200436928),new GLatLng(41.0878243487,0.248730221206),new GLatLng(40.9802272577,0.0346233528327),new GLatLng(40.8469153231,-0.145120168191),new GLatLng(40.6878885448,-0.290500341866),new GLatLng(40.5031469231,-0.401517168191),new GLatLng(40.2926904577,-0.478170647167),new GLatLng(40.0565191487,-0.520460778794),new GLatLng(39.7946329961,-0.528387563072),new GLatLng(39.507032,-0.501951),new GLatLng(39.507032,-0.501951),new GLatLng(39.507032,-0.501951),new GLatLng(39.507032,-0.501951),new GLatLng(39.507032,-0.501951),new GLatLng(39.507032,-0.501951),new GLatLng(39.507032,-0.501951),new GLatLng(39.507032,-0.501951),new GLatLng(39.507032,-0.501951),new GLatLng(39.507032,-0.501951),new GLatLng(39.507032,-0.501951),new GLatLng(39.507032,-0.501951),new GLatLng(39.507032,-0.501951),new GLatLng(39.507032,-0.501951),new GLatLng(39.507032,-0.501951),new GLatLng(39.507032,-0.501951),new GLatLng(39.507032,-0.501951),new GLatLng(39.507032,-0.501951),new GLatLng(39.507032,-0.501951),new GLatLng(39.507032,-0.501951),new GLatLng(39.507032,-0.501951),new GLatLng(39.5071142834,-0.425488561854),new GLatLng(39.5156485704,-0.356617709964),new GLatLng(39.5326348612,-0.295338444327),new GLatLng(39.5580731556,-0.241650764945),new GLatLng(39.5919634538,-0.195554671818),new GLatLng(39.6343057556,-0.157050164945),new GLatLng(39.6851000612,-0.126137244327),new GLatLng(39.7443463704,-0.102815909964),new GLatLng(39.8120446834,-0.0870861618545),new GLatLng(39.888195,-0.078948),new GLatLng(39.8906951747,-0.0147147232756),new GLatLng(39.9000544883,0.0428721586211),new GLatLng(39.9162729409,0.0938126456902),new GLatLng(39.9393505325,0.138106737932),new GLatLng(39.969287263,0.175754435345),new GLatLng(40.0060831325,0.206755737932),new GLatLng(40.0497381409,0.23111064569),new GLatLng(40.1002522883,0.248819158621),new GLatLng(40.1576255747,0.259881276724),new GLatLng(40.221858,0.264297),new GLatLng(40.2632802923,0.401291725767),new GLatLng(40.3157526375,0.520118061364),new GLatLng(40.3792750354,0.62077600679),new GLatLng(40.4538474862,0.703265562045),new GLatLng(40.5394699898,0.767586727131),new GLatLng(40.6361425462,0.813739502045),new GLatLng(40.7438651554,0.84172388679),new GLatLng(40.8626378175,0.851539881364),new GLatLng(40.9924605323,0.843187485767),new GLatLng(41.1333333,0.8166667)],"#F7C4F9", 5, 0.7, "#F7C4F9", 0.7); map.addOverlay(polygon); var bounds = new GLatLngBounds(); var marker = new GMarker(new GLatLng(41.1333333,0.8166667)); bounds.extend(marker.getPoint()); var marker = new GMarker(new GLatLng(41.192623,0.777661)); bounds.extend(marker.getPoint()); var marker = new GMarker(new GLatLng(41.192577,0.774727)); bounds.extend(marker.getPoint()); var marker = new GMarker(new GLatLng(41.19472,0.777633)); bounds.extend(marker.getPoint()); var marker = new GMarker(new GLatLng(41.213254,0.812208)); bounds.extend(marker.getPoint()); var marker = new GMarker(new GLatLng(41.213219,0.810062)); bounds.extend(marker.getPoint()); var marker = new GMarker(new GLatLng(41.225874,0.780034)); bounds.extend(marker.getPoint()); var marker = new GMarker(new GLatLng(41.366269,0.917728)); bounds.extend(marker.getPoint()); var marker = new GMarker(new GLatLng(41.424761,0.859097)); bounds.extend(marker.getPoint()); var marker = new GMarker(new GLatLng(41.677191,0.478547)); bounds.extend(marker.getPoint()); var marker = new GMarker(new GLatLng(41.5312599,1.6234864)); bounds.extend(marker.getPoint()); var marker = new GMarker(new GLatLng(41.315389,2.012393)); bounds.extend(marker.getPoint()); var marker = new GMarker(new GLatLng(40.221858,0.264297)); bounds.extend(marker.getPoint()); var marker = new GMarker(new GLatLng(40.221858,0.264297)); bounds.extend(marker.getPoint()); var marker = new GMarker(new GLatLng(39.888195,-0.078948)); bounds.extend(marker.getPoint()); var marker = new GMarker(new GLatLng(39.507032,-0.501951)); bounds.extend(marker.getPoint()); var marker = new GMarker(new GLatLng(42.372514,2.91938)); bounds.extend(marker.getPoint()); /*alert(0);*/ map.setZoom(map.getBoundsZoomLevel(bounds)-1); map.setCenter(bounds.getCenter()); } /*var txt = "Step 0 - Map is for parent region
"; txt+= "ε =
Warning: Division by zero in /home/vivino/public_html/inc/map2.js.php on line 419
100
"; txt+= "Total points = 0
"; txt+= "Total used points = 17
"; txt+= "Total excluded points = 0
"; txt+= "KM used = 93.3949414692
"; txt+= "Excluded by KM =
"; txt+= "Excluded by tolerance = 0 (0)
"; txt+= "Total control points = 0
"; txt+= "
»Get points from database ...
»Get points from database ...
";*/ }