//= 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 " + "Rhode Island" + "?
"; 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(41.677200,-71.510100); //new GLatLng(47.391700,-121.570800); map.setCenter(center,8); 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.877200,-71.510100)); // GEvent.removeListener(myEvent); }); var label = "Rhode Island"; var color = "#88ff00"; var pts = []; pts[0] = new GLatLng (41.3706,-71.0568); pts[1] = new GLatLng (41.3706,-71.0541); pts[2] = new GLatLng (41.6339,-71.1447); pts[3] = new GLatLng (41.6791,-71.1942); pts[4] = new GLatLng (41.7611,-71.2793); pts[5] = new GLatLng (41.7775,-71.3315); pts[6] = new GLatLng (41.7918,-71.3425); pts[7] = new GLatLng (41.8225,-71.3507); pts[8] = new GLatLng (41.8512,-71.3370); pts[9] = new GLatLng (41.8880,-71.3397); pts[10] = new GLatLng (41.9288,-71.3837); pts[11] = new GLatLng (42.0156,-71.3795); pts[12] = new GLatLng (42.0064,-71.7984); pts[13] = new GLatLng (41.6750,-71.7874); pts[14] = new GLatLng (41.4530,-71.7984); pts[15] = new GLatLng (41.3943,-71.8492); pts[16] = new GLatLng (41.3315,-71.8520); pts[17] = new GLatLng (41.3057,-71.9041); pts[18] = new GLatLng (41.1849,-71.7915); pts[19] = new GLatLng (41.2665,-71.4084); 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."); } } //]]>