rajkhanke commited on
Commit
e43a9f1
·
verified ·
1 Parent(s): 86ca56f

Update templates/index1.html

Browse files
Files changed (1) hide show
  1. templates/index1.html +0 -8
templates/index1.html CHANGED
@@ -128,7 +128,6 @@
128
  L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
129
  attribution: '© OpenStreetMap contributors'
130
  }).addTo(map);
131
-
132
  var marker;
133
  // Update latitude and longitude inputs when clicking on the map
134
  map.on('click', function(e) {
@@ -142,7 +141,6 @@
142
  marker = L.marker(e.latlng).addTo(map);
143
  }
144
  });
145
-
146
  // Use current geolocation
147
  $('#current-location').on('click', function() {
148
  if (navigator.geolocation) {
@@ -163,7 +161,6 @@
163
  alert("Geolocation is not supported by this browser.");
164
  }
165
  });
166
-
167
  // Location search using OpenStreetMap Nominatim API
168
  $('#search-btn').on('click', function() {
169
  var query = $('#location-search').val();
@@ -196,12 +193,10 @@
196
  }
197
  });
198
  });
199
-
200
  // Global variables to store soil report data for later analysis
201
  window.soilReportData = null;
202
  window.currentLat = null;
203
  window.currentLon = null;
204
-
205
  // Fetch soil report from the backend
206
  $('#fetch-report').on('click', function() {
207
  var lat = $('#lat').val();
@@ -227,7 +222,6 @@
227
  classificationHtml += '</tbody></table>';
228
  }
229
  $('#classification-report').html(classificationHtml);
230
-
231
  // Build Soil Properties HTML with a Description column
232
  var propertiesHtml = '<h3 class="text-2xl font-bold text-green-700 mb-4">Soil Properties</h3>';
233
  propertiesHtml += '<table class="min-w-full table-custom border-collapse mb-4"><thead class="bg-green-100"><tr><th class="border border-green-300">Parameter</th><th class="border border-green-300">Value</th><th class="border border-green-300">Unit</th><th class="border border-green-300">Description</th></tr></thead><tbody>';
@@ -236,7 +230,6 @@
236
  });
237
  propertiesHtml += '</tbody></table>';
238
  $('#properties-report').html(propertiesHtml);
239
-
240
  // Store report data for later analysis and reveal the report section
241
  window.soilReportData = response;
242
  window.currentLat = lat;
@@ -249,7 +242,6 @@
249
  }
250
  });
251
  });
252
-
253
  // Analyze soil and render Gemini analysis response in Markdown
254
  $('#analyze-soil').on('click', function() {
255
  if (!window.soilReportData) {
 
128
  L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
129
  attribution: '© OpenStreetMap contributors'
130
  }).addTo(map);
 
131
  var marker;
132
  // Update latitude and longitude inputs when clicking on the map
133
  map.on('click', function(e) {
 
141
  marker = L.marker(e.latlng).addTo(map);
142
  }
143
  });
 
144
  // Use current geolocation
145
  $('#current-location').on('click', function() {
146
  if (navigator.geolocation) {
 
161
  alert("Geolocation is not supported by this browser.");
162
  }
163
  });
 
164
  // Location search using OpenStreetMap Nominatim API
165
  $('#search-btn').on('click', function() {
166
  var query = $('#location-search').val();
 
193
  }
194
  });
195
  });
 
196
  // Global variables to store soil report data for later analysis
197
  window.soilReportData = null;
198
  window.currentLat = null;
199
  window.currentLon = null;
 
200
  // Fetch soil report from the backend
201
  $('#fetch-report').on('click', function() {
202
  var lat = $('#lat').val();
 
222
  classificationHtml += '</tbody></table>';
223
  }
224
  $('#classification-report').html(classificationHtml);
 
225
  // Build Soil Properties HTML with a Description column
226
  var propertiesHtml = '<h3 class="text-2xl font-bold text-green-700 mb-4">Soil Properties</h3>';
227
  propertiesHtml += '<table class="min-w-full table-custom border-collapse mb-4"><thead class="bg-green-100"><tr><th class="border border-green-300">Parameter</th><th class="border border-green-300">Value</th><th class="border border-green-300">Unit</th><th class="border border-green-300">Description</th></tr></thead><tbody>';
 
230
  });
231
  propertiesHtml += '</tbody></table>';
232
  $('#properties-report').html(propertiesHtml);
 
233
  // Store report data for later analysis and reveal the report section
234
  window.soilReportData = response;
235
  window.currentLat = lat;
 
242
  }
243
  });
244
  });
 
245
  // Analyze soil and render Gemini analysis response in Markdown
246
  $('#analyze-soil').on('click', function() {
247
  if (!window.soilReportData) {