File size: 7,055 Bytes
14b6dbb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Farm Tech System - Zones</title>
  <link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" />
  <style>
    /* Added CSS styles */
    .animate-charcter {
      text-align: center;
      display: flex;
      align-items: center;
      justify-content: center;
      background-image: linear-gradient(
        -225deg,
        #231557 0%,
        #44107a 29%,
        #ff1361 67%,
        #fff800 100%
      );
      background-size: auto auto;
      background-clip: border-box;
      background-size: 200% auto;
      color: #AC3B61;
      background-clip: text;
      text-justify: transparent;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      animation: textclip 2s linear infinite;
      display: inline-block;
      font-size: 80px;
      font-family: Georgia, 'Times New Roman', Times, serif;
      font-weight: bold;
    }

    @keyframes textclip {
      to {
        background-position: center;
      }
    }

    * {
      margin-bottom: 20px;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      align-items: center;
      justify-content: center;
      background: url('{{ url_for('static', filename='backgrnd.jpg') }}') no-repeat center center fixed;
      background-size: cover;
      color: #fff; /* Ensuring the text is readable on a dark background */
    }

    @keyframes scroll {
      0% {
        transform: translateX(0);
      }
      100% {
        transform: translateX(calc(-250px * 7));
      }
    }

    .slider {
      height: 200px;
      margin: auto;
      overflow: hidden;
      position: relative;
      width: auto;
      padding: 0 30px;
    }

    .logo {
      font-family: 'Poppins';
      font-size: 24px;
      text-align: center;
    }

    .navbar {
      margin-top: 20px;
    }

    .nav-links {
      list-style: none;
      padding: 0;
      display: flex;
      justify-content: center;
    }

    .nav-links li {
      margin: 0 15px;
    }

    .nav-links a {
      color: #AC3B61;
      font-weight: bolder;
      font-size: larger;
      text-decoration: none;
    }

    h2 {
      font-size: 24px;
      margin-bottom: 10px;
    }

    p {
      line-height: 1.6;
    }

    .nav-links li:hover a {
      background: rgb(255, 255, 255);
      color: black;
      padding: .25rem .5rem;
      transition: all ease-in 300ms;
      border-radius: 25px;
    }

    .container {
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    .box {
      display: flex;
      justify-content: center;
      flex-wrap: wrap;
    }

    .dream {
      text-align: center;
    }

    .dream .item {
      margin: 10px;
    }

    .dream img {
      display: block;
      margin: 0 auto;
    }

    .dream .item p {
      font-size: 20px; /* Increased font size */
      color: red; /* Changed text color to red */
      margin-top: 10px;
    }

    #map, #zoneMap {
      height: 500px;
      width: 80%;
      margin: 20px auto;
    }

  </style>
</head>
<body>
  <header>
    <h1 class="animate-charcter">Farm Tech System - Zones</h1>
    <!-- Navigation menu -->
    <nav class="navbar">
        <ul class="nav-links">
          <li><a href="home"><i class="fas fa-home"></i> Home</a></li>
          <li><a href="sensors"><i class="fas fa-sensors"></i> Sensors</a></li>
          <li><a href="activity-log"><i class="fas fa-envelope"></i> Activity Log</a></li>

        </ul>
      </nav>
  </header>

  <!-- Zones content -->
  <section>
    <div id="map"></div>
    <div id="zoneMap"></div>
  </section>

  <!-- Footer -->
  <footer>
    <!-- Footer content -->
  </footer>

  <script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
  <script src="https://unpkg.com/leaflet.heat/dist/leaflet-heat.js"></script>
  <script>

    var map = L.map('map').setView([10.3269, 76.9512], 16); // Increased zoom level for closer view



    L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {

      attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'

    }).addTo(map);



    // Add a marker for the tea estate

    L.marker([10.3269, 76.9512]).addTo(map)

      .bindPopup('Tea Estate in Valparai Hills')

      .openPopup();



    // Define the coordinates of the boundary of the tea estate

    var estateBoundary = [

      [10.3275, 76.9500],

      [10.3272, 76.9510],

      [10.3270, 76.9520],

      [10.3268, 76.9525],

      [10.3265, 76.9527],

      [10.3260, 76.9525],

      [10.3255, 76.9520],

      [10.3252, 76.9515],

      [10.3250, 76.9510],

      [10.3252, 76.9505],

      [10.3255, 76.9500],

      [10.3260, 76.9495],

      [10.3265, 76.9492],

      [10.3270, 76.9495]

    ];



    // Add the boundary as a polygon

    L.polygon(estateBoundary, {color: 'red'}).addTo(map)

      .bindPopup('Tea Estate Boundary');



    // Add a heatmap layer

    var heat = L.heatLayer([

      [10.3269, 76.9512, 0.5],  // Example coordinates with intensity

      [10.3270, 76.9520, 0.6],

      [10.3280, 76.9530, 0.7]

    ], {radius: 25}).addTo(map);



    // Additional map for zones

    var zoneMap = L.map('zoneMap').setView([10.3269, 76.9512], 16);



    L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {

      attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'

    }).addTo(zoneMap);



    // Define coordinates for zone boundaries

    var zone1 = [

      [10.3280, 76.9500],

      [10.3280, 76.9515],

      [10.3270, 76.9515],

      [10.3270, 76.9500]

    ];



    var zone2 = [

      [10.3280, 76.9515],

      [10.3280, 76.9530],

      [10.3270, 76.9530],

      [10.3270, 76.9515]

    ];



    var zone3 = [

      [10.3270, 76.9500],

      [10.3270, 76.9515],

      [10.3260, 76.9515],

      [10.3260, 76.9500]

    ];



    var zone4 = [

      [10.3270, 76.9515],

      [10.3270, 76.9530],

      [10.3260, 76.9530],

      [10.3260, 76.9515]

    ];



    // Add zones as polygons

    L.polygon(zone1, {color: 'blue'}).addTo(zoneMap).bindPopup('Zone 1');

    L.polygon(zone2, {color: 'green'}).addTo(zoneMap).bindPopup('Zone 2');

    L.polygon(zone3, {color: 'yellow'}).addTo(zoneMap).bindPopup('Zone 3');

    L.polygon(zone4, {color: 'orange'}).addTo(zoneMap).bindPopup('Zone 4');



    // Add heatmap layers for zones

    var zoneHeatData = [

      // Example heat data for each zone

      [10.3275, 76.9505, 0.5],  // Zone 1

      [10.3275, 76.9525, 0.6],  // Zone 2

      [10.3265, 76.9505, 0.7],  // Zone 3

      [10.3265, 76.9525, 0.8]   // Zone 4

    ];



    L.heatLayer(zoneHeatData, {radius: 25}).addTo(zoneMap);



  </script>
</body>
</html>