//= y)) || ((this.getVertex(j).lat() < y) && (this.getVertex(i).lat() >= y)) ) { if ( this.getVertex(i).lng() + (y - this.getVertex(i).lat()) / (this.getVertex(j).lat()-this.getVertex(i).lat()) * (this.getVertex(j).lng() - this.getVertex(i).lng())"; popHTML += "
"; popHTML += ""; popHTML += "
Want to Save up to $600
"; popHTML += "
on Auto Insurance
"; popHTML += "
in " + "South Dakota" + "?
"; popHTML += "
Enter your Zip Code:
"; popHTML += ""; popHTML += "
"; var map = new GMap2(document.getElementById("map")); var topRight = new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(0,0)); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl(),topRight); map.addControl(new GOverviewMapControl(), new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(5, 5))); var center = new GLatLng(44.285300,-99.463200); //new GLatLng(47.391700,-121.570800); map.setCenter(center,6); myIcon = new GIcon(); // marker image myIcon.image ="http://www.autoquotenow.com/images/marker.png"; myIcon.iconSize = new GSize(45, 17); myIcon.iconAnchor = new GPoint(45, 17); myIcon.infoWindowAnchor = new GPoint(43,17); var marker = new GMarker(center, myIcon) map.addOverlay(marker); var myEvent = GEvent.addListener(marker,"mouseover", function() { marker.openInfoWindowHtml(popHTML); map.panTo(new GLatLng(45.285300,-99.463200)); // GEvent.removeListener(myEvent); }); var label = "South Dakota"; var color = "#88ff00"; var pts = []; pts[0] = new GLatLng (45.9435,-104.0501); pts[1] = new GLatLng (43.0026,-104.0529); pts[2] = new GLatLng (42.9946,-98.4993); pts[3] = new GLatLng (42.9283,-98.4444); pts[4] = new GLatLng (42.8438,-98.1958); pts[5] = new GLatLng (42.7773,-98.0571); pts[6] = new GLatLng (42.7631,-97.9761); pts[7] = new GLatLng (42.8599,-97.8566); pts[8] = new GLatLng (42.8518,-97.2290); pts[9] = new GLatLng (42.8075,-97.2057); pts[10] = new GLatLng (42.7157,-96.8486); pts[11] = new GLatLng (42.5237,-96.6220); pts[12] = new GLatLng (42.4772,-96.4806); pts[13] = new GLatLng (42.7299,-96.6289); pts[14] = new GLatLng (43.0046,-96.5039); pts[15] = new GLatLng (43.1331,-96.4380); pts[16] = new GLatLng (43.2262,-96.5561); pts[17] = new GLatLng (43.3841,-96.5259); pts[18] = new GLatLng (43.4848,-96.6138); pts[19] = new GLatLng (43.4998,-96.4558); pts[20] = new GLatLng (45.2981,-96.4545); pts[21] = new GLatLng (45.4601,-96.7429); pts[22] = new GLatLng (45.6160,-96.8472); pts[23] = new GLatLng (45.8202,-96.5849); pts[24] = new GLatLng (45.9311,-96.5643); pts[25] = new GLatLng (45.9416,-104.0501); var poly = new GPolygon(pts,"#333399",3,1,color,.1); polys.push(poly); labels.push(label); map.addOverlay(poly); } else { alert("Sorry, Google Maps is not compatible with this browser."); } } //]]>