A simple Next.js project demonstrating how to integrate OpenLayers and ol-ext to create a dynamic dual map layout.
This project showcases how to use Next.js along with OpenLayers and ol-ext to create a web application with a dynamic dual map layout. It includes two map components, Map1 and Map2, each displaying a simple OpenStreetMap layer.
-
Clone the repository:
git clone https://github.com/Shreyas-Ingale/DualMaps.git cd DualMaps -
Install dependencies:
npm install
-
Run the development server:
npm run dev
Visit
http://localhost:3000/in your browser to see the dual map layout.
The project structure is as follows:
components: Contains reusable React components, includingMap1.jsandMap2.js.pages: Contains the main pages of the Next.js application, includingdualmap.js.public: Static assets such as images or stylesheets.
The dual map layout is displayed on the / route. Each map is represented by a separate component (Map1 and Map2).
For additional configuration or to incorporate ol-ext features, refer to the documentation of OpenLayers and ol-ext. You may need to customize the components and configurations based on your specific requirements.