| Revision 359,
1.7 KB
checked in by jdalbey, 7 years ago
(diff) |
|
Add EINotebook source
|
-
Property svn:executable set to
*
|
| Line | |
|---|
| 1 | incidentNames = ["Default", "Find Incident...", "181 - Tomato Truck Spill", |
|---|
| 2 | "182 - Haytruck Crash", "183 - Car Stalled on Freeway"]; |
|---|
| 3 | |
|---|
| 4 | /** |
|---|
| 5 | * Set up the maps. |
|---|
| 6 | */ |
|---|
| 7 | function setupMaps() |
|---|
| 8 | { |
|---|
| 9 | showMap("Google Map"); |
|---|
| 10 | } |
|---|
| 11 | |
|---|
| 12 | /** |
|---|
| 13 | * Set up Google Maps. |
|---|
| 14 | */ |
|---|
| 15 | function setupGoogleMaps() |
|---|
| 16 | { |
|---|
| 17 | showIncident("Default"); |
|---|
| 18 | } |
|---|
| 19 | |
|---|
| 20 | /** |
|---|
| 21 | * Shows an incident on Google maps |
|---|
| 22 | * @param incident Incident name |
|---|
| 23 | */ |
|---|
| 24 | function showIncident(incident) |
|---|
| 25 | { |
|---|
| 26 | for (var x = 0; x < incidentNames.length; x++) |
|---|
| 27 | { |
|---|
| 28 | document.getElementById(incidentNames[x]).style.display = "none"; |
|---|
| 29 | } |
|---|
| 30 | document.getElementById(incident).style.display = "inline"; |
|---|
| 31 | } |
|---|
| 32 | |
|---|
| 33 | /** |
|---|
| 34 | * Shows a map |
|---|
| 35 | * @param map Map name |
|---|
| 36 | */ |
|---|
| 37 | function showMap(map) |
|---|
| 38 | { |
|---|
| 39 | currentMap = map; |
|---|
| 40 | if (map == "Google Map") |
|---|
| 41 | { |
|---|
| 42 | document.getElementById("imap").checked=true; |
|---|
| 43 | document.getElementById("googleMapContent").style.display = "inline"; |
|---|
| 44 | document.getElementById("atmsMapContent").style.display = "none"; |
|---|
| 45 | // document.getElementById("mapSelect").innerHTML = |
|---|
| 46 | // "<table><tr>" + |
|---|
| 47 | // "<td><button disabled=true class=mapButton>Incident Map</button></td><td>" + |
|---|
| 48 | // "<td><button onClick=\"showMap(\'ATMS Map\')\" class=mapButton>ATMS Map</button></td>" + |
|---|
| 49 | // "</tr></table>"; |
|---|
| 50 | } |
|---|
| 51 | else if (map == "ATMS Map") |
|---|
| 52 | { |
|---|
| 53 | document.getElementById("amap").checked=true; |
|---|
| 54 | document.getElementById("googleMapContent").style.display = "none"; |
|---|
| 55 | document.getElementById("atmsMapContent").style.display = "inline"; |
|---|
| 56 | // document.getElementById("mapSelect").innerHTML = |
|---|
| 57 | // "<table><tr>" + |
|---|
| 58 | // "<td><button onClick=\"showMap(\'Google Map\')\" class=mapButton>Incident Map</button></td><td>" + |
|---|
| 59 | // "<td><button disabled=true class=mapButton>ATMS Map</button></td>" + |
|---|
| 60 | // "</tr></table>"; |
|---|
| 61 | } |
|---|
| 62 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.