-
Notifications
You must be signed in to change notification settings - Fork 0
/
add_image.html
47 lines (44 loc) · 1.87 KB
/
add_image.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
// var overlay;
// DebugOverlay.prototype = new google.maps.OverlayView();
// var neBound = new google.maps.LatLng(-15.66, -47.79);
// var swBound = new google.maps.LatLng(-15.79214181, -47.88661518216243);
// var bounds = new google.maps.LatLngBounds(swBound, neBound);
/* console.log(map) */;
// var srcImage = 'https://i.imgur.com/77kuHBR.jpg';
// overlay = new DebugOverlay(bounds, srcImage, map);
// function DebugOverlay(bounds, image, map) {
// this.bounds_ = bounds;
// this.image_ = image;
// this.map_ = map;
// this.div_ = null;
// this.setMap(map);
// }
//
// DebugOverlay.prototype.onAdd = function() {
//
// var div = document.createElement('div');
// div.style.borderStyle = 'none';
// div.style.borderWidth = '0px';
// div.style.position = 'absolute';
// var img = document.createElement('img');
// img.src = this.image_;
// img.style.width = '100%';
// img.style.height = '100%';
// img.style.opacity = '0.9';
// img.style.position = 'absolute';
// div.appendChild(img);
// this.div_ = div;
// var panes = this.getPanes();
// panes.floatPane.appendChild(div);
// };
//
// DebugOverlay.prototype.draw = function() {
// var overlayProjection = this.getProjection();
// var sw = overlayProjection.fromLatLngToDivPixel(this.bounds_.getSouthWest());
// var ne = overlayProjection.fromLatLngToDivPixel(this.bounds_.getNorthEast());
// var div = this.div_;
// div.style.left = sw.x + 'px';
// div.style.top = ne.y + 'px';
// div.style.width = (ne.x - sw.x) + 'px';
// div.style.height = (sw.y - ne.y) + 'px';
// };