[2fd88f42] 1. Kartendarstellung (Neutralisierung):
1. Kartendarstellung (Neutralisierung):
* Die TileLayer-URL in heatmap-tool/frontend/src/components/MapDisplay.tsx wurde auf eine neutrale CARTO light_all-Kachelansicht umgestellt und die Quellenangabe entsprechend angepasst.
This commit is contained in:
@@ -77,10 +77,3 @@ body {
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.map-container p {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ function App() {
|
||||
setIsLoading(true);
|
||||
setError(null);
|
||||
try {
|
||||
const response = await axios.post('/api/set-plz-column', {
|
||||
const response = await axios.post('/heatmap/api/set-plz-column', {
|
||||
plz_column: selectedColumn,
|
||||
});
|
||||
handleUploadSuccess(response.data); // Re-use the success handler
|
||||
@@ -89,7 +89,7 @@ function App() {
|
||||
setIsLoading(true);
|
||||
setError(null);
|
||||
try {
|
||||
const response = await axios.post('/api/heatmap', {
|
||||
const response = await axios.post('/heatmap/api/heatmap', {
|
||||
filters: selectedFilters,
|
||||
tooltip_config: currentTooltipConfig, // Pass tooltip config to backend
|
||||
});
|
||||
@@ -170,14 +170,18 @@ function App() {
|
||||
)}
|
||||
</div>
|
||||
<div className="map-container">
|
||||
{isLoading && <p>Loading map data...</p>}
|
||||
{error && <p className="error">{error}</p>}
|
||||
<MapDisplay
|
||||
heatmapData={heatmapData}
|
||||
radiusMultiplier={radiusMultiplier}
|
||||
viewMode={viewMode}
|
||||
tooltipColumns={tooltipColumns}
|
||||
/>
|
||||
{isLoading ? (
|
||||
<p>Loading map data...</p>
|
||||
) : error ? (
|
||||
<p className="error">{error}</p>
|
||||
) : (
|
||||
<MapDisplay
|
||||
heatmapData={heatmapData}
|
||||
radiusMultiplier={radiusMultiplier}
|
||||
viewMode={viewMode}
|
||||
tooltipColumns={tooltipColumns}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
@@ -39,7 +39,7 @@ const FileUpload: React.FC<FileUploadProps> = ({ onUploadSuccess, setIsLoading,
|
||||
setError(null);
|
||||
|
||||
try {
|
||||
const response = await axios.post('/api/upload', formData, {
|
||||
const response = await axios.post('/heatmap/api/upload', formData, {
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
},
|
||||
|
||||
@@ -77,7 +77,7 @@ const MapDisplay: React.FC<MapDisplayProps> = ({ heatmapData, radiusMultiplier,
|
||||
|
||||
if (heatmapData.length === 0) {
|
||||
return (
|
||||
<div style={{ textAlign: 'center', paddingTop: '50px' }}>
|
||||
<div>
|
||||
<p>No data to display on the map.</p>
|
||||
<p>Upload a file and apply filters to see the heatmap.</p>
|
||||
</div>
|
||||
@@ -87,8 +87,8 @@ const MapDisplay: React.FC<MapDisplayProps> = ({ heatmapData, radiusMultiplier,
|
||||
return (
|
||||
<MapContainer key={viewMode} center={germanyCenter} zoom={6} style={{ height: '100%', width: '100%' }}>
|
||||
<TileLayer
|
||||
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
|
||||
attribution='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||
url="https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png"
|
||||
attribution='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>'
|
||||
/>
|
||||
{viewMode === 'points' ? renderPoints() : renderHeatmap()}
|
||||
</MapContainer>
|
||||
|
||||
Reference in New Issue
Block a user