Permalink
Browse files

Merge branch 'master' of github.com:hahuang65/geocamCoverWeb

  • Loading branch information...
2 parents 6d2616a + e58ab59 commit b730f0d69dd848390f79a3ce7c4f297c2090bf8a Howard Huang committed Jul 14, 2011
Showing with 26 additions and 25 deletions.
  1. +12 −20 geocamCover/static/javascripts/app.js
  2. +13 −4 geocamCover/templates/geocamCover/index.html
  3. +1 −1 geocamUtilWeb
View
32 geocamCover/static/javascripts/app.js
@@ -65,8 +65,6 @@ $(document).ready(function () {
isiPad = navigator.userAgent.match(/iPad/i) != null;
jQuery("title").html("GeoCam Cover");
- initiateGeolocation();
- //setInterval("refreshGps()", 5000);
selectedView = requestView;
populateCategories();
@@ -123,6 +121,8 @@ $(document).ready(function () {
addMarker(place);
});
});
+ setTimeout("initiateGeolocation()", 1000);
+ setInterval("refreshGps()", 5000);
}
});
@@ -590,32 +590,24 @@ function handleErrors(error) {
}
function handleGeolocationQuery(position) {
- var firstCall = true;
-
- if (myMarker) {
- if (markerCluster)
- markerCluster.removeMarker(myMarker);
- myMarker.setVisible(false);
- }
var myLocation = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
- $("#map_canvas").gmap('addMarker', {
+
+ if (myMarker) {
+ myMarker.setPosition(myLocation);
+ } else {
+ $("#map_canvas").gmap('addMarker', {
'position': myLocation,
'title': "You are here",
- 'icon': "/static/images/youAreHere.png"
+ 'icon': "/static/images/youAreHere.png",
+ 'zIndex' : 1000
}, function(map, marker) {
myMarker = marker;
- });
-
- if (markerCluster)
- markerCluster.addMarker(myMarker);
-
- if (firstCall) {
- firstCall = false;
- $('#map_canvas').gmap({
+ });
+ $('#map_canvas').gmap({
'center': myLocation
});
- }
+ }
}
function loadFusionData(id) {
View
17 geocamCover/templates/geocamCover/index.html
@@ -153,10 +153,19 @@ <h1 class='page-h1' id='report-name-h1'></h1>
</div>
<div>
<b class="label">Percent Completed:</b><br/>
-
- <div>
- <input type="range" name="points" min="0" max="100" value="0" class="percent-completed"/>
- </div>
+ <select class="percent-completed">
+ <option value="0">0 %</option>
+ <option value="10">10 %</option>
+ <option value="20">20 %</option>
+ <option value="30">30 %</option>
+ <option value="40">40 %</option>
+ <option value="50">50 %</option>
+ <option value="60">60 %</option>
+ <option value="70">70 %</option>
+ <option value="80">80 %</option>
+ <option value="90">90 %</option>
+ <option value="100">100 %</option>
+ </select>
</div>
<div>
<b class="label">Notes:</b><br/>
2 geocamUtilWeb
@@ -1 +1 @@
-Subproject commit c4a73dddbab1a6323d423a07b05fd92530b9308f
+Subproject commit bea217ab6d178a70aaf0ed60a3afbd6e0b2a92f0

0 comments on commit b730f0d

Please sign in to comment.