kopia lustrzana https://github.com/projecthorus/chasemapper
Update ring spacing text to m or ft
rodzic
7f50501974
commit
43da488c00
|
@ -145,10 +145,10 @@ def parse_config_file(filename):
|
|||
# Unit Selection
|
||||
|
||||
chase_config['unitselection'] = config.get('units', 'unitselection', fallback='metric')
|
||||
if chase_config['unitselection'] != "imperial":
|
||||
chase_config['unitselection'] = 'metric' #unless imperial is explicitly requested do metric
|
||||
chase_config['switch_miles_feet'] = config.get('units', 'switch_miles_feet', fallback = '400')
|
||||
|
||||
|
||||
|
||||
for i in range(1,_profile_count+1):
|
||||
_profile_section = "profile_%d" % i
|
||||
try:
|
||||
|
|
|
@ -29,6 +29,7 @@ function createRangeRings(position){
|
|||
|
||||
var _radius = _ring_spacing;
|
||||
var _color = "#FF0000";
|
||||
if (chase_config['unitselection'] == "imperial") { _radius = _ring_spacing*0.3048;}
|
||||
|
||||
if(_ring_color == "red"){
|
||||
_color = "#FF0000";
|
||||
|
@ -51,8 +52,8 @@ function createRangeRings(position){
|
|||
opacity: 0.7
|
||||
}).addTo(map);
|
||||
range_rings.push(_ring);
|
||||
|
||||
_radius += _ring_spacing;
|
||||
if (chase_config['unitselection'] == "metric") { _radius += _ring_spacing;}
|
||||
if (chase_config['unitselection'] == "imperial") { _radius += _ring_spacing*0.3048;}
|
||||
}
|
||||
|
||||
range_rings_on = true;
|
||||
|
|
|
@ -280,6 +280,12 @@
|
|||
if (chase_config['unitselection'] == "imperial") { L.control.scale({imperial: true, metric: false}).addTo(map) ;}
|
||||
if (chase_config['unitselection'] == "metric") { L.control.scale({imperial: false, metric: true}).addTo(map) ;}
|
||||
|
||||
|
||||
|
||||
// Units for rings
|
||||
if (chase_config['unitselection'] == "imperial") { document.getElementById("ring_spacing").innerHTML = "Ring Spacing (ft)";}
|
||||
if (chase_config['unitselection'] == "metric") { document.getElementById("ring_spacing").innerHTML = "Ring Spacing (m)";}
|
||||
|
||||
// Add sidebar to map (where all of our controls are!)
|
||||
var sidebar = L.control.sidebar('sidebar').addTo(map);
|
||||
|
||||
|
@ -758,7 +764,7 @@
|
|||
<b>Ring Qty</b><input type="text" class="paramEntry" id="ringQuantity" value="5"><br/>
|
||||
</div>
|
||||
<div class="paramRow">
|
||||
<b>Ring Spacing (m)</b><input type="text" class="paramEntry" id="ringSpacing" value="1000"><br/>
|
||||
<b> <p><p id="ring_spacing">Ring Spacing (m)</p></p></b><input type="text" class="paramEntry" id="ringSpacing" value="1000"><br/>
|
||||
</div>
|
||||
<div class="paramRow">
|
||||
<b>Ring Weight (px)</b><input type="text" class="paramEntry" id="ringWeight" value="2"><br/>
|
||||
|
|
Ładowanie…
Reference in New Issue