Home Files
Adminer
Execute Command
PHP Eval
Symlink
File Upload
Owner :
www-data
PHP Version
5.6.40-0+deb8u12
Disk Space
41.02 GB
Server Addr
19-www4
Your IP
10.10.10.40
Edit File
File:
<!DOCTYPE html> <html> <head> <title>Data Layer: Polygon</title> <meta name="viewport" content="initial-scale=1.0"> <meta charset="utf-8"> <!-- JS --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <script src="https://code.jquery.com/jquery-migrate-1.4.1.min.js"></script> <!-- Bootstrap --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <link crossorigin="anonymous" rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <style> /* Always set the map height explicitly to define the size of the div * element that contains the map. */ #map { height: 100%; } /* Optional: Makes the sample page fill the window. */ html, body { height: 100%; margin: 0; padding: 0; } </style> </head> <body> <!-- <img src="http://pesquisa.unemat.br/gaaf/svg/pr_70.svg" alt=""> --> <div id="map"></div> <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBf3mnkxnRX9NPxWwia5i_JvbZI-h5cE8s"> </script> <script> var overlay; USGSOverlay.prototype = new google.maps.OverlayView(); function initMap() { map = new google.maps.Map(document.getElementById('map'), { zoom: 6, center: { lat: -22.555296, lng: -44.620 } }); var boundsParana = new google.maps.LatLngBounds( new google.maps.LatLng(-26.53850, -54.640), new google.maps.LatLng(-22.5190, -48.680) ); // var srcImage = 'svg/pr_70.svg'; // var srcImage = 'http://pesquisa.unemat.br/gaaf/svg/pr_1718.svg'; // var srcImage = 'https://developers.google.com/maps/documentation/javascript/examples/full/images/talkeetna.png'; //var srcImage = 'svg/pr_70_green.png'; var srcImage = 'svg/pr_600.png'; overlay = new USGSOverlay(boundsParana, srcImage, map); } /** @constructor */ function USGSOverlay(bounds, image, map) { // Initialize all properties. this.bounds_ = bounds; this.image_ = image; this.map_ = map; // Define a property to hold the image's div. We'll // actually create this div upon receipt of the onAdd() // method so we'll leave it null for now. this.div_ = null; // Explicitly call setMap on this overlay. this.setMap(map); } /** * onAdd is called when the map's panes are ready and the overlay has been * added to the map. */ USGSOverlay.prototype.onAdd = function() { var div = document.createElement('div'); div.style.borderStyle = 'none'; div.style.borderWidth = '0px'; div.style.position = 'absolute'; // Create the img element and attach it to the div. var img = document.createElement('img'); img.src = this.image_; img.style.width = '100%'; img.style.height = '100%'; img.style.position = 'absolute'; div.appendChild(img); this.div_ = div; // Add the element to the "overlayLayer" pane. var panes = this.getPanes(); panes.overlayLayer.appendChild(div); }; USGSOverlay.prototype.draw = function() { // We use the south-west and north-east // coordinates of the overlay to peg it to the correct position and size. // To do this, we need to retrieve the projection from the overlay. var overlayProjection = this.getProjection(); // Retrieve the south-west and north-east coordinates of this overlay // in LatLngs and convert them to pixel coordinates. // We'll use these coordinates to resize the div. var sw = overlayProjection.fromLatLngToDivPixel(this.bounds_.getSouthWest()); var ne = overlayProjection.fromLatLngToDivPixel(this.bounds_.getNorthEast()); // Resize the image's div to fit the indicated dimensions. 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'; }; // The onRemove() method will be called automatically from the API if // we ever set the overlay's map property to 'null'. USGSOverlay.prototype.onRemove = function() { this.div_.parentNode.removeChild(this.div_); this.div_ = null; }; google.maps.event.addDomListener(window, 'load', initMap); </script> </body> </html>