//= 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 " + "New Jersey" + "?
"; 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.314000,-74.508900); //new GLatLng(47.391700,-121.570800); map.setCenter(center,7); 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(40.714000,-74.508900)); // GEvent.removeListener(myEvent); }); var label = "New Jersey"; var color = "#88ff00"; var pts = []; pts[0] = new GLatLng (41.3572,-74.6950); pts[1] = new GLatLng (41.3394,-74.6559); pts[2] = new GLatLng (40.9934,-73.8940); pts[3] = new GLatLng (40.8398,-73.9586); pts[4] = new GLatLng (40.7691,-74.0094); pts[5] = new GLatLng (40.6994,-74.0231); pts[6] = new GLatLng (40.6786,-74.0437); pts[7] = new GLatLng (40.6515,-74.0808); pts[8] = new GLatLng (40.6421,-74.1357); pts[9] = new GLatLng (40.6452,-74.1962); pts[10] = new GLatLng (40.5952,-74.2003); pts[11] = new GLatLng (40.5566,-74.2195); pts[12] = new GLatLng (40.4877,-74.2552); pts[13] = new GLatLng (40.4762,-74.2264); pts[14] = new GLatLng (40.5253,-73.9503); pts[15] = new GLatLng (40.4846,-73.8885); pts[16] = new GLatLng (40.0045,-73.9352); pts[17] = new GLatLng (39.6131,-74.0410); pts[18] = new GLatLng (39.4744,-74.2209); pts[19] = new GLatLng (38.9882,-74.6713); pts[20] = new GLatLng (38.8664,-74.8553); pts[21] = new GLatLng (38.8472,-75.0476); pts[22] = new GLatLng (39.0565,-75.1685); pts[23] = new GLatLng (39.2525,-75.3250); pts[24] = new GLatLng (39.4500,-75.5544); pts[25] = new GLatLng (39.4966,-75.5612); pts[26] = new GLatLng (39.4998,-75.5283); pts[27] = new GLatLng (39.5411,-75.5338); pts[28] = new GLatLng (39.5761,-75.5090); pts[29] = new GLatLng (39.6237,-75.5708); pts[30] = new GLatLng (39.6713,-75.5104); pts[31] = new GLatLng (39.7167,-75.4843); pts[32] = new GLatLng (39.8033,-75.4156); pts[33] = new GLatLng (39.8360,-75.2632); pts[34] = new GLatLng (39.8823,-75.1918); pts[35] = new GLatLng (40.1180,-74.7922); pts[36] = new GLatLng (40.1390,-74.7331); pts[37] = new GLatLng (40.2565,-74.8485); pts[38] = new GLatLng (40.3361,-74.9419); pts[39] = new GLatLng (40.4020,-74.9721); pts[40] = new GLatLng (40.4240,-75.0627); pts[41] = new GLatLng (40.4898,-75.0613); pts[42] = new GLatLng (40.5733,-75.1067); pts[43] = new GLatLng (40.5639,-75.2138); pts[44] = new GLatLng (40.6192,-75.2028); pts[45] = new GLatLng (40.6494,-75.2069); pts[46] = new GLatLng (40.8284,-75.0806); pts[47] = new GLatLng (40.8429,-75.0998); pts[48] = new GLatLng (40.8689,-75.0504); pts[49] = new GLatLng (40.9913,-75.1369); pts[50] = new GLatLng (41.2293,-74.8677); pts[51] = new GLatLng (41.3479,-74.7537); pts[52] = new GLatLng (41.3469,-74.7249); pts[53] = new GLatLng (41.3593,-74.6960); 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."); } } //]]>