Handle cases where location is not set
This commit is contained in:
parent
888e7de16d
commit
bfc45dc81d
|
|
@ -150,9 +150,8 @@
|
|||
<div class="settingsText">Group by Data Type</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="settingsOptionContainer">
|
||||
<div id="range_ring_column" class="settingsOptionContainer">
|
||||
<div class="infoBlockTitleText">Range Rings</div>
|
||||
</div>
|
||||
<form id="range_ring_form">
|
||||
<div class="rangeOptions">
|
||||
<label><span>Ring Count: </span></label>
|
||||
|
|
@ -170,6 +169,7 @@
|
|||
<button id="range_rings_button" type="button">Set Range Rings</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="map_container">
|
||||
|
|
|
|||
|
|
@ -263,6 +263,7 @@ function initialize() {
|
|||
|
||||
// Set initial element visibility
|
||||
$("#show_map_button").hide();
|
||||
$("#range_ring_column").hide();
|
||||
setColumnVisibility();
|
||||
|
||||
// Initialize other controls
|
||||
|
|
@ -297,29 +298,6 @@ function initialize() {
|
|||
|
||||
$("#altitude_filter_reset_button").click(onResetAltitudeFilter);
|
||||
|
||||
setRangeRings();
|
||||
|
||||
$('#range_rings_button').click(onSetRangeRings);
|
||||
$("#range_ring_form").validate({
|
||||
errorPlacement: function(error, element) {
|
||||
return true;
|
||||
},
|
||||
rules: {
|
||||
ringCount: {
|
||||
number: true,
|
||||
min: 0
|
||||
},
|
||||
baseRing: {
|
||||
number: true,
|
||||
min: 0
|
||||
},
|
||||
ringInterval: {
|
||||
number: true,
|
||||
min: 0
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('#settingsCog').on('click', function() {
|
||||
$('#settings_infoblock').toggle();
|
||||
});
|
||||
|
|
@ -746,6 +724,31 @@ function initialize_map() {
|
|||
feature.setStyle(markerStyle);
|
||||
StaticFeatures.push(feature);
|
||||
|
||||
$('#range_ring_column').show();
|
||||
|
||||
setRangeRings();
|
||||
|
||||
$('#range_rings_button').click(onSetRangeRings);
|
||||
$("#range_ring_form").validate({
|
||||
errorPlacement: function(error, element) {
|
||||
return true;
|
||||
},
|
||||
rules: {
|
||||
ringCount: {
|
||||
number: true,
|
||||
min: 0
|
||||
},
|
||||
baseRing: {
|
||||
number: true,
|
||||
min: 0
|
||||
},
|
||||
ringInterval: {
|
||||
number: true,
|
||||
min: 0
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (SiteCircles) {
|
||||
createSiteCircleFeatures();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -267,12 +267,12 @@ div#loader { z-index: 99; position: absolute; left: 0; top: 0; bottom: 0; right:
|
|||
|
||||
.rangeOptions {
|
||||
width: 170px;
|
||||
padding-bottom: 5px;
|
||||
padding-top: 8px;
|
||||
text-indent: 10px;
|
||||
}
|
||||
|
||||
.set_range_rings_button {
|
||||
padding-top: 5px;
|
||||
padding-top: 8px;
|
||||
}
|
||||
|
||||
select.error, textarea.error, input.error {
|
||||
|
|
|
|||
Loading…
Reference in New Issue