| OLD | NEW |
| 1 <head> | 1 <!doctype html> |
| 2 <style> | 2 <html> |
| 3 body { | 3 <head> |
| 4 margin: 0px; | 4 <title>Popup</title> |
| 5 padding: 0px; | 5 <link href="popup.css" rel="stylesheet" type="text/css"> |
| 6 } | 6 </head> |
| 7 #map { | 7 <body> |
| 8 width: 512px; | 8 <img id="map"> |
| 9 height: 512px; | 9 <script src="popup.js"></script> |
| 10 } | 10 </body> |
| 11 </style> | 11 </html> |
| 12 <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAATfHumD
bW3OmRByfquHd3SRTRERdeAiwZ9EeJWta3L_JZVS0bOBRQeZgr4K0xyVKzUdnnuFl8X9PX0w&sensor=
false" | |
| 13 type="text/javascript"></script> | |
| 14 <script> | |
| 15 var maps_key = "ABQIAAAATfHumDbW3OmRByfquHd3SRTRERdeAiwZ9EeJWta3L_JZVS0bOBRQeZgr
4K0xyVKzUdnnuFl8X9PX0w"; | |
| 16 | |
| 17 function gclient_geocode(address) { | |
| 18 var geocoder = new GClientGeocoder(); | |
| 19 geocoder.getLatLng(address, function(point) { | |
| 20 if (!point) { | |
| 21 console.log(address + " not found"); | |
| 22 } else { | |
| 23 var latlng = point.toUrlValue(); | |
| 24 var url = "http://maps.google.com/staticmap?center=" + latlng + | |
| 25 "&markers=" + latlng + "&zoom=14" + | |
| 26 "&size=512x512&sensor=false&key=" + maps_key; | |
| 27 var map = document.getElementById("map"); | |
| 28 map.src = url; | |
| 29 } | |
| 30 }); | |
| 31 } | |
| 32 | |
| 33 function map() { | |
| 34 var address = chrome.extension.getBackgroundPage().selectedAddress; | |
| 35 if (address) | |
| 36 gclient_geocode(address); | |
| 37 }; | |
| 38 </script> | |
| 39 </head> | |
| 40 <body onload="map()"> | |
| 41 <img id="map" onclick="window.close()"> | |
| 42 </body> | |
| OLD | NEW |