nozzle debug
This commit is contained in:
@@ -327,12 +327,7 @@ const PropertyMap = ({
|
||||
className="h-full w-full rounded-lg"
|
||||
ref={mapRef}
|
||||
>
|
||||
<TileLayer
|
||||
attribution='© <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 © Esri — 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);
|
||||
|
||||
Reference in New Issue
Block a user