Skip to content

Commit

Permalink
Location search fix: Correct the order in which bbox coords are passed
Browse files Browse the repository at this point in the history
  • Loading branch information
kristallizer committed Aug 5, 2014
1 parent f0928a0 commit 63534d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions templates/sample.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ <h3>Sample {{sample.number}}</h3>
<td class="sample_value">{{sample.public_data}}</td>
</tr>
<tr>
<td class="sample_label">Longitude</td>
<td class="sample_label">Latitude</td>
<td class="sample_value">{{location.1}}</td>
</tr>
<tr>
<td class="sample_label">Latitude</td>
<td class="sample_label">Longitude</td>
<td class="sample_value">{{location.0}}</td>
</tr>
<tr>
Expand Down
8 changes: 4 additions & 4 deletions templates/search_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ <h3>Location</h3>
<label for="bounds">NE Long: </label>
<input type="text" onchange="updateBounds()" placeholder="Enter lat/long value" id="ne-long" class="latlong" ><br>

<label for="bounds">SW Long: </label>
<label for="bounds">SW Lat: </label>
<input type="text" onchange="updateBounds()" placeholder="Enter lat/long value" id="sw-lat" class="latlong" >

<label for="bounds">SW Long: </label>
Expand Down Expand Up @@ -406,7 +406,7 @@ <h4 class="panel-title">
document.getElementById("sw-lat").value = sw.lat().toString();
document.getElementById("sw-long").value = sw.lng().toString();

document.getElementById("location-bound").value = sw.lat() + "," + sw.lng() + ","+ ne.lat() + "," + ne.lng();
document.getElementById("location-bound").value = sw.lng() + "," + sw.lat() + ","+ ne.lng() + "," + ne.lat();

updateLocation();
//Update Location in search summary
Expand All @@ -426,7 +426,7 @@ <h4 class="panel-title">
document.getElementById("sw-lat").value = sw.lat().toString();
document.getElementById("sw-long").value = sw.lng().toString();

document.getElementById("location-bound").value = ne.lat() + "," + ne.lng() + ","+ sw.lat() + "," + sw.lng();
document.getElementById("location-bound").value = sw.lng() + "," + sw.lat() + ","+ ne.lng() + "," + ne.lat();

//Update Location in search summary
var searchOptions = document.getElementById("search-options-location");
Expand Down Expand Up @@ -461,7 +461,7 @@ <h4 class="panel-title">
//http://stackoverflow.com/questions/15536241/how-to-get-4-vertex-coordinates-from-gmaps-rectangle-overlay
var nw = new google.maps.LatLng(ne.lat(),sw.lng());
var se = new google.maps.LatLng(sw.lat(),ne.lng());
var polygon = sw.lat().toString() + ',' + sw.lng().toString() + ',' + ne.lat().toString() + ',' + ne.lng().toString();
var polygon = sw.lng().toString() + ',' + sw.lat().toString() + ',' + ne.lng().toString() + ',' + ne.lat().toString();



Expand Down

0 comments on commit 63534d8

Please sign in to comment.