nozzle debug

This commit is contained in:
Jake Kasper
2025-08-22 16:04:34 -04:00
parent 92945aa2e1
commit 2dd62fb938
3 changed files with 5 additions and 34 deletions

View File

@@ -327,12 +327,7 @@ const PropertyMap = ({
className="h-full w-full rounded-lg"
ref={mapRef}
>
<TileLayer
attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
/>
{/* Satellite imagery option */}
{/* Use satellite imagery for application planning */}
<TileLayer
attribution='Tiles &copy; Esri &mdash; Source: Esri, Maxar, GeoEye, Earthstar Geographics, CNES/Airbus DS, USDA, USGS, AeroGRID, IGN, and the GIS User Community'
url="https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"
@@ -355,8 +350,6 @@ const PropertyMap = ({
{/* Existing sections */}
{sections.map((section) => {
console.log('Section:', section);
// Handle both string and object polygon data
let polygonData = section.polygonData;
if (typeof polygonData === 'string') {
@@ -369,13 +362,11 @@ const PropertyMap = ({
}
if (!polygonData?.coordinates?.[0]) {
console.log('No coordinates found for section:', section.id);
return null;
}
// Your coordinates are already in [lng, lat] format, so we need to swap them for Leaflet
const coordinates = polygonData.coordinates[0].map(([lng, lat]) => [lat, lng]);
console.log('Mapped coordinates:', coordinates);
const isInternallySelected = selectedSection?.id === section.id;
const isExternallySelected = selectedSections.includes(section.id);