Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (32 sloc) 1.27 KB
<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAA6pufwtKVT5UNIviqu6yd1hSYNR3XdISehLq1e-oyoIp6i-jf2hTT4yRTY-Z0krx1l52ysUCOyw0RUA"
type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
_spBodyOnLoadFunctionNames.push("initialize");
_spBodyOnUnLoadFunctionNames.push("GUnload");
var map;
var geocoder;
var bounds;
function initialize() {
map = new GMap2(document.getElementById("map_canvas"));
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng(39, -98), 3);
map.clearOverlays();
bounds = new GLatLngBounds();
AddMarkers();
}
// showLocation() adds a marker to the map at that location.
function showLocation(firstname, latitude, longitude) {
point = new GLatLng(latitude,longitude);
bounds.extend(point);
marker = new GMarker(point);
map.addOverlay(marker);
marker.bindInfoWindowHtml(firstname + '<br>' +
'<b>Location:</b> ' + latitude + ', ' + longitude);
map.setZoom(map.getBoundsZoomLevel(bounds));
map.setCenter(bounds.getCenter());
}
//]]>
</script>
<div id="map_canvas" style="width: 500px; height: 300px"></div>
You can’t perform that action at this time.