@maplibre/maplibre-gl-native 5.4.1-pre.0 → 5.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +225 -59
- package/{platform/node/index.js → index.js} +1 -1
- package/package.json +14 -10
- package/LICENSE.mbgl-core.md +0 -661
- package/LICENSE.md +0 -30
- package/platform/node/README.md +0 -247
- /package/{platform/node/index.d.ts → index.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -1,81 +1,247 @@
|
|
|
1
|
-
|
|
1
|
+
# @maplibre/maplibre-gl-native
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@maplibre/maplibre-gl-native)
|
|
4
|
+
[](https://github.com/maplibre/maplibre-native/actions/workflows/node-ci.yml)
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
## Installing
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
Binaries are available and downloaded during install for the following platforms:
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
- Operating systems:
|
|
11
|
+
- Ubuntu 22.04 (amd64/arm64)
|
|
12
|
+
- macOS 12 (amd64/arm64)
|
|
13
|
+
- Windows (amd64)
|
|
14
|
+
- Node.js 16, 18, 20, 22
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
Run:
|
|
14
17
|
|
|
15
|
-
|
|
18
|
+
```
|
|
19
|
+
npm install @maplibre/maplibre-gl-native
|
|
20
|
+
```
|
|
16
21
|
|
|
17
|
-
|
|
22
|
+
Further platforms might work [with additional libraries installed](https://github.com/maplibre/maplibre-native/tree/main/platform/linux#prerequisites).
|
|
18
23
|
|
|
19
|
-
|
|
24
|
+
## Testing
|
|
20
25
|
|
|
21
|
-
|
|
26
|
+
```
|
|
27
|
+
npm test
|
|
28
|
+
npm run test-suite
|
|
29
|
+
```
|
|
22
30
|
|
|
23
|
-
|
|
24
|
-
- [⭐️ iOS](platform/ios/platform/ios/README.md)
|
|
25
|
-
- [GLFW](platform/glfw)
|
|
26
|
-
- [Linux](platform/linux/README.md)
|
|
27
|
-
- [Node.js](platform/node/README.md)
|
|
28
|
-
- [Qt](platform/qt/README.md)
|
|
29
|
-
- [Windows](platform/windows/README.md)
|
|
30
|
-
- [macOS](platform/ios/platform/macos/README.md)
|
|
31
|
+
## Rendering a map tile
|
|
31
32
|
|
|
32
|
-
|
|
33
|
+
The minimal example requires only the instantiation of the `mbgl.Map` object, loading a style and calling the `map.render` method:
|
|
33
34
|
|
|
34
|
-
|
|
35
|
+
```js
|
|
36
|
+
var mbgl = require('@maplibre/maplibre-gl-native');
|
|
37
|
+
var sharp = require('sharp');
|
|
35
38
|
|
|
36
|
-
|
|
39
|
+
var map = new mbgl.Map();
|
|
37
40
|
|
|
38
|
-
|
|
41
|
+
map.load(require('./test/fixtures/style.json'));
|
|
39
42
|
|
|
40
|
-
|
|
43
|
+
map.render(function(err, buffer) {
|
|
44
|
+
if (err) throw err;
|
|
41
45
|
|
|
42
|
-
|
|
43
|
-
- See the [Design Proposals](https://github.com/maplibre/maplibre-native/tree/main/design-proposals) that have been accepted and are being worked on, the most recent ones being the [Rendering Modularization Design Proposal](design-proposals/2022-10-27-rendering-modularization.md) and the [Metal Port Design Proposal](design-proposals/2022-11-29-metal-port.md).
|
|
46
|
+
map.release();
|
|
44
47
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
### Bounties 💰
|
|
54
|
-
|
|
55
|
-
Thanks to our sponsors, we are able to award bounties to developers making contributions toward certain [bounty directions](https://github.com/maplibre/maplibre/issues?q=is%3Aissue+is%3Aopen+label%3A%22bounty+direction%22). To get started doing bounties, refer to the [step-by-step bounties guide](https://maplibre.org/roadmap/step-by-step-bounties-guide/).
|
|
56
|
-
|
|
57
|
-
## Sponsors
|
|
58
|
-
|
|
59
|
-
We thank everyone who supported us financially in the past and special thanks to the people and organizations who support us with recurring donations!
|
|
48
|
+
var image = sharp(buffer, {
|
|
49
|
+
raw: {
|
|
50
|
+
width: 512,
|
|
51
|
+
height: 512,
|
|
52
|
+
channels: 4
|
|
53
|
+
}
|
|
54
|
+
});
|
|
60
55
|
|
|
61
|
-
|
|
56
|
+
// Convert raw image buffer to PNG
|
|
57
|
+
image.toFile('image.png', function(err) {
|
|
58
|
+
if (err) throw err;
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
```
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
But you can customize the map providing an options object to `mbgl.Map` constructor and to `map.render` method:
|
|
64
|
+
|
|
65
|
+
```js
|
|
66
|
+
var fs = require('fs');
|
|
67
|
+
var path = require('path');
|
|
68
|
+
var mbgl = require('@maplibre/maplibre-gl-native');
|
|
69
|
+
var sharp = require('sharp');
|
|
64
70
|
|
|
65
|
-
|
|
71
|
+
var options = {
|
|
72
|
+
request: function(req, callback) {
|
|
73
|
+
fs.readFile(path.join(__dirname, 'test', req.url), function(err, data) {
|
|
74
|
+
callback(err, { data: data });
|
|
75
|
+
});
|
|
76
|
+
},
|
|
77
|
+
ratio: 1
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
var map = new mbgl.Map(options);
|
|
81
|
+
|
|
82
|
+
map.load(require('./test/fixtures/style.json'));
|
|
83
|
+
|
|
84
|
+
map.render({zoom: 0}, function(err, buffer) {
|
|
85
|
+
if (err) throw err;
|
|
86
|
+
|
|
87
|
+
map.release();
|
|
88
|
+
|
|
89
|
+
var image = sharp(buffer, {
|
|
90
|
+
raw: {
|
|
91
|
+
width: 512,
|
|
92
|
+
height: 512,
|
|
93
|
+
channels: 4
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
// Convert raw image buffer to PNG
|
|
98
|
+
image.toFile('image.png', function(err) {
|
|
99
|
+
if (err) throw err;
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
The first argument passed to `map.render` is an options object, all keys are optional:
|
|
105
|
+
|
|
106
|
+
```js
|
|
107
|
+
{
|
|
108
|
+
zoom: {zoom}, // number, defaults to 0
|
|
109
|
+
width: {width}, // number (px), defaults to 512
|
|
110
|
+
height: {height}, // number (px), defaults to 512
|
|
111
|
+
center: [{longitude}, {latitude}], // array of numbers (coordinates), defaults to [0,0]
|
|
112
|
+
bearing: {bearing}, // number (in degrees, counter-clockwise from north), defaults to 0
|
|
113
|
+
pitch: {pitch}, // number (in degrees, arcing towards the horizon), defaults to 0
|
|
114
|
+
classes: {classes} // array of strings
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
When you are finished using a map object, you can call `map.release()` to permanently dispose the internal map resources. This is not necessary, but can be helpful to optimize resource usage (memory, file sockets) on a more granular level than V8's garbage collector. Calling `map.release()` will prevent a map object from being used for any further render calls, but can be safely called as soon as the `map.render()` callback returns, as the returned pixel buffer will always be retained for the scope of the callback.
|
|
119
|
+
|
|
120
|
+
## Implementing a file source
|
|
121
|
+
|
|
122
|
+
When creating a `Map`, you can optionally pass an options object (with an optional `request` method and optional `ratio` number) as the first parameter. The `request()` method handles a request for a resource. The `ratio` sets the scale at which the map will render tiles, such as `2.0` for rendering images for high pixel density displays:
|
|
123
|
+
|
|
124
|
+
```js
|
|
125
|
+
var map = new mbgl.Map({
|
|
126
|
+
request: function(req) {
|
|
127
|
+
// TODO
|
|
128
|
+
},
|
|
129
|
+
ratio: 2.0
|
|
130
|
+
});
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
If you omit the `request` method, the `map` object will use the default internal request handlers, which is ok for most cases. However, if you have specific needs, you can implement your own `request` handler. When a `request` method is provided, all `map` resources will be requested by calling the `request` method with two parameters, called `req` and `callback` respectively in this example. The `req` parameter has two properties:
|
|
134
|
+
|
|
135
|
+
```json
|
|
136
|
+
{
|
|
137
|
+
"url": "http://example.com",
|
|
138
|
+
"kind": 1
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
The `kind` is an enum and defined in [`mbgl.Resource`](https://github.com/maplibre/maplibre-native/blob/main/include/mbgl/storage/resource.hpp):
|
|
143
|
+
|
|
144
|
+
```json
|
|
145
|
+
{
|
|
146
|
+
"Unknown": 0,
|
|
147
|
+
"Style": 1,
|
|
148
|
+
"Source": 2,
|
|
149
|
+
"Tile": 3,
|
|
150
|
+
"Glyphs": 4,
|
|
151
|
+
"SpriteImage": 5,
|
|
152
|
+
"SpriteJSON": 6
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
The `kind` enum has no significance for anything but serves as a hint to your implemention as to what sort of resource to expect. E.g., your implementation could choose caching strategies based on the expected file type.
|
|
157
|
+
|
|
158
|
+
The `callback` parameter is a function that must be called with two parameters: an error message (if there are no errors, then you must pass `null`), and a response object:
|
|
159
|
+
|
|
160
|
+
```js
|
|
161
|
+
{
|
|
162
|
+
data: {data}, // required, must be a byte array, usually a Buffer object
|
|
163
|
+
modified: {modified}, // Date, optional
|
|
164
|
+
expires: {expires}, // Date, optional
|
|
165
|
+
etag: {etag} // string, optional
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
If there is no data to be sent to the `callback` (empty data, or `no-content` respose), then it must be called without parameters. The `request` implementation should pass uncompressed data to `callback`. If you are downloading assets from a source that applies gzip transport encoding, the implementation must decompress the results before passing them on.
|
|
170
|
+
|
|
171
|
+
A sample implementation that reads files from disk would look like the following:
|
|
172
|
+
|
|
173
|
+
```js
|
|
174
|
+
var map = new mbgl.Map({
|
|
175
|
+
request: function(req, callback) {
|
|
176
|
+
fs.readFile(path.join('base/path', req.url), function(err, data) {
|
|
177
|
+
callback(err, { data: data });
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
This is a very barebones implementation and you'll probably want a better implementation. E.g. it passes the url verbatim to the file system, but you'd want add some logic that normalizes `http` URLs. You'll notice that once your implementation has obtained the requested file, you have to deliver it to the requestee by calling `callback()`, which takes either an error object or `null` and an object with several keys:
|
|
184
|
+
|
|
185
|
+
```js
|
|
186
|
+
{
|
|
187
|
+
modified: new Date(),
|
|
188
|
+
expires: new Date(),
|
|
189
|
+
etag: "string",
|
|
190
|
+
data: new Buffer()
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
A sample implementation that uses [`request`](https://github.com/request/request) to fetch data from a remote source:
|
|
195
|
+
|
|
196
|
+
```js
|
|
197
|
+
var mbgl = require('@maplibre/maplibre-gl-native');
|
|
198
|
+
var request = require('request');
|
|
199
|
+
|
|
200
|
+
var map = new mbgl.Map({
|
|
201
|
+
request: function(req, callback) {
|
|
202
|
+
request({
|
|
203
|
+
url: req.url,
|
|
204
|
+
encoding: null,
|
|
205
|
+
gzip: true
|
|
206
|
+
}, function (err, res, body) {
|
|
207
|
+
if (err) {
|
|
208
|
+
callback(err);
|
|
209
|
+
} else if (res.statusCode == 200) {
|
|
210
|
+
var response = {};
|
|
211
|
+
|
|
212
|
+
if (res.headers.modified) { response.modified = new Date(res.headers.modified); }
|
|
213
|
+
if (res.headers.expires) { response.expires = new Date(res.headers.expires); }
|
|
214
|
+
if (res.headers.etag) { response.etag = res.headers.etag; }
|
|
215
|
+
|
|
216
|
+
response.data = body;
|
|
217
|
+
|
|
218
|
+
callback(null, response);
|
|
219
|
+
} else if (res.statusCode == 204) {
|
|
220
|
+
callback();
|
|
221
|
+
} else {
|
|
222
|
+
callback(new Error(JSON.parse(body).message));
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
Stylesheets are free to use any protocols, but your implementation of `request` must support these; e.g. you could use `s3://` to indicate that files are supposed to be loaded from S3.
|
|
230
|
+
|
|
231
|
+
## Listening for log events
|
|
232
|
+
|
|
233
|
+
The module imported with `require('maplibre-gl-native')` inherits from [`EventEmitter`](https://nodejs.org/api/events.html), and the `NodeLogObserver` will push log events to this. Log messages can have [`class`](https://github.com/maplibre/maplibre-native/blob/node-v2.1.0/include/mbgl/platform/event.hpp#L43-L60), [`severity`](https://github.com/maplibre/maplibre-native/blob/node-v2.1.0/include/mbgl/platform/event.hpp#L17-L23), `code` ([HTTP status codes](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html)), and `text` parameters.
|
|
234
|
+
|
|
235
|
+
```js
|
|
236
|
+
var mbgl = require('@maplibre/maplibre-gl-native');
|
|
237
|
+
mbgl.on('message', function(msg) {
|
|
238
|
+
t.ok(msg, 'emits error');
|
|
239
|
+
t.equal(msg.class, 'Style');
|
|
240
|
+
t.equal(msg.severity, 'ERROR');
|
|
241
|
+
t.ok(msg.text.match(/Failed to load/), 'error text matches');
|
|
242
|
+
});
|
|
243
|
+
```
|
|
66
244
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
<a href="https://meta.com"><img src="https://maplibre.org/img/meta-logo.svg" alt="Logo Meta" width="25%"/></a>
|
|
70
|
-
|
|
71
|
-
<a href="https://www.mierune.co.jp/?lang=en"><img src="https://maplibre.org/img/mierune-logo.svg" alt="Logo MIERUNE" width="25%"/></a>
|
|
72
|
-
|
|
73
|
-
<a href="https://komoot.com/"><img src="https://maplibre.org/img/komoot-logo.svg" alt="Logo komoot" width="25%"/></a>
|
|
74
|
-
|
|
75
|
-
Backers and Supporters:
|
|
76
|
-
|
|
77
|
-
[](https://opencollective.com/maplibre)
|
|
78
|
-
|
|
79
|
-
## License
|
|
245
|
+
## Contributing
|
|
80
246
|
|
|
81
|
-
|
|
247
|
+
See [DEVELOPING.md](DEVELOPING.md) for instructions on building this module for development.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// Shim to wrap req.respond while preserving callback-passing API
|
|
4
4
|
|
|
5
|
-
var mbgl = require('
|
|
5
|
+
var mbgl = require('./lib/node-v' + process.versions.modules + '/mbgl');
|
|
6
6
|
var constructor = mbgl.Map.prototype.constructor;
|
|
7
7
|
|
|
8
8
|
var Map = function(options) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maplibre/maplibre-gl-native",
|
|
3
|
-
"version": "5.4.1
|
|
4
|
-
"description": "Renders map tiles with
|
|
3
|
+
"version": "5.4.1",
|
|
4
|
+
"description": "Renders map tiles with MapLibre Native",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"maplibre",
|
|
7
7
|
"gl"
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
},
|
|
12
12
|
"files": [
|
|
13
13
|
"lib",
|
|
14
|
-
"
|
|
14
|
+
"index.d.ts"
|
|
15
15
|
],
|
|
16
|
-
"main": "
|
|
17
|
-
"types": "
|
|
16
|
+
"main": "index.js",
|
|
17
|
+
"types": "index.d.ts",
|
|
18
18
|
"repository": {
|
|
19
19
|
"type": "git",
|
|
20
20
|
"url": "git+https://github.com/maplibre/maplibre-native.git"
|
|
@@ -27,10 +27,13 @@
|
|
|
27
27
|
"npm-run-all": "^4.1.5"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
+
"@aws-sdk/client-device-farm": "^3.556.0",
|
|
31
|
+
"@aws-sdk/client-s3": "^3.556.0",
|
|
30
32
|
"@mapbox/flow-remove-types": "^2.0.0",
|
|
31
33
|
"@mapbox/mvt-fixtures": "3.10.0",
|
|
32
34
|
"@octokit/plugin-retry": "^7.1.0",
|
|
33
35
|
"@octokit/rest": "^20.1.0",
|
|
36
|
+
"@types/node": "^20.12.7",
|
|
34
37
|
"argparse": "^2.0.1",
|
|
35
38
|
"csscolorparser": "~1.0.3",
|
|
36
39
|
"d3-queue": "3.0.7",
|
|
@@ -51,6 +54,7 @@
|
|
|
51
54
|
"shuffle-seed": "1.1.6",
|
|
52
55
|
"st": "3.0.0",
|
|
53
56
|
"tape": "^5.7.5",
|
|
57
|
+
"typescript": "^5.4.5",
|
|
54
58
|
"xcode": "^3.0.1"
|
|
55
59
|
},
|
|
56
60
|
"engines": {
|
|
@@ -58,11 +62,11 @@
|
|
|
58
62
|
},
|
|
59
63
|
"scripts": {
|
|
60
64
|
"install": "node-pre-gyp install --fallback-to-build=false",
|
|
61
|
-
"test": "tape
|
|
62
|
-
"test-memory": "node --expose-gc
|
|
63
|
-
"test-expressions": "node -r esm
|
|
64
|
-
"test-render": "node -r esm
|
|
65
|
-
"test-query": "node -r esm
|
|
65
|
+
"test": "tape test/js/**/*.test.js",
|
|
66
|
+
"test-memory": "node --expose-gc test/memory.test.js",
|
|
67
|
+
"test-expressions": "node -r esm test/expression.test.js",
|
|
68
|
+
"test-render": "node -r esm test/render.test.js",
|
|
69
|
+
"test-query": "node -r esm test/query.test.js"
|
|
66
70
|
},
|
|
67
71
|
"gypfile": true,
|
|
68
72
|
"binary": {
|
package/LICENSE.mbgl-core.md
DELETED
|
@@ -1,661 +0,0 @@
|
|
|
1
|
-
### [Mapbox GL Native](https://github.com/mapbox/mapbox-gl-native) by Mapbox
|
|
2
|
-
|
|
3
|
-
```
|
|
4
|
-
mapbox-gl-native Copyright (c) 2014-2020 Mapbox.
|
|
5
|
-
|
|
6
|
-
Redistribution and use in source and binary forms, with or without
|
|
7
|
-
modification, are permitted provided that the following conditions are
|
|
8
|
-
met:
|
|
9
|
-
|
|
10
|
-
* Redistributions of source code must retain the above copyright
|
|
11
|
-
notice, this list of conditions and the following disclaimer.
|
|
12
|
-
* Redistributions in binary form must reproduce the above copyright
|
|
13
|
-
notice, this list of conditions and the following disclaimer in
|
|
14
|
-
the documentation and/or other materials provided with the
|
|
15
|
-
distribution.
|
|
16
|
-
|
|
17
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
|
18
|
-
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
|
19
|
-
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
20
|
-
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
|
21
|
-
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
22
|
-
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
23
|
-
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES LOSS OF USE, DATA, OR
|
|
24
|
-
PROFITS OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
25
|
-
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
26
|
-
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
27
|
-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
### [kdbush.hpp](https://github.com/mourner/kdbush.hpp) by Vladimir Agafonkin
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
Copyright (c) 2016, Vladimir Agafonkin
|
|
37
|
-
|
|
38
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
39
|
-
purpose with or without fee is hereby granted, provided that the above
|
|
40
|
-
copyright notice and this permission notice appear in all copies.
|
|
41
|
-
|
|
42
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
43
|
-
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
44
|
-
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
45
|
-
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
46
|
-
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
47
|
-
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
48
|
-
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
### [supercluster.hpp](https://github.com/mapbox/supercluster.hpp) by Mapbox
|
|
55
|
-
|
|
56
|
-
```
|
|
57
|
-
Copyright (c) 2016, Mapbox
|
|
58
|
-
|
|
59
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
60
|
-
purpose with or without fee is hereby granted, provided that the above
|
|
61
|
-
copyright notice and this permission notice appear in all copies.
|
|
62
|
-
|
|
63
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
64
|
-
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
65
|
-
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
66
|
-
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
67
|
-
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
68
|
-
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
69
|
-
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
70
|
-
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
### [shelf-pack-cpp](https://github.com/mapbox/shelf-pack-cpp) by Mapbox
|
|
76
|
-
|
|
77
|
-
```
|
|
78
|
-
ISC License
|
|
79
|
-
|
|
80
|
-
Copyright (c) 2017, Mapbox
|
|
81
|
-
|
|
82
|
-
Permission to use, copy, modify, and/or distribute this software for any purpose
|
|
83
|
-
with or without fee is hereby granted, provided that the above copyright notice
|
|
84
|
-
and this permission notice appear in all copies.
|
|
85
|
-
|
|
86
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
87
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
88
|
-
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
89
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
90
|
-
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
91
|
-
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
|
92
|
-
THIS SOFTWARE.
|
|
93
|
-
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
---
|
|
97
|
-
|
|
98
|
-
### [geojson-vt-cpp](https://github.com/mapbox/geojson-vt-cpp) by Mapbox
|
|
99
|
-
|
|
100
|
-
```
|
|
101
|
-
ISC License
|
|
102
|
-
|
|
103
|
-
Copyright (c) 2015, Mapbox
|
|
104
|
-
|
|
105
|
-
Permission to use, copy, modify, and/or distribute this software for any purpose
|
|
106
|
-
with or without fee is hereby granted, provided that the above copyright notice
|
|
107
|
-
and this permission notice appear in all copies.
|
|
108
|
-
|
|
109
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
110
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
111
|
-
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
112
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
113
|
-
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
114
|
-
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
|
115
|
-
THIS SOFTWARE.
|
|
116
|
-
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
---
|
|
120
|
-
|
|
121
|
-
### [cheap-ruler-cpp](https://github.com/mapbox/cheap-ruler-cpp) by Mapbox
|
|
122
|
-
|
|
123
|
-
```
|
|
124
|
-
ISC License
|
|
125
|
-
|
|
126
|
-
Copyright (c) 2017, Mapbox
|
|
127
|
-
|
|
128
|
-
Permission to use, copy, modify, and/or distribute this software for any purpose
|
|
129
|
-
with or without fee is hereby granted, provided that the above copyright notice
|
|
130
|
-
and this permission notice appear in all copies.
|
|
131
|
-
|
|
132
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
133
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
134
|
-
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
135
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
136
|
-
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
137
|
-
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
|
138
|
-
THIS SOFTWARE.
|
|
139
|
-
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
---
|
|
143
|
-
|
|
144
|
-
### [Boost C++ Libraries](https://www.boost.org) by Boost authors
|
|
145
|
-
|
|
146
|
-
```
|
|
147
|
-
Boost Software License - Version 1.0 - August 17th, 2003
|
|
148
|
-
|
|
149
|
-
Permission is hereby granted, free of charge, to any person or organization
|
|
150
|
-
obtaining a copy of the software and accompanying documentation covered by
|
|
151
|
-
this license (the "Software") to use, reproduce, display, distribute,
|
|
152
|
-
execute, and transmit the Software, and to prepare derivative works of the
|
|
153
|
-
Software, and to permit third-parties to whom the Software is furnished to
|
|
154
|
-
do so, all subject to the following:
|
|
155
|
-
|
|
156
|
-
The copyright notices in the Software and this entire statement, including
|
|
157
|
-
the above license grant, this restriction and the following disclaimer,
|
|
158
|
-
must be included in all copies of the Software, in whole or in part, and
|
|
159
|
-
all derivative works of the Software, unless such copies or derivative
|
|
160
|
-
works are solely in the form of machine-executable object code generated by
|
|
161
|
-
a source language processor.
|
|
162
|
-
|
|
163
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
164
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
165
|
-
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
|
166
|
-
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
|
167
|
-
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
|
168
|
-
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
169
|
-
DEALINGS IN THE SOFTWARE.
|
|
170
|
-
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
---
|
|
174
|
-
|
|
175
|
-
### [csscolorparser](https://github.com/mapbox/css-color-parser-cpp) by Dean McNamee and Konstantin Käfer
|
|
176
|
-
|
|
177
|
-
```
|
|
178
|
-
(c) Dean McNamee <dean@gmail.com>, 2012.
|
|
179
|
-
(c) Konstantin Käfer <mail@kkaefer.com>, 2014.
|
|
180
|
-
|
|
181
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
182
|
-
of this software and associated documentation files (the "Software"), to
|
|
183
|
-
deal in the Software without restriction, including without limitation the
|
|
184
|
-
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
185
|
-
sell copies of the Software, and to permit persons to whom the Software is
|
|
186
|
-
furnished to do so, subject to the following conditions:
|
|
187
|
-
|
|
188
|
-
The above copyright notice and this permission notice shall be included in
|
|
189
|
-
all copies or substantial portions of the Software.
|
|
190
|
-
|
|
191
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
192
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
193
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
194
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
195
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
196
|
-
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
197
|
-
IN THE SOFTWARE.
|
|
198
|
-
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
---
|
|
202
|
-
|
|
203
|
-
### [earcut.hpp](https://github.com/mapbox/earcut.hpp) by Mapbox
|
|
204
|
-
|
|
205
|
-
```
|
|
206
|
-
ISC License
|
|
207
|
-
|
|
208
|
-
Copyright (c) 2015, Mapbox
|
|
209
|
-
|
|
210
|
-
Permission to use, copy, modify, and/or distribute this software for any purpose
|
|
211
|
-
with or without fee is hereby granted, provided that the above copyright notice
|
|
212
|
-
and this permission notice appear in all copies.
|
|
213
|
-
|
|
214
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
215
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
216
|
-
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
217
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
218
|
-
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
219
|
-
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
|
220
|
-
THIS SOFTWARE.
|
|
221
|
-
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
---
|
|
225
|
-
|
|
226
|
-
### [eternal](https://github.com/mapbox/eternal) by Mapbox
|
|
227
|
-
|
|
228
|
-
```
|
|
229
|
-
ISC License
|
|
230
|
-
|
|
231
|
-
Copyright (c) 2018, Mapbox
|
|
232
|
-
|
|
233
|
-
Permission to use, copy, modify, and/or distribute this software for any purpose
|
|
234
|
-
with or without fee is hereby granted, provided that the above copyright notice
|
|
235
|
-
and this permission notice appear in all copies.
|
|
236
|
-
|
|
237
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
238
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
239
|
-
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
240
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
241
|
-
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
242
|
-
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
|
243
|
-
THIS SOFTWARE.
|
|
244
|
-
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
---
|
|
248
|
-
|
|
249
|
-
### [parsedate](https://curl.haxx.se) by Daniel Stenberg and others
|
|
250
|
-
|
|
251
|
-
```
|
|
252
|
-
COPYRIGHT AND PERMISSION NOTICE
|
|
253
|
-
|
|
254
|
-
Copyright (c) 1996 - 2020, Daniel Stenberg, <daniel@haxx.se>, and many
|
|
255
|
-
contributors, see the THANKS file.
|
|
256
|
-
|
|
257
|
-
All rights reserved.
|
|
258
|
-
|
|
259
|
-
Permission to use, copy, modify, and distribute this software for any purpose
|
|
260
|
-
with or without fee is hereby granted, provided that the above copyright
|
|
261
|
-
notice and this permission notice appear in all copies.
|
|
262
|
-
|
|
263
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
264
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
265
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
|
|
266
|
-
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
267
|
-
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
268
|
-
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
|
269
|
-
OR OTHER DEALINGS IN THE SOFTWARE.
|
|
270
|
-
|
|
271
|
-
Except as contained in this notice, the name of a copyright holder shall not
|
|
272
|
-
be used in advertising or otherwise to promote the sale, use or other dealings
|
|
273
|
-
in this Software without prior written authorization of the copyright holder.
|
|
274
|
-
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
---
|
|
278
|
-
|
|
279
|
-
### [polylabel](https://github.com/mapbox/polylabel) by Mapbox
|
|
280
|
-
|
|
281
|
-
```
|
|
282
|
-
ISC License
|
|
283
|
-
Copyright (c) 2016 Mapbox
|
|
284
|
-
|
|
285
|
-
Permission to use, copy, modify, and/or distribute this software for any purpose
|
|
286
|
-
with or without fee is hereby granted, provided that the above copyright notice
|
|
287
|
-
and this permission notice appear in all copies.
|
|
288
|
-
|
|
289
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD TO
|
|
290
|
-
THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
|
|
291
|
-
IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
|
|
292
|
-
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
|
|
293
|
-
OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
|
294
|
-
ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
|
295
|
-
SOFTWARE.
|
|
296
|
-
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
---
|
|
300
|
-
|
|
301
|
-
### [protozero](https://github.com/mapbox/protozero) by Mapbox
|
|
302
|
-
|
|
303
|
-
```
|
|
304
|
-
protozero copyright (c) Mapbox.
|
|
305
|
-
|
|
306
|
-
Redistribution and use in source and binary forms, with or without
|
|
307
|
-
modification, are permitted provided that the following conditions are
|
|
308
|
-
met:
|
|
309
|
-
|
|
310
|
-
* Redistributions of source code must retain the above copyright
|
|
311
|
-
notice, this list of conditions and the following disclaimer.
|
|
312
|
-
* Redistributions in binary form must reproduce the above copyright
|
|
313
|
-
notice, this list of conditions and the following disclaimer in
|
|
314
|
-
the documentation and/or other materials provided with the
|
|
315
|
-
distribution.
|
|
316
|
-
|
|
317
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
|
318
|
-
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
|
319
|
-
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
320
|
-
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
|
321
|
-
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
322
|
-
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
323
|
-
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES LOSS OF USE, DATA, OR
|
|
324
|
-
PROFITS OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
325
|
-
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
326
|
-
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
327
|
-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
328
|
-
|
|
329
|
-
```
|
|
330
|
-
|
|
331
|
-
---
|
|
332
|
-
|
|
333
|
-
### [unique_resource](https://github.com/okdshin/unique_resource) by Shintarou Okada
|
|
334
|
-
|
|
335
|
-
```
|
|
336
|
-
Boost Software License - Version 1.0 - August 17th, 2003
|
|
337
|
-
|
|
338
|
-
Permission is hereby granted, free of charge, to any person or organization
|
|
339
|
-
obtaining a copy of the software and accompanying documentation covered by
|
|
340
|
-
this license (the "Software") to use, reproduce, display, distribute,
|
|
341
|
-
execute, and transmit the Software, and to prepare derivative works of the
|
|
342
|
-
Software, and to permit third-parties to whom the Software is furnished to
|
|
343
|
-
do so, all subject to the following:
|
|
344
|
-
|
|
345
|
-
The copyright notices in the Software and this entire statement, including
|
|
346
|
-
the above license grant, this restriction and the following disclaimer,
|
|
347
|
-
must be included in all copies of the Software, in whole or in part, and
|
|
348
|
-
all derivative works of the Software, unless such copies or derivative
|
|
349
|
-
works are solely in the form of machine-executable object code generated by
|
|
350
|
-
a source language processor.
|
|
351
|
-
|
|
352
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
353
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
354
|
-
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
|
355
|
-
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
|
356
|
-
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
|
357
|
-
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
358
|
-
DEALINGS IN THE SOFTWARE.
|
|
359
|
-
|
|
360
|
-
```
|
|
361
|
-
|
|
362
|
-
---
|
|
363
|
-
|
|
364
|
-
### [vector-tile](https://github.com/mapbox/vector-tile) by Mapbox
|
|
365
|
-
|
|
366
|
-
```
|
|
367
|
-
Copyright (c) 2016, Mapbox
|
|
368
|
-
|
|
369
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
370
|
-
purpose with or without fee is hereby granted, provided that the above
|
|
371
|
-
copyright notice and this permission notice appear in all copies.
|
|
372
|
-
|
|
373
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
374
|
-
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
375
|
-
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
376
|
-
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
377
|
-
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
378
|
-
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
379
|
-
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
380
|
-
|
|
381
|
-
```
|
|
382
|
-
|
|
383
|
-
---
|
|
384
|
-
|
|
385
|
-
### [wagyu](https://github.com/mapbox/wagyu.git) by Angus Johnson and Mapbox
|
|
386
|
-
|
|
387
|
-
```
|
|
388
|
-
Parts of the code in the Wagyu Library are derived from the version of the
|
|
389
|
-
Clipper Library by Angus Johnson listed below.
|
|
390
|
-
|
|
391
|
-
Author : Angus Johnson
|
|
392
|
-
Version : 6.4.0
|
|
393
|
-
Date : 2 July 2015
|
|
394
|
-
Website : http://www.angusj.com
|
|
395
|
-
|
|
396
|
-
Copyright for portions of the derived code in the Wagyu library are held
|
|
397
|
-
by Angus Johnson, 2010-2015. All other copyright for the Wagyu Library are held by
|
|
398
|
-
Mapbox, 2016. This code is published in accordance with, and retains the same license
|
|
399
|
-
as the Clipper Library by Angus Johnson.
|
|
400
|
-
|
|
401
|
-
Copyright (c) 2010-2015, Angus Johnson
|
|
402
|
-
Copyright (c) 2016, Mapbox
|
|
403
|
-
|
|
404
|
-
Permission is hereby granted, free of charge, to any person or organization
|
|
405
|
-
obtaining a copy of the software and accompanying documentation covered by
|
|
406
|
-
this license (the "Software") to use, reproduce, display, distribute,
|
|
407
|
-
execute, and transmit the Software, and to prepare derivative works of the
|
|
408
|
-
Software, and to permit third-parties to whom the Software is furnished to
|
|
409
|
-
do so, all subject to the following:
|
|
410
|
-
|
|
411
|
-
The copyright notices in the Software and this entire statement, including
|
|
412
|
-
the above license grant, this restriction and the following disclaimer,
|
|
413
|
-
must be included in all copies of the Software, in whole or in part, and
|
|
414
|
-
all derivative works of the Software, unless such copies or derivative
|
|
415
|
-
works are solely in the form of machine-executable object code generated by
|
|
416
|
-
a source language processor.
|
|
417
|
-
|
|
418
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
419
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
420
|
-
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
|
421
|
-
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
|
422
|
-
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
|
423
|
-
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
424
|
-
DEALINGS IN THE SOFTWARE.
|
|
425
|
-
|
|
426
|
-
```
|
|
427
|
-
|
|
428
|
-
---
|
|
429
|
-
|
|
430
|
-
### [mapbox-base](https://github.com/mapbox/mapbox-base) by Mapbox
|
|
431
|
-
|
|
432
|
-
```
|
|
433
|
-
Copyright (c) MapBox
|
|
434
|
-
All rights reserved.
|
|
435
|
-
|
|
436
|
-
Redistribution and use in source and binary forms, with or without modification,
|
|
437
|
-
are permitted provided that the following conditions are met:
|
|
438
|
-
|
|
439
|
-
- Redistributions of source code must retain the above copyright notice, this
|
|
440
|
-
list of conditions and the following disclaimer.
|
|
441
|
-
- Redistributions in binary form must reproduce the above copyright notice, this
|
|
442
|
-
list of conditions and the following disclaimer in the documentation and/or
|
|
443
|
-
other materials provided with the distribution.
|
|
444
|
-
- Neither the name "MapBox" nor the names of its contributors may be
|
|
445
|
-
used to endorse or promote products derived from this software without
|
|
446
|
-
specific prior written permission.
|
|
447
|
-
|
|
448
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
449
|
-
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
450
|
-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
451
|
-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
|
452
|
-
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
453
|
-
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES
|
|
454
|
-
LOSS OF USE, DATA, OR PROFITS OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
|
455
|
-
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
456
|
-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
457
|
-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
458
|
-
```
|
|
459
|
-
|
|
460
|
-
---
|
|
461
|
-
|
|
462
|
-
### [expected-lite](https://github.com/martinmoene/expected-lite) by Martin Moene
|
|
463
|
-
|
|
464
|
-
```
|
|
465
|
-
Boost Software License - Version 1.0 - August 17th, 2003
|
|
466
|
-
|
|
467
|
-
Permission is hereby granted, free of charge, to any person or organization
|
|
468
|
-
obtaining a copy of the software and accompanying documentation covered by
|
|
469
|
-
this license (the "Software") to use, reproduce, display, distribute,
|
|
470
|
-
execute, and transmit the Software, and to prepare derivative works of the
|
|
471
|
-
Software, and to permit third-parties to whom the Software is furnished to
|
|
472
|
-
do so, all subject to the following:
|
|
473
|
-
|
|
474
|
-
The copyright notices in the Software and this entire statement, including
|
|
475
|
-
the above license grant, this restriction and the following disclaimer,
|
|
476
|
-
must be included in all copies of the Software, in whole or in part, and
|
|
477
|
-
all derivative works of the Software, unless such copies or derivative
|
|
478
|
-
works are solely in the form of machine-executable object code generated by
|
|
479
|
-
a source language processor.
|
|
480
|
-
|
|
481
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
482
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
483
|
-
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
|
484
|
-
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
|
485
|
-
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
|
486
|
-
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
487
|
-
DEALINGS IN THE SOFTWARE.
|
|
488
|
-
|
|
489
|
-
```
|
|
490
|
-
|
|
491
|
-
---
|
|
492
|
-
|
|
493
|
-
### [RapidJSON](https://rapidjson.org) by THL A29 Limited, a Tencent company, and Milo Yip
|
|
494
|
-
|
|
495
|
-
```
|
|
496
|
-
Tencent is pleased to support the open source community by making RapidJSON available.
|
|
497
|
-
|
|
498
|
-
Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
|
|
499
|
-
|
|
500
|
-
If you have downloaded a copy of the RapidJSON binary from Tencent, please note that the RapidJSON binary is licensed under the MIT License.
|
|
501
|
-
If you have downloaded a copy of the RapidJSON source code from Tencent, please note that RapidJSON source code is licensed under the MIT License, except for the third-party components listed below which are subject to different license terms. Your integration of RapidJSON into your own projects may require compliance with the MIT License, as well as the other licenses applicable to the third-party components included within RapidJSON. To avoid the problematic JSON license in your own projects, it's sufficient to exclude the bin/jsonchecker/ directory, as it's the only code under the JSON license.
|
|
502
|
-
A copy of the MIT License is included in this file.
|
|
503
|
-
|
|
504
|
-
Other dependencies and licenses:
|
|
505
|
-
|
|
506
|
-
Open Source Software Licensed Under the BSD License:
|
|
507
|
-
--------------------------------------------------------------------
|
|
508
|
-
|
|
509
|
-
The msinttypes r29
|
|
510
|
-
Copyright (c) 2006-2013 Alexander Chemeris
|
|
511
|
-
All rights reserved.
|
|
512
|
-
|
|
513
|
-
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
514
|
-
|
|
515
|
-
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
516
|
-
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
517
|
-
* Neither the name of copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
518
|
-
|
|
519
|
-
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES LOSS OF USE, DATA, OR PROFITS OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
520
|
-
|
|
521
|
-
Open Source Software Licensed Under the JSON License:
|
|
522
|
-
--------------------------------------------------------------------
|
|
523
|
-
|
|
524
|
-
json.org
|
|
525
|
-
Copyright (c) 2002 JSON.org
|
|
526
|
-
All Rights Reserved.
|
|
527
|
-
|
|
528
|
-
JSON_checker
|
|
529
|
-
Copyright (c) 2002 JSON.org
|
|
530
|
-
All Rights Reserved.
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
Terms of the JSON License:
|
|
534
|
-
---------------------------------------------------
|
|
535
|
-
|
|
536
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
537
|
-
|
|
538
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
539
|
-
|
|
540
|
-
The Software shall be used for Good, not Evil.
|
|
541
|
-
|
|
542
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
Terms of the MIT License:
|
|
546
|
-
--------------------------------------------------------------------
|
|
547
|
-
|
|
548
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
549
|
-
|
|
550
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
551
|
-
|
|
552
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
553
|
-
|
|
554
|
-
```
|
|
555
|
-
|
|
556
|
-
---
|
|
557
|
-
|
|
558
|
-
### [geojson.hpp](https://github.com/mapbox/geojson-cpp) by Mapbox
|
|
559
|
-
|
|
560
|
-
```
|
|
561
|
-
Copyright (c) 2016, Mapbox
|
|
562
|
-
|
|
563
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
564
|
-
purpose with or without fee is hereby granted, provided that the above
|
|
565
|
-
copyright notice and this permission notice appear in all copies.
|
|
566
|
-
|
|
567
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
568
|
-
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
569
|
-
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
570
|
-
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
571
|
-
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
572
|
-
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
573
|
-
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
574
|
-
|
|
575
|
-
```
|
|
576
|
-
|
|
577
|
-
---
|
|
578
|
-
|
|
579
|
-
### [geometry.hpp](https://github.com/mapbox/geometry.hpp) by Mapbox
|
|
580
|
-
|
|
581
|
-
```
|
|
582
|
-
Copyright (c) 2016, Mapbox
|
|
583
|
-
|
|
584
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
585
|
-
purpose with or without fee is hereby granted, provided that the above
|
|
586
|
-
copyright notice and this permission notice appear in all copies.
|
|
587
|
-
|
|
588
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
589
|
-
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
590
|
-
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
591
|
-
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
592
|
-
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
593
|
-
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
594
|
-
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
595
|
-
```
|
|
596
|
-
|
|
597
|
-
---
|
|
598
|
-
|
|
599
|
-
### [Optional](https://github.com/akrzemi1/Optional) by Andrzej Krzemienski
|
|
600
|
-
|
|
601
|
-
```
|
|
602
|
-
Boost Software License - Version 1.0 - August 17th, 2003
|
|
603
|
-
|
|
604
|
-
Permission is hereby granted, free of charge, to any person or organization
|
|
605
|
-
obtaining a copy of the software and accompanying documentation covered by
|
|
606
|
-
this license (the "Software") to use, reproduce, display, distribute,
|
|
607
|
-
execute, and transmit the Software, and to prepare derivative works of the
|
|
608
|
-
Software, and to permit third-parties to whom the Software is furnished to
|
|
609
|
-
do so, all subject to the following:
|
|
610
|
-
|
|
611
|
-
The copyright notices in the Software and this entire statement, including
|
|
612
|
-
the above license grant, this restriction and the following disclaimer,
|
|
613
|
-
must be included in all copies of the Software, in whole or in part, and
|
|
614
|
-
all derivative works of the Software, unless such copies or derivative
|
|
615
|
-
works are solely in the form of machine-executable object code generated by
|
|
616
|
-
a source language processor.
|
|
617
|
-
|
|
618
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
619
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
620
|
-
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
|
621
|
-
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
|
622
|
-
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
|
623
|
-
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
624
|
-
DEALINGS IN THE SOFTWARE.
|
|
625
|
-
|
|
626
|
-
```
|
|
627
|
-
|
|
628
|
-
---
|
|
629
|
-
|
|
630
|
-
### [variant](https://github.com/mapbox/variant) by Mapbox
|
|
631
|
-
|
|
632
|
-
```
|
|
633
|
-
Copyright (c) MapBox
|
|
634
|
-
All rights reserved.
|
|
635
|
-
|
|
636
|
-
Redistribution and use in source and binary forms, with or without modification,
|
|
637
|
-
are permitted provided that the following conditions are met:
|
|
638
|
-
|
|
639
|
-
- Redistributions of source code must retain the above copyright notice, this
|
|
640
|
-
list of conditions and the following disclaimer.
|
|
641
|
-
- Redistributions in binary form must reproduce the above copyright notice, this
|
|
642
|
-
list of conditions and the following disclaimer in the documentation and/or
|
|
643
|
-
other materials provided with the distribution.
|
|
644
|
-
- Neither the name "MapBox" nor the names of its contributors may be
|
|
645
|
-
used to endorse or promote products derived from this software without
|
|
646
|
-
specific prior written permission.
|
|
647
|
-
|
|
648
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
649
|
-
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
650
|
-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
651
|
-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
|
652
|
-
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
653
|
-
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES
|
|
654
|
-
LOSS OF USE, DATA, OR PROFITS OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
|
655
|
-
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
656
|
-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
657
|
-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
658
|
-
```
|
|
659
|
-
|
|
660
|
-
---
|
|
661
|
-
|
package/LICENSE.md
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
BSD 2-Clause License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2021 MapLibre contributors
|
|
4
|
-
|
|
5
|
-
Copyright (c) 2018-2021 MapTiler.com
|
|
6
|
-
|
|
7
|
-
Copyright (c) 2014-2020 Mapbox
|
|
8
|
-
|
|
9
|
-
Redistribution and use in source and binary forms, with or without
|
|
10
|
-
modification, are permitted provided that the following conditions are
|
|
11
|
-
met:
|
|
12
|
-
|
|
13
|
-
* Redistributions of source code must retain the above copyright
|
|
14
|
-
notice, this list of conditions and the following disclaimer.
|
|
15
|
-
* Redistributions in binary form must reproduce the above copyright
|
|
16
|
-
notice, this list of conditions and the following disclaimer in
|
|
17
|
-
the documentation and/or other materials provided with the
|
|
18
|
-
distribution.
|
|
19
|
-
|
|
20
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
|
21
|
-
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
|
22
|
-
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
23
|
-
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
|
24
|
-
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
25
|
-
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
26
|
-
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
27
|
-
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
28
|
-
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
29
|
-
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
30
|
-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/platform/node/README.md
DELETED
|
@@ -1,247 +0,0 @@
|
|
|
1
|
-
# @maplibre/maplibre-gl-native
|
|
2
|
-
|
|
3
|
-
[](https://www.npmjs.com/package/@maplibre/maplibre-gl-native)
|
|
4
|
-
[](https://github.com/maplibre/maplibre-native/actions/workflows/node-ci.yml)
|
|
5
|
-
|
|
6
|
-
## Installing
|
|
7
|
-
|
|
8
|
-
Binaries are available and downloaded during install for the following platforms:
|
|
9
|
-
|
|
10
|
-
- Operating systems:
|
|
11
|
-
- Ubuntu 22.04 (amd64/arm64)
|
|
12
|
-
- macOS 12 (amd64/arm64)
|
|
13
|
-
- Windows (amd64)
|
|
14
|
-
- Node.js 16, 18, 20, 22
|
|
15
|
-
|
|
16
|
-
Run:
|
|
17
|
-
|
|
18
|
-
```
|
|
19
|
-
npm install @maplibre/maplibre-gl-native
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Further platforms might work [with additional libraries installed](https://github.com/maplibre/maplibre-native/tree/main/platform/linux#prerequisites).
|
|
23
|
-
|
|
24
|
-
## Testing
|
|
25
|
-
|
|
26
|
-
```
|
|
27
|
-
npm test
|
|
28
|
-
npm run test-suite
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Rendering a map tile
|
|
32
|
-
|
|
33
|
-
The minimal example requires only the instantiation of the `mbgl.Map` object, loading a style and calling the `map.render` method:
|
|
34
|
-
|
|
35
|
-
```js
|
|
36
|
-
var mbgl = require('@maplibre/maplibre-gl-native');
|
|
37
|
-
var sharp = require('sharp');
|
|
38
|
-
|
|
39
|
-
var map = new mbgl.Map();
|
|
40
|
-
|
|
41
|
-
map.load(require('./test/fixtures/style.json'));
|
|
42
|
-
|
|
43
|
-
map.render(function(err, buffer) {
|
|
44
|
-
if (err) throw err;
|
|
45
|
-
|
|
46
|
-
map.release();
|
|
47
|
-
|
|
48
|
-
var image = sharp(buffer, {
|
|
49
|
-
raw: {
|
|
50
|
-
width: 512,
|
|
51
|
-
height: 512,
|
|
52
|
-
channels: 4
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
// Convert raw image buffer to PNG
|
|
57
|
-
image.toFile('image.png', function(err) {
|
|
58
|
-
if (err) throw err;
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
But you can customize the map providing an options object to `mbgl.Map` constructor and to `map.render` method:
|
|
64
|
-
|
|
65
|
-
```js
|
|
66
|
-
var fs = require('fs');
|
|
67
|
-
var path = require('path');
|
|
68
|
-
var mbgl = require('@maplibre/maplibre-gl-native');
|
|
69
|
-
var sharp = require('sharp');
|
|
70
|
-
|
|
71
|
-
var options = {
|
|
72
|
-
request: function(req, callback) {
|
|
73
|
-
fs.readFile(path.join(__dirname, 'test', req.url), function(err, data) {
|
|
74
|
-
callback(err, { data: data });
|
|
75
|
-
});
|
|
76
|
-
},
|
|
77
|
-
ratio: 1
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
var map = new mbgl.Map(options);
|
|
81
|
-
|
|
82
|
-
map.load(require('./test/fixtures/style.json'));
|
|
83
|
-
|
|
84
|
-
map.render({zoom: 0}, function(err, buffer) {
|
|
85
|
-
if (err) throw err;
|
|
86
|
-
|
|
87
|
-
map.release();
|
|
88
|
-
|
|
89
|
-
var image = sharp(buffer, {
|
|
90
|
-
raw: {
|
|
91
|
-
width: 512,
|
|
92
|
-
height: 512,
|
|
93
|
-
channels: 4
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
// Convert raw image buffer to PNG
|
|
98
|
-
image.toFile('image.png', function(err) {
|
|
99
|
-
if (err) throw err;
|
|
100
|
-
});
|
|
101
|
-
});
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
The first argument passed to `map.render` is an options object, all keys are optional:
|
|
105
|
-
|
|
106
|
-
```js
|
|
107
|
-
{
|
|
108
|
-
zoom: {zoom}, // number, defaults to 0
|
|
109
|
-
width: {width}, // number (px), defaults to 512
|
|
110
|
-
height: {height}, // number (px), defaults to 512
|
|
111
|
-
center: [{longitude}, {latitude}], // array of numbers (coordinates), defaults to [0,0]
|
|
112
|
-
bearing: {bearing}, // number (in degrees, counter-clockwise from north), defaults to 0
|
|
113
|
-
pitch: {pitch}, // number (in degrees, arcing towards the horizon), defaults to 0
|
|
114
|
-
classes: {classes} // array of strings
|
|
115
|
-
}
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
When you are finished using a map object, you can call `map.release()` to permanently dispose the internal map resources. This is not necessary, but can be helpful to optimize resource usage (memory, file sockets) on a more granular level than V8's garbage collector. Calling `map.release()` will prevent a map object from being used for any further render calls, but can be safely called as soon as the `map.render()` callback returns, as the returned pixel buffer will always be retained for the scope of the callback.
|
|
119
|
-
|
|
120
|
-
## Implementing a file source
|
|
121
|
-
|
|
122
|
-
When creating a `Map`, you can optionally pass an options object (with an optional `request` method and optional `ratio` number) as the first parameter. The `request()` method handles a request for a resource. The `ratio` sets the scale at which the map will render tiles, such as `2.0` for rendering images for high pixel density displays:
|
|
123
|
-
|
|
124
|
-
```js
|
|
125
|
-
var map = new mbgl.Map({
|
|
126
|
-
request: function(req) {
|
|
127
|
-
// TODO
|
|
128
|
-
},
|
|
129
|
-
ratio: 2.0
|
|
130
|
-
});
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
If you omit the `request` method, the `map` object will use the default internal request handlers, which is ok for most cases. However, if you have specific needs, you can implement your own `request` handler. When a `request` method is provided, all `map` resources will be requested by calling the `request` method with two parameters, called `req` and `callback` respectively in this example. The `req` parameter has two properties:
|
|
134
|
-
|
|
135
|
-
```json
|
|
136
|
-
{
|
|
137
|
-
"url": "http://example.com",
|
|
138
|
-
"kind": 1
|
|
139
|
-
}
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
The `kind` is an enum and defined in [`mbgl.Resource`](https://github.com/maplibre/maplibre-native/blob/main/include/mbgl/storage/resource.hpp):
|
|
143
|
-
|
|
144
|
-
```json
|
|
145
|
-
{
|
|
146
|
-
"Unknown": 0,
|
|
147
|
-
"Style": 1,
|
|
148
|
-
"Source": 2,
|
|
149
|
-
"Tile": 3,
|
|
150
|
-
"Glyphs": 4,
|
|
151
|
-
"SpriteImage": 5,
|
|
152
|
-
"SpriteJSON": 6
|
|
153
|
-
}
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
The `kind` enum has no significance for anything but serves as a hint to your implemention as to what sort of resource to expect. E.g., your implementation could choose caching strategies based on the expected file type.
|
|
157
|
-
|
|
158
|
-
The `callback` parameter is a function that must be called with two parameters: an error message (if there are no errors, then you must pass `null`), and a response object:
|
|
159
|
-
|
|
160
|
-
```js
|
|
161
|
-
{
|
|
162
|
-
data: {data}, // required, must be a byte array, usually a Buffer object
|
|
163
|
-
modified: {modified}, // Date, optional
|
|
164
|
-
expires: {expires}, // Date, optional
|
|
165
|
-
etag: {etag} // string, optional
|
|
166
|
-
}
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
If there is no data to be sent to the `callback` (empty data, or `no-content` respose), then it must be called without parameters. The `request` implementation should pass uncompressed data to `callback`. If you are downloading assets from a source that applies gzip transport encoding, the implementation must decompress the results before passing them on.
|
|
170
|
-
|
|
171
|
-
A sample implementation that reads files from disk would look like the following:
|
|
172
|
-
|
|
173
|
-
```js
|
|
174
|
-
var map = new mbgl.Map({
|
|
175
|
-
request: function(req, callback) {
|
|
176
|
-
fs.readFile(path.join('base/path', req.url), function(err, data) {
|
|
177
|
-
callback(err, { data: data });
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
});
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
This is a very barebones implementation and you'll probably want a better implementation. E.g. it passes the url verbatim to the file system, but you'd want add some logic that normalizes `http` URLs. You'll notice that once your implementation has obtained the requested file, you have to deliver it to the requestee by calling `callback()`, which takes either an error object or `null` and an object with several keys:
|
|
184
|
-
|
|
185
|
-
```js
|
|
186
|
-
{
|
|
187
|
-
modified: new Date(),
|
|
188
|
-
expires: new Date(),
|
|
189
|
-
etag: "string",
|
|
190
|
-
data: new Buffer()
|
|
191
|
-
}
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
A sample implementation that uses [`request`](https://github.com/request/request) to fetch data from a remote source:
|
|
195
|
-
|
|
196
|
-
```js
|
|
197
|
-
var mbgl = require('@maplibre/maplibre-gl-native');
|
|
198
|
-
var request = require('request');
|
|
199
|
-
|
|
200
|
-
var map = new mbgl.Map({
|
|
201
|
-
request: function(req, callback) {
|
|
202
|
-
request({
|
|
203
|
-
url: req.url,
|
|
204
|
-
encoding: null,
|
|
205
|
-
gzip: true
|
|
206
|
-
}, function (err, res, body) {
|
|
207
|
-
if (err) {
|
|
208
|
-
callback(err);
|
|
209
|
-
} else if (res.statusCode == 200) {
|
|
210
|
-
var response = {};
|
|
211
|
-
|
|
212
|
-
if (res.headers.modified) { response.modified = new Date(res.headers.modified); }
|
|
213
|
-
if (res.headers.expires) { response.expires = new Date(res.headers.expires); }
|
|
214
|
-
if (res.headers.etag) { response.etag = res.headers.etag; }
|
|
215
|
-
|
|
216
|
-
response.data = body;
|
|
217
|
-
|
|
218
|
-
callback(null, response);
|
|
219
|
-
} else if (res.statusCode == 204) {
|
|
220
|
-
callback();
|
|
221
|
-
} else {
|
|
222
|
-
callback(new Error(JSON.parse(body).message));
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
});
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
Stylesheets are free to use any protocols, but your implementation of `request` must support these; e.g. you could use `s3://` to indicate that files are supposed to be loaded from S3.
|
|
230
|
-
|
|
231
|
-
## Listening for log events
|
|
232
|
-
|
|
233
|
-
The module imported with `require('maplibre-gl-native')` inherits from [`EventEmitter`](https://nodejs.org/api/events.html), and the `NodeLogObserver` will push log events to this. Log messages can have [`class`](https://github.com/maplibre/maplibre-native/blob/node-v2.1.0/include/mbgl/platform/event.hpp#L43-L60), [`severity`](https://github.com/maplibre/maplibre-native/blob/node-v2.1.0/include/mbgl/platform/event.hpp#L17-L23), `code` ([HTTP status codes](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html)), and `text` parameters.
|
|
234
|
-
|
|
235
|
-
```js
|
|
236
|
-
var mbgl = require('@maplibre/maplibre-gl-native');
|
|
237
|
-
mbgl.on('message', function(msg) {
|
|
238
|
-
t.ok(msg, 'emits error');
|
|
239
|
-
t.equal(msg.class, 'Style');
|
|
240
|
-
t.equal(msg.severity, 'ERROR');
|
|
241
|
-
t.ok(msg.text.match(/Failed to load/), 'error text matches');
|
|
242
|
-
});
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
## Contributing
|
|
246
|
-
|
|
247
|
-
See [DEVELOPING.md](DEVELOPING.md) for instructions on building this module for development.
|
|
File without changes
|