-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
33 lines (31 loc) · 1.34 KB
/
test.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
<!--This file is a test file for your convenience.
It makes a request to the variable query_url and displays the base64 encoded image result. -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<img id="map">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script>
var query_url = "http://localhost:4567/raster";
$.get({
async: false,
url: query_url,
data: { h: 875,
lrlat: 37.87548268822065,
lrlon: -122.24053369025242,
ullat: 37.87655856892288,
ullon: -122.24163047377972,
w: 892
},
success: function(data) {
map.src = "data:image/png;base64," + data.b64_encoded_image_data;
},
dataType: "json"
});
</script>
</head>
<body>
<p>The picture above should correspond to [img/2143411.png, img/2143412.png, img/2143413.png, img/2143414.png, img/2143421.png, img/2143423.png, img/2143431.png, img/2143432.png, img/2143441.png], and should return {raster_ul_lon=-122.24212646484375, raster_height=768, depth=7, raster_lr_lon=-122.24006652832031, raster_lr_lat=37.87538940251607, raster_ul_lat=37.87701580361881, query_success=true, raster_width=768}
</body>
</html>