File size: 1,014 Bytes
6dc484f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE html>
<html>
<head>
  <title>MapKit Renderer</title>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <!-- Leaflet CSS -->
  <link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css"/>
  <style>

    #map { height: 100vh; }

  </style>
</head>
<body>
  <div id="map"></div>

  <!-- Leaflet JS -->
  <script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
  <script>

    // Initialize map centered on Hong Kong

    var map = L.map('map').setView([22.3193, 114.1694], 12);



    // Base layer (OpenStreetMap tiles)

    L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {

      attribution: '© OpenStreetMap contributors'

    }).addTo(map);



    // Example: load GeoJSON data (replace with your MapKit file)

    fetch('hongkong_mapkit.geojson')

      .then(response => response.json())

      .then(data => {

        L.geoJSON(data).addTo(map);

      });

  </script>
</body>
</html>