-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
146 lines (135 loc) · 4.08 KB
/
index.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<!DOCTYPE html>
<html>
<head>
<title>Mapnik Documentation</title>
<link href="http://mapnik.org/css/mapnik.css" type="text/css" rel="stylesheet" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.2.0/styles/default.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.2.0/highlight.min.js"></script>
<style>
section {
padding: 3em 1em;
margin-bottom: 2em;
}
.container {
display: block;
margin: auto;
max-width: 50em;
padding: 0 1em;
}
.header {
width: 100%;
background-image: linear-gradient( #9AD8DD, #45ACB6 );
background-color: white;
color: white;
padding: 5em 0;
}
.left {
width: 75%;
float: left;
}
.right {
width: 21.5%;
float: right;
}
.lang-section {
margin-bottom: 3em;
}
.button.github {
border: 3px solid #333;
background: white;
color: #333;
}
.button.api {
border: 3px solid #a00;
background: #a00;
color: white;
}
.button:hover {
opacity: 0.8;
}
pre {
padding: 0;
width: 100%;
}
h1 {
margin-bottom: 0.5em;
}
h2 {
margin-top: 1.5em;
}
.footer {
text-align: center;
}
</style>
</head>
<body>
<section class="header">
<div class="container">
<h1>Mapnik Documentation</h1>
<p>Mapnik comes in a variety of languages including Python and Node.js.</p>
</div>
</section>
<section class="container">
<div class="lang-section clearfix">
<div class="left">
<h1>C++</h1>
<p><a href="https://github.com/mapnik/mapnik/wiki/MapnikTutorials">Tutorials</a> | <a href="https://github.com/mapnik/mapnik">Github Repository</a></p>
<p>Mapnik is a C++ library at its core. The latest documentation on installation and usage can be found on the <a href="https://github.com/mapnik/mapnik/wiki">Github wiki</a>.</p>
<p>Current version: <strong id="version">3.0.11</strong></p>
</div>
</div>
<div class="lang-section clearfix">
<div class="left">
<h1>Node.js</h1>
<p>Node Mapnik is based on Mapnik, a C++ library created for rendering images and vector tiles from custom geographic data sources.</p>
<p><a href="node-mapnik/">API Reference (latest)</a> | <a href="https://github.com/mapnik/node-mapnik">Github Repository</a></p>
<p>Current version: <strong id="version">3.6.0</strong></p>
<h3>Installation</h3>
<p>Node Mapnik is registered in npm as a module. You can install it with the following command.</p>
<pre><code class="bash">npm install --save mapnik</code></pre>
</div>
<div class="right">
<h3>API Reference</h3>
<a class="btn btn-primary" href="node-mapnik/3.6">3.6 (latest)</a><br>
<a class="btn btn-primary" href="node-mapnik/3.5">3.5</a><br>
<a class="btn btn-outline" href="node-mapnik/3.4">3.4</a>
</div>
</div>
<div class="lang-section clearfix">
<div class="left">
<h1>Python</h1>
<p>Python bindings for Mapnik</p>
<p><a href="https://github.com/mapnik/python-mapnik">Github Repository</a></p>
</div>
</div>
<!-- <h2>Usage</h2>
<p>Render a map from a stylesheet:</p>
<pre><code class="javascript">var mapnik = require('mapnik');
var fs = require('fs');
// register fonts and datasource plugins
mapnik.register_default_fonts();
mapnik.register_default_input_plugins();
var map = new mapnik.Map(256, 256);
map.load('./test/stylesheet.xml', function(err,map) {
if (err) throw err;
map.zoomAll();
var im = new mapnik.Image(256, 256);
map.render(im, function(err,im) {
if (err) throw err;
im.encode('png', function(err,buffer) {
if (err) throw err;
fs.writeFile('map.png',buffer, function(err) {
if (err) throw err;
console.log('saved map image to map.png');
});
});
});
});
</code></pre> -->
</section>
<section class="footer">
<p>Copyright © 2016 Artem Pavlenko | <a href="/">Mapnik.org</a></p>
</section>
<script>hljs.initHighlightingOnLoad();</script>
</body>
</html>