map
This commit is contained in:
@@ -365,13 +365,8 @@ const PropertyMap = ({
|
||||
return null;
|
||||
}
|
||||
|
||||
// Check the actual coordinate format in your logs
|
||||
console.log('Raw polygon 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
|
||||
});
|
||||
// Coordinates are already in [lat, lng] format - no swapping needed!
|
||||
const coordinates = polygonData.coordinates[0];
|
||||
|
||||
const isInternallySelected = selectedSection?.id === section.id;
|
||||
const isExternallySelected = selectedSections.includes(section.id);
|
||||
|
||||
Reference in New Issue
Block a user