map
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user