Current cursor position shown, also finalised selection launch pos from map closes #9
rodzic
8209d2dbbe
commit
611143195b
|
@ -96,6 +96,9 @@ function initialize() {
|
|||
});
|
||||
// plot the initial launch location
|
||||
plotClick();
|
||||
google.maps.event.addListener(map, 'mousemove', function(event) {
|
||||
showMousePos(event.latLng);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
@ -121,7 +124,13 @@ function initialize() {
|
|||
|
||||
<div id="scenario_info" class="box">
|
||||
<h1>Scenario Information</h1>
|
||||
<span id="cursor_info">Lat: <span id="cursor_lat"></span> Lon: <span id="cursor_lon"></span></span><br />
|
||||
<span id="cursor_info">Current mouse position:
|
||||
Lat: <span id="cursor_lat">?</span>
|
||||
Lon: <span id="cursor_lon">?</span>
|
||||
</span><br />
|
||||
<span id="cursor_pred">
|
||||
Put stuff here
|
||||
</span><br />
|
||||
<a><span id="showHideDebug">Show Debug</span></a></span> |
|
||||
<a><span id="showHideForm">Hide Launch Card</span></a></span>
|
||||
</div>
|
||||
|
|
|
@ -33,6 +33,11 @@ function populateFormByUUID(pred_uuid) {
|
|||
}, 'json');
|
||||
}
|
||||
|
||||
function showMousePos(GLatLng) {
|
||||
$("#cursor_lat").html(GLatLng.lat().toFixed(4));
|
||||
$("#cursor_lon").html(GLatLng.lng().toFixed(4));
|
||||
}
|
||||
|
||||
function handlePred(pred_uuid) {
|
||||
$("#prediction_status").html("Searching for wind data...");
|
||||
$("#input_form").hide("slide", { direction: "down" }, 500);
|
||||
|
|
Ładowanie…
Reference in New Issue