|
@@ -0,0 +1,111 @@
|
|
1
|
+<!DOCTYPE html>
|
|
2
|
+<html>
|
|
3
|
+
|
|
4
|
+<head>
|
|
5
|
+ <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
|
|
6
|
+ <meta charset="utf-8">
|
|
7
|
+ <title>KML Click Capture Sample</title>
|
|
8
|
+ <link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.min.css">
|
|
9
|
+ <script src="../node_modules/bootstrap/dist/js/bootstrap.min.js" defer></script>
|
|
10
|
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" integrity="sha512-abc123..." crossorigin="anonymous" />
|
|
11
|
+ <link rel="stylesheet" href="../css/app.css">
|
|
12
|
+
|
|
13
|
+</head>
|
|
14
|
+
|
|
15
|
+<body>
|
|
16
|
+
|
|
17
|
+ <section class="section" style="max-height: 100vh;">
|
|
18
|
+
|
|
19
|
+ <div class=""
|
|
20
|
+ style="background-color: #1F3F6D; min-height: 50px; display: flex; align-items: center;padding-left: 100px;">
|
|
21
|
+ <h6 style="color: white;margin-right: 1em;" class=""><a style="color: white;" href="../details/penternakan_pn_17427_hsd_1949.html"><i
|
|
22
|
+ class="fas fa-chevron-left"></i></a></h6>
|
|
23
|
+ <h6 style="color: white;">PN 17427 (HSD 1949)</h6>
|
|
24
|
+ </div>
|
|
25
|
+
|
|
26
|
+ <!-- <div class="text-center pt-5"
|
|
27
|
+ style="background-color: white; min-height: 50px; display: flex; justify-content: center; align-items: center; padding-left: 100px;">
|
|
28
|
+ <h5 style="font-weight: 500;">Perbadanan Setiausaha Kejaraan Pahang</h5>
|
|
29
|
+
|
|
30
|
+ </div> -->
|
|
31
|
+
|
|
32
|
+ <div class="text-center pt-1 pb-5"
|
|
33
|
+ style="background-color: white;display: flex; justify-content: center; align-items: center;margin-left: -150px;">
|
|
34
|
+ <div class="pt-5 pb-5" style="width: 600px;height: 100px;">
|
|
35
|
+ <!-- <img style="border-radius: 20px;" src="image.png" alt=""> -->
|
|
36
|
+
|
|
37
|
+ <!-- <div id="capture"></div> -->
|
|
38
|
+ <div id="pdfViewer"></div>
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+ </div>
|
|
43
|
+ </div>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+ <script src="../js/jquery-3.7.1.js" defer></script>
|
|
47
|
+
|
|
48
|
+ <script src="../js/pdfjs-viewer.js" defer></script>
|
|
49
|
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.6.347/pdf.min.js"
|
|
50
|
+ integrity="sha512-Z8CqofpIcnJN80feS2uccz+pXWgZzeKxDsDNMD/dJ6997/LSRY+W4NmEt9acwR+Gt9OHN0kkI1CTianCwoqcjQ=="
|
|
51
|
+ crossorigin="anonymous" referrerpolicy="no-referrer" defer></script>
|
|
52
|
+
|
|
53
|
+ </section>
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+ <!-- <div id="map"></div> -->
|
|
57
|
+
|
|
58
|
+ <script>
|
|
59
|
+ var map;
|
|
60
|
+ var src = 'https://file.io/t3IwR1hlxwkZ';
|
|
61
|
+
|
|
62
|
+ function initMap() {
|
|
63
|
+ map = new google.maps.Map(document.getElementById('map'), {
|
|
64
|
+ center: new google.maps.LatLng(-19.257753, 146.823688),
|
|
65
|
+ zoom: 2,
|
|
66
|
+ mapTypeId: 'satellite'
|
|
67
|
+ });
|
|
68
|
+
|
|
69
|
+ var kmlLayer = new google.maps.KmlLayer(src, {
|
|
70
|
+ suppressInfoWindows: true,
|
|
71
|
+ preserveViewport: false,
|
|
72
|
+ map: map
|
|
73
|
+ });
|
|
74
|
+ }
|
|
75
|
+
|
|
76
|
+ document.addEventListener('DOMContentLoaded', () => {
|
|
77
|
+ // PDF.js script to render PDF
|
|
78
|
+ const pdfUrl = '../PN_17427_HSD_1949.pdf'; // Replace with your PDF URL
|
|
79
|
+ const pdfjsLib = window['pdfjs-dist/build/pdf'];
|
|
80
|
+ pdfjsLib.GlobalWorkerOptions.workerSrc = 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.6.347/pdf.worker.min.js';
|
|
81
|
+
|
|
82
|
+ pdfjsLib.getDocument(pdfUrl).promise.then(function (pdf) {
|
|
83
|
+ pdf.getPage(1).then(function (page) {
|
|
84
|
+ const scale = 1.5;
|
|
85
|
+ const viewport = page.getViewport({ scale });
|
|
86
|
+
|
|
87
|
+ const canvas = document.createElement('canvas');
|
|
88
|
+ const context = canvas.getContext('2d');
|
|
89
|
+ canvas.height = viewport.height;
|
|
90
|
+ canvas.width = viewport.width;
|
|
91
|
+
|
|
92
|
+ const renderContext = {
|
|
93
|
+ canvasContext: context,
|
|
94
|
+ viewport: viewport
|
|
95
|
+ };
|
|
96
|
+
|
|
97
|
+ page.render(renderContext);
|
|
98
|
+ document.getElementById('pdfViewer').appendChild(canvas);
|
|
99
|
+ });
|
|
100
|
+ });
|
|
101
|
+
|
|
102
|
+ })
|
|
103
|
+
|
|
104
|
+ </script>
|
|
105
|
+ <script async
|
|
106
|
+ src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCj5eAmQOg6IhdABVPCBT6ubZ3Yj_IWejI&callback=initMap">
|
|
107
|
+ </script>
|
|
108
|
+
|
|
109
|
+</body>
|
|
110
|
+
|
|
111
|
+</html>
|