-
Notifications
You must be signed in to change notification settings - Fork 0
/
test1234.html
34 lines (31 loc) · 1.23 KB
/
test1234.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
<!--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: 300,
lrlat: 37.848731523430196,
lrlon: -122.20908713544797,
ullat: 37.88708748276975,
ullon: -122.3027284165759,
w: 305
},
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/1.png, img/2.png, img/3.png, img/4.png], and should return {raster_ul_lon=-122.2998046875, raster_height=512, depth=1, raster_lr_lon=-122.2119140625, raster_lr_lat=37.82280243352756, raster_ul_lat=37.892195547244356, query_success=true, raster_width=512}
</body>
</html>