//= 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 " + "Pennsylvania" + "?
"; 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(40.577300,-77.264000); //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(41.577300,-77.264000)); // GEvent.removeListener(myEvent); }); var label = "Pennsylvania"; var color = "#88ff00"; var pts = []; pts[0] = new GLatLng (42.3261,-80.5174); pts[1] = new GLatLng (42.3961,-80.0821); pts[2] = new GLatLng (42.5167,-79.7621); pts[3] = new GLatLng (42.0003,-79.7607); pts[4] = new GLatLng (41.9983,-75.3580); pts[5] = new GLatLng (41.9431,-75.2673); pts[6] = new GLatLng (41.8696,-75.1794); pts[7] = new GLatLng (41.7713,-75.0586); pts[8] = new GLatLng (41.6729,-75.0366); pts[9] = new GLatLng (41.6021,-75.0641); pts[10] = new GLatLng (41.5086,-74.9927); pts[11] = new GLatLng (41.4283,-74.7935); pts[12] = new GLatLng (41.3933,-74.7070); pts[13] = new GLatLng (41.2282,-74.8608); pts[14] = new GLatLng (40.9830,-75.1355); pts[15] = new GLatLng (40.8554,-75.0490); pts[16] = new GLatLng (40.6806,-75.1904); pts[17] = new GLatLng (40.5639,-75.2124); pts[18] = new GLatLng (40.5743,-75.1025); pts[19] = new GLatLng (40.5013,-75.0600); pts[20] = new GLatLng (40.4208,-75.0655); pts[21] = new GLatLng (40.4072,-74.9776); pts[22] = new GLatLng (40.3392,-74.9432); pts[23] = new GLatLng (40.2628,-74.8389); pts[24] = new GLatLng (40.1495,-74.7221); pts[25] = new GLatLng (39.9592,-75.0929); pts[26] = new GLatLng (39.8370,-75.2577); pts[27] = new GLatLng (39.8128,-75.4321); pts[28] = new GLatLng (39.8317,-75.6477); pts[29] = new GLatLng (39.7199,-75.7892); pts[30] = new GLatLng (39.7220,-80.5243); pts[31] = new GLatLng (42.3240,-80.5202); 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."); } } //]]>