This commit is contained in:
Jake Kasper
2025-08-23 12:59:49 -04:00
parent 65885dfc87
commit f2f3ee52cf

View File

@@ -365,13 +365,8 @@ const PropertyMap = ({
return null; return null;
} }
// Check the actual coordinate format in your logs // Coordinates are already in [lat, lng] format - no swapping needed!
console.log('Raw polygon coordinates:', polygonData.coordinates[0]); const coordinates = polygonData.coordinates[0];
const coordinates = polygonData.coordinates[0].map(([first, second]) => {
console.log('Coordinate pair:', [first, second]);
// Based on your console logs, coordinates appear to be [lng, lat], so swap them
return [second, first]; // [lat, lng] for Leaflet
});
const isInternallySelected = selectedSection?.id === section.id; const isInternallySelected = selectedSection?.id === section.id;
const isExternallySelected = selectedSections.includes(section.id); const isExternallySelected = selectedSections.includes(section.id);