Skip to content

Commit

Permalink
Merge pull request #196 from cleanerx/master
Browse files Browse the repository at this point in the history
F: #187 Add gauges and improve control
  • Loading branch information
cleanerx authored Feb 20, 2017
2 parents e5b7bd7 + df0e93e commit 91e1b70
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/js/oseam-models-gauge.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ OSeaM.models.Gauge = Backbone.Model.extend({

},
url: function() {
return OSeaM.apiUrl + '/gauge' ;
return OSeaM.apiUrl + 'gauge' ;
}
});
4 changes: 3 additions & 1 deletion src/js/oseam-views-gauges.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,10 @@ OSeaM.views.Gauges = OSeaM.View.extend({
this.layerGaugeVector
]);
this.map.addControls([
new OpenLayers.Control.PanZoomBar(),
new OpenLayers.Control.Navigation(),
new OpenLayers.Control.Attribution(),
new OpenLayers.Control.KeyboardDefaults()
new OpenLayers.Control.MousePosition()
]);
this.map.setCenter(new OpenLayers.LonLat(0.0, 40.0).transform(
this.projectionWGS84,
Expand Down
3 changes: 2 additions & 1 deletion src/js/oseam-views-maptracks.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ OSeaM.views.MapTracks = OSeaM.View.extend({
this.map.addControls([
this.attributionControl,
new OpenLayers.Control.KeyboardDefaults(),
new OpenLayers.Control.LayerSwitcher()
new OpenLayers.Control.LayerSwitcher(),
new OpenLayers.Control.MousePosition()
]);
this.map.setCenter(new OpenLayers.LonLat(0.0, 40.0).transform(
this.projectionWGS84,
Expand Down
10 changes: 5 additions & 5 deletions src/js/templates/gauge.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@
<div class="control-group">
<p><label class="tableft50">Latitude</label></p>
<div class="input-append">
<input type="text" id="latitude" name="latitude" placeholder="52.0" value="{{lat}}"/>
<input type="text" id="latitude" name="latitude" placeholder="52.0" value="{{latitude}}"/>
<span class="help-inline helpOsm"></span>
</div>
</div>
<div class="control-group">
<p><label class="tableft50">Longitude</label></p>
<div class="input-append">
<input type="text" id="longitude" name="longitude" placeholder="1.0" value="{{lon}}"/>
<input type="text" id="longitude" name="longitude" placeholder="1.0" value="{{longitude}}"/>
<span class="help-inline helpOsm"></span>
</div>
</div>
<!--<div class="control-group">
<p><label class="tableft50">Pegelnullpunkt</label></p>
<div class="control-group">
<p><label class="tableft50">Water Reference Level</label></p>
<div class="input-append">
<input type="text" id="gaugezero" name="gaugezero" placeholder="230" value="{{gaugezero}}"/>
<input type="text" id="waterlevel" name="waterlevel" placeholder="230" value="{{waterlevel}}"/>
<span class="help-inline helpOsm"></span>
</div>
</div>-->
Expand Down
20 changes: 10 additions & 10 deletions src/js/templates/gaugedialog-en.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@
<span class="help-inline helpOsm"></span>
</div>
</div>
<div class="control-group"><p>
<label class="tableft50" for="gaugeType">Gauge Type</label></p>
<div class="input-append">
<select id="gaugeType" name="gaugeType">
<option value="RIVER">River</option>
<option value="LAKE">Lake</option>
<option value="SEA">Sea</option>
<option value="UNDEFINED">Other</option>
</select>
</div>
<div class="control-group">
<p><label class="tableft50" for="gaugeType">Gauge Type</label></p>
<div class="input-append">
<select id="gaugeType" name="gaugeType">
<option value="RIVER">River</option>
<option value="LAKE">Lake</option>
<option value="SEA">Sea</option>
<option value="UNDEFINED">Other</option>
</select>
</div>
</div>
</div>
</div>
Expand Down

0 comments on commit 91e1b70

Please sign in to comment.