|
|
|
@ -19,7 +19,14 @@ export class LeafletMapComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
private initializeMap(): void {
|
|
|
|
|
// Initialize the map
|
|
|
|
|
this.map = L.map('map').setView([46.603354, 1.888334], 6);
|
|
|
|
|
this.map = L.map('map', {
|
|
|
|
|
maxBounds: L.latLngBounds(
|
|
|
|
|
L.latLng(-90, -180), // South-West
|
|
|
|
|
L.latLng(90, 180) // North-East
|
|
|
|
|
),
|
|
|
|
|
maxBoundsViscosity: 1.0, // Prevent dragging the map out of bounds
|
|
|
|
|
minZoom: 2, // Prevent zooming out too much
|
|
|
|
|
}).setView([46.603354, 1.888334], 6);
|
|
|
|
|
|
|
|
|
|
// Add OpenStreetMap tiles
|
|
|
|
|
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
|
|
|
|