Skip to content

Commit c7672ab

Browse files
committed
Merge branch 'crop-layer'
2 parents 23a9eea + 00704da commit c7672ab

File tree

4 files changed

+12
-32
lines changed

4 files changed

+12
-32
lines changed

app/angular/templates/choropleth.controller.js

+1-24
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cropApp.controller('choroplethCtrl', function($scope) {
22
$scope.mapInfo = [
33
{
44
mapName: "Land Capability",
5-
mapDescription: "Land Capability Classification is a measure of the suitability of soils for field crops. The classification system was developed by the US Department of Agriculture to inform farm planning and soil manament. Soil is divided into eight capability classes, ranging from Class 1 (soils have slight limitations that restrict agricultural use) to Class 8 (soils or area are unsuitable for agriculture). With proper management, soils in classes 1-4 can be utilized to grow crops with long-term productivity, while soils in classes 4-8 are not suitable for commercial crop production and are best used for pasture, forestland, or non-agricultural uses. Soils are classified for both irrigated and non-irrigated agriculture; the 'Land Capability' map on crop compass shows the soil classification for Oregon land suitable for growing commercial crops with irrigation. See [UDEL] for more information about each class."
5+
mapDescription: "Land Capability Classification is a measure of the suitability of soils for field crops (developed by USDA). Soil is divided into eight capability classes, ranging from Class 1 (soils have slight limitations that restrict agricultural use) to Class 8 (soils or area are unsuitable for agriculture). With proper management, soils in classes 1-4 can be utilized to grow crops with long-term productivity, while soils in classes 4-8 are not suitable for commercial crop production and are best used for pasture, forestland, or non-agricultural uses."
66
},
77
{
88
mapName: "Where crops are growing",
@@ -18,27 +18,4 @@ cropApp.controller('choroplethCtrl', function($scope) {
1818
$scope.currentMapName = $scope.mapInfo[index].mapName;
1919
$scope.currentMapDescription = $scope.mapInfo[index].mapDescription;
2020
};
21-
22-
// $scope.currentMap = 'assets/images/maps/oregon_county_outlines-simplified-aligned.svg';
23-
// $scope.currentMapDescription = '';
24-
//
25-
// $scope.maps = [
26-
// {
27-
// mapURL: 'assets/images/maps/oregon_county_outlines-simplified-aligned.svg',
28-
// mapDescription: 'Veggies es county lines lorem ipsum vos postulo essum magis kohlrabi.'
29-
// },
30-
// {
31-
// mapURL: 'assets/images/maps/irrigatedlandcapability_range-simplified-aligned.svg',
32-
// mapDescription: 'Veggies es land capability lorem ipsum vos postulo essum magis kohlrabi.'
33-
// },
34-
// {
35-
// mapURL: 'assets/images/maps/all_crops_from_CDL_2012-simplified-aligned.svg',
36-
// mapDescription: 'Veggies es where crops can grow lorem ipsum vos postulo essum magis kohlrabi.'
37-
// }
38-
// ];
39-
//
40-
// $scope.selectMap = function(index) {
41-
// $scope.currentMap = $scope.maps[index].mapURL;
42-
// $scope.currentMapDescription = $scope.maps[index].mapDescription;
43-
// };
4421
});

app/angular/templates/choropleth.html

+9-6
Original file line numberDiff line numberDiff line change
@@ -31,27 +31,30 @@ <h5>Irrigation Capability</h5>
3131
<div ng-show="toggleCropsGrowing" class="all-crops-legend">
3232
<ul>
3333
<li>
34-
<div class="legend-box" id="crop-legend-box"></div> All Field Crops
34+
<div class="legend-box" id="crop-legend-box"></div> All Field Crops
3535
</li>
3636
</ul>
3737
</div>
3838
<div ng-show="selection" >
3939
<ul>
4040
<li>
41-
<div class="legend-box" id="selected-crop-legend-box"></div> {{selection.commodity.CDL_name}}
41+
<div class="legend-box" id="selected-crop-legend-box"></div>
42+
<span ng-hide="!selection || selection.commodity.CDL_name === 'any'">{{selection.commodity.CDL_name}}</span>
4243
</li>
4344
</ul>
4445
</div>
4546
</div>
46-
<!-- <img ng-show="toggleIrrigated" src="assets/images/maps/legends/irrigatedlandcapability_range_legend.png" alt="" /> -->
4747
</div>
4848
<div class="overlay-wrapper col-xs-12 col-sm-8 col-md-8 col-lg-8">
49-
<img src="assets/images/maps/county_outlines-aligned.png" alt="temporary map" height="400" />
49+
<img src="assets/images/maps/county_outlines-aligned.png" alt="county outlines map" height="400" />
5050
<div class="irrigated-map col-xs-12 col-sm-12 col-md-12 col-lg-12">
51-
<img ng-show="toggleIrrigated" src="assets/images/maps/irrigatedlandcapability_range-aligned.png" alt="temporary map" height="400" />
51+
<img ng-show="toggleIrrigated" src="assets/images/maps/irrigatedlandcapability_range-aligned.png" alt="land capability map" height="400" />
5252
</div>
5353
<div class="crops-map col-xs-12 col-sm-12 col-md-12 col-lg-12">
54-
<img ng-show="toggleCropsGrowing" src="assets/images/maps/all_crops_from_CDL_2012-aligned.png" alt="temporary map" height="400" />
54+
<img ng-show="toggleCropsGrowing" src="assets/images/maps/all_crops_from_CDL_2012-aligned.png" alt="all crops map" height="400" />
55+
</div>
56+
<div class="selected-crop-map col-xs-12 col-sm-12 col-md-12 col-lg-12">
57+
<img ng-src="http://beta.cropcompass.org/assets/images/maps/CDL/{{selection.commodity.CDL_name}}.svg" height="400" />
5558
</div>
5659
</div>
5760
<div id="choropleth-type-selectors" class="col-xs-2 col-sm-2 col-md-2 col-lg-2">

app/assets/css/main.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ table {
312312

313313
.overlay-wrapper {
314314
position: relative; }
315-
.overlay-wrapper .irrigated-map, .overlay-wrapper .crops-map {
315+
.overlay-wrapper .irrigated-map, .overlay-wrapper .crops-map, .overlay-wrapper .selected-crop-map {
316316
top: 0;
317317
left: 0;
318318
z-index: 10;

app/assets/scss/_choropleth.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
.overlay-wrapper {
4242
position: relative;
43-
.irrigated-map,.crops-map {
43+
.irrigated-map,.crops-map,.selected-crop-map {
4444
top: 0;
4545
left: 0;
4646
z-index: 10;

0 commit comments

Comments
 (0)