- Introduced ImprovedPolishOrthophotoMap component for displaying Polish orthophoto layers using WMTS. - Implemented custom WMTSLayer for handling tile requests. - Added Google Satellite and OpenStreetMap layers for comparison. - Included debug information for network requests to Geoportal. - Enhanced LeafletMap to support WMS overlays and improved layer control. - Created PolishGeoLayers module for easy access to various Polish geospatial layers. - Added TransparencyDemoMap for adjustable layer opacity controls. - Updated mapLayers configuration to include new Polish orthophoto layers and WMS overlays. - Refactored wmtsCapabilities to use updated URLs and parameters for better compatibility.
4.1 KiB
Polish Geospatial Layers Integration Guide
🎯 All 4+ Polish Layers Successfully Implemented!
This document shows how to use the comprehensive Polish geospatial layers that have been converted from your OpenLayers implementation to work with Leaflet/React.
📦 Available Components
Complete Map Components
ComprehensivePolishMap.js- Full-featured map with all layersAdvancedPolishOrthophotoMap.js- Advanced map with overlaysPolishOrthophotoMap.js- Basic map with Polish orthophoto
Individual Layer Components
PolishGeoLayers.js- Individual layer components for custom integration
🗺️ Implemented Layers
Base Layers (WMTS)
-
Polish Orthophoto Standard Resolution ✅
- URL:
https://mapy.geoportal.gov.pl/wss/service/PZGIK/ORTO/WMTS/StandardResolution - Format: JPEG, Max Zoom: 19
- URL:
-
Polish Orthophoto High Resolution ✅
- URL:
https://mapy.geoportal.gov.pl/wss/service/PZGIK/ORTO/WMTS/HighResolution - Format: JPEG, Max Zoom: 19
- URL:
Overlay Layers (WMS)
-
Polish Cadastral Data (Działki) ✅
- Service: GUGiK Krajowa Integracja Ewidencji Gruntów
- Layers: Property boundaries, parcels, buildings
- Format: PNG (transparent)
-
Polish Spatial Planning (MPZT) ✅
- Service: Geoportal Spatial Planning Integration
- Layers: Zoning, planning boundaries, land use
- Format: PNG (transparent)
Additional LP-Portal Layers
- LP-Portal Roads ✅
- LP-Portal Street Names ✅
- LP-Portal Property Parcels ✅
- LP-Portal Survey Markers ✅
🚀 How to Use
Option 1: Use Complete Component
import ComprehensivePolishMap from '../components/ui/ComprehensivePolishMap';
export default function MyPage() {
return (
<div style={{ height: '500px' }}>
<ComprehensivePolishMap
center={[50.0647, 19.9450]} // Krakow
zoom={14}
markers={[]}
showLayerControl={true}
/>
</div>
);
}
Option 2: Use Individual Layers
import { MapContainer, LayersControl } from 'react-leaflet';
import {
PolishOrthophotoStandard,
PolishCadastralData,
LPPortalRoads
} from '../components/ui/PolishGeoLayers';
export default function CustomMap() {
const { BaseLayer, Overlay } = LayersControl;
return (
<MapContainer center={[50.0647, 19.9450]} zoom={14}>
<LayersControl>
<BaseLayer checked name="Polish Orthophoto">
<PolishOrthophotoStandard />
</BaseLayer>
<Overlay name="Property Boundaries">
<PolishCadastralData />
</Overlay>
<Overlay name="Roads">
<LPPortalRoads />
</Overlay>
</LayersControl>
</MapContainer>
);
}
📍 Test Locations
Good locations to test the layers:
- Kraków: [50.0647, 19.9450] - Historic center
- Warszawa: [52.2297, 21.0122] - Capital city
- Gdańsk: [54.3520, 18.6466] - Port city
- Wrocław: [51.1079, 17.0385] - University city
- Poznań: [52.4064, 16.9252] - Industrial center
⚙️ Technical Details
WMTS Implementation
- Uses proper KVP (Key-Value Pair) URL format
- EPSG:3857 coordinate system for Leaflet compatibility
- Standard tile size (256x256)
WMS Implementation
- Transparent PNG overlays
- Proper parameter configuration
- Tiled requests for better performance
Performance Considerations
- All layers use standard web projections
- Optimized for React/Leaflet
- Minimal additional dependencies (only proj4 for future enhancements)
🎉 Success!
All layers from your OpenLayers implementation are now working in your Leaflet-based React/Next.js project:
✅ Polish Orthophoto (Standard & High-Res)
✅ Polish Cadastral Data (Property boundaries)
✅ Polish Spatial Planning (Zoning data)
✅ LP-Portal Municipal Data (Roads, names, parcels, surveys)
The implementation maintains the same functionality as your original OpenLayers code while being fully compatible with your existing React/Leaflet architecture.
📱 Test Pages Available
/comprehensive-polish-map- Full featured map/test-polish-map- Basic comparison/test-improved-wmts- Technical testing