forked from dogodigi/opendispatcher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprint-fail.html
85 lines (85 loc) · 3.2 KB
/
print-fail.html
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<html>
<head>
<title>Print - this one fails</title>
<script src="js/libs/jquery.1.9.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
var postdata = {
"units": "m",
"srs": "EPSG:28992",
"layout": "A4 portrait",
"dpi": 75,
"layers": [
{
"type": "TMS",
"baseURL": "http://openbasiskaart.nl/mapcache/tms/",
"version": "1.0.0",
"opacity": 1,
"singleTile": false,
"maxExtent": [
-285401.92,
22598.08,
595401.92,
903401.92
],
"tileSize": [
256,
256
],
"format": "png;",
"extension": "png",
"layer": "osm-nb@rd",
"resolutions": [
3440.64,
1720.32,
860.16,
430.08,
215.04,
107.52,
53.76,
26.88,
13.44,
6.72,
3.36,
1.68,
0.84,
0.42,
0.21
],
"styles": [
""
]
}
],
"pages": [
{
"center": [
54117.000091572,
392313.99977642
],
"scale": 25000,
"rotation": 0,
"mapTitle": "dbk viewer print test",
"comment": "Dit is de print test van de dbk viewer"
}
]
};
$('#berichten').html('Print wordt verwerkt...');
$.ajax({
type: "POST",
url: "geoserver/pdf/create.json",
contentType: "application/json",
data: JSON.stringify(postdata),
dataType: "json",
complete: function(response) {
$('#berichten').html('Klaar!');
window.location = JSON.parse(response.responseText).getURL;
}
});
});
</script>
</head>
<body>
<div id="berichten"></div>
</body>
</html>