// void onLoad() function onLoad(){ // Preliminary object list object_list = new Array(); // infobox state. I assume only one is open at once. infobox = []; // Show all stations by default showOnlyTracker = 0; // Don't zoom and center by default zoomAndCenter = 0; // Well, I hate to make this global but it simplifies events map = new GMap(document.getElementById("map_embed")); // Set us to the Hybrid by default //map.setMapType( G_HYBRID_TYPE ); // Pan arrows map.addControl(new GLargeMapControl()); // Zoom slider map.addControl(new GMapTypeControl()); // Map Scales map.addControl(new GScaleControl()); // Zoom and Center on Indy map.centerAndZoom(new GPoint(-86.1551,39.7684), 7); // Go to specified coords centerByCallsign(''); // Update Lat/Long center status thingy updateMapLatLng(); // Event listeners here be ye GEvent.addListener(map, "movestart", function() { //map.clearOverlays(); }); GEvent.addListener(map, "moveend", function() { updateMapLatLng(); // trackStation(map, document.getElementById("callsign").value); redrawMap(map); }); GEvent.addListener(map, "zoom", function(oldLevel, newLevel) { document.getElementById("message").innerHTML = "
Zoom Level: "+newLevel+"
"; if( newLevel > 8 ){ map.clearOverlays(); //trackStation(map, document.getElementById("callsign").value); } else { //map.setMapType( G_MAP_TYPE ); } }); GEvent.addListener(map, "infowindowclose", function() { infobox['doShow'] = false; }); // Update the station list and draw map updateStations(); } -->