"use client"; import { useState } from 'react'; import dynamic from 'next/dynamic'; const PolishOrthophotoMap = dynamic( () => import('../../components/ui/PolishOrthophotoMap'), { ssr: false, loading: () =>
Loading map...
} ); const AdvancedPolishOrthophotoMap = dynamic( () => import('../../components/ui/AdvancedPolishOrthophotoMap'), { ssr: false, loading: () =>
Loading map...
} ); export default function PolishOrthophotoTestPage() { const [activeMap, setActiveMap] = useState('basic'); // Test markers - various locations in Poland const testMarkers = [ { position: [50.0647, 19.9450], // Krakow popup: "Kraków - Main Market Square" }, { position: [52.2297, 21.0122], // Warsaw popup: "Warszawa - Palace of Culture and Science" }, { position: [54.3520, 18.6466], // Gdansk popup: "Gdańsk - Old Town" } ]; return (

Polish Geoportal Orthophoto Integration

{/* Map Type Selector */}

Choose Map Implementation:

{/* Map Container */}

{activeMap === 'basic' ? 'Basic Polish Orthophoto Map' : 'Advanced Polish Orthophoto with WMS Overlays' }

{activeMap === 'basic' ? 'Demonstrates working Polish Geoportal orthophoto tiles with multiple base layer options.' : 'Advanced version includes Polish cadastral data (działki) and spatial planning (MPZT) as overlay layers.' }

{activeMap === 'basic' ? ( ) : ( )}
{/* Features Overview */}

Basic Map Features:

  • Polish Geoportal Orthophoto (Working)
  • OpenStreetMap base layer
  • Google Satellite imagery
  • Google Roads overlay
  • Esri World Imagery

Advanced Map Features:

  • Standard & High Resolution Orthophoto
  • Polish Cadastral Data (WMS)
  • Spatial Planning Data (MPZT)
  • Overlay layer support
  • Multiple base layers
{/* Technical Implementation Details */}

Technical Implementation:

Key Improvements:

  • • Uses REST tile service instead of WMTS for better compatibility
  • • Proper tile size (512px) with zoomOffset=-1
  • • proj4 integration for EPSG:2180 coordinate system
  • • Multiple fallback layers for reliability
  • • WMS overlay support for cadastral data

Based on OpenLayers Code:

  • • Converted from OpenLayers to Leaflet implementation
  • • Maintains same layer structure and URLs
  • • Includes Polish projection definitions
  • • Compatible with existing React/Next.js setup
  • • Extensible for additional WMS services
{/* Usage Instructions */}

How to Use:

1. Use the layer control (top-right) to switch between base layers

2. In advanced mode, enable overlay layers for cadastral/planning data

3. Click on markers to see location information

4. Zoom in to see high-resolution orthophoto details

5. Combine orthophoto with cadastral overlay for property boundaries

); }