-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathurl.js
31 lines (29 loc) · 848 Bytes
/
url.js
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
/**
* Documentation for this Nearmap API:
* https://docs.nearmap.com/display/ND/Tile+API
*/
function urlTemplate(z, x, y, survey, layer) {
let until = '';
if (survey) {
until = '&until=' + survey;
}
return 'https://api.nearmap.com/tiles/v3/' +
layer + '/' + z + '/' + x + '/' + y +
'.img?tertiary=satellite&apikey=' + DEMO_API_KEY + until;
}
/**
* Documentation for this Nearmap API:
* https://docs.nearmap.com/display/ND/Coverage+API
*/
function coverageUrlTemplate(east, west, north, south) {
return 'https://api.nearmap.com/coverage/v2/poly/' +
west + ',' + north + ',' +
east + ',' + north + ',' +
east + ',' + south + ',' +
west + ',' + south + ',' +
west + ',' + north +
'?apikey=' + DEMO_API_KEY +
'&since=' + SINCE +
'&until=' + UNTIL +
'&limit=1000';
}