asdfasdf
This commit is contained in:
@@ -339,6 +339,7 @@ const ApplicationExecutionModal = ({ application, propertyDetails, onClose, onCo
|
||||
<div className="mb-6">
|
||||
<h4 className="font-medium mb-2">Application Area & GPS Track</h4>
|
||||
<div className="h-96 border rounded-lg overflow-hidden">
|
||||
{sections.length > 0 ? (
|
||||
<PropertyMap
|
||||
property={propertyDetails}
|
||||
sections={sections}
|
||||
@@ -349,6 +350,16 @@ const ApplicationExecutionModal = ({ application, propertyDetails, onClose, onCo
|
||||
center={mapCenter}
|
||||
zoom={mapCenter ? 16 : 15}
|
||||
/>
|
||||
) : (
|
||||
<div className="h-full w-full flex items-center justify-center bg-gray-100">
|
||||
<div className="text-center">
|
||||
<div className="text-gray-500 mb-2">Loading map...</div>
|
||||
<div className="text-sm text-gray-400">
|
||||
Sections: {sections.length}, Center: {mapCenter ? 'Set' : 'Not set'}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -93,6 +93,17 @@ const PropertyMap = ({
|
||||
currentLocation = null,
|
||||
showTrackPoints = true
|
||||
}) => {
|
||||
|
||||
// Debug logging
|
||||
console.log('PropertyMap render:', {
|
||||
center,
|
||||
zoom,
|
||||
sections: sections.length,
|
||||
selectedSections,
|
||||
mode,
|
||||
gpsTrack: gpsTrack.length,
|
||||
currentLocation
|
||||
});
|
||||
const [isDrawing, setIsDrawing] = useState(false);
|
||||
const [currentPolygon, setCurrentPolygon] = useState([]);
|
||||
const [selectedSection, setSelectedSection] = useState(null);
|
||||
@@ -354,10 +365,10 @@ const PropertyMap = ({
|
||||
className="h-full w-full rounded-lg"
|
||||
ref={mapRef}
|
||||
>
|
||||
{/* Use satellite imagery for application planning */}
|
||||
{/* Use OpenStreetMap as fallback for better reliability */}
|
||||
<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}"
|
||||
attribution='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
|
||||
/>
|
||||
|
||||
{/* Drawing handler */}
|
||||
|
||||
Reference in New Issue
Block a user