// JavaScript Document
google.load('maps', '2');
function initialize() {
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(40.364045,-74.651262), 12);

// The following line makes the map Earth-enabled by adding the
// "Earth" button to the map type control.  Note that you still
// need to add a map type control (GMapTypeControl,
// GMenuMapTypeControl, or GHierarchicalMapTypeControl) to the
// the map (as is done below) for the "Earth" button and the rest
// of the map type buttons to show up at all.
// Also, be sure you are loading v=2.x of the Maps API and not
// v=2, otherwise the G_SATELLITE_3D_MAP map type will not
// work properly.
map.addMapType(G_SATELLITE_3D_MAP);

map.addControl(new GHierarchicalMapTypeControl());
map.addControl(new GLargeMapControl());

var marker = new GMarker(new GLatLng(40.364045,-74.651262));
GEvent.addListener(marker, "click", function() {
var html = '<div style="width: 210px; padding-right: 10px">
<div style="font-size:14px;color#000000;"><b>AutoCAD Architectural</b></div>
 <br/>301 N. Harrison Street,<br/>#414 Princeton,<br/>NJ 08540<br/></div>';
marker.openInfoWindowHtml(html);
});
map.addOverlay(marker);
GEvent.trigger(marker, "click");

var polyline = new GPolyline([
new GLatLng(40.364045,-74.651262),
new GLatLng(40.364045,-74.651262),
new GLatLng(40.364045,-74.651262),
new GLatLng(40.364045,-74.651262)
], "#ff0000", 10);
GEvent.addListener(polyline, "click", function(latlng) {
var html = '<div style="width: 210px; padding-right: 10px">A polyline.</div>';
map.openInfoWindowHtml(latlng, html);
});
map.addOverlay(polyline);
}

