Server IP : 80.241.246.6 / Your IP : 216.73.216.188 Web Server : Apache/2.4.25 (Debian) System : Linux kharagauli 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64 User : www-data ( 33) PHP Version : 7.0.33-0+deb9u12 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/kharagauli1/moduls/weather/ |
Upload File : |
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Weather layer</title> <style> html, body, #map-canvas { height: 100%; margin: 0px; padding: 0px } </style> <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=weather"></script> </head> <body> <div id="zip_parent"> <input placeholder='შეიყვანეთ ქალაქის დასახელება' type="text" id="zip"><button id="bSubmit" onclick="if(document.getElementById('zip').value.length)maines(document.getElementById('zip').value);else alert('შეიყვანეთ ქალაქის დასახელება');">send</button> </div> <div id="map-canvas"></div> <script> var geocoder = new google.maps.Geocoder(); var latitude = "42.023411"; var longitude = "43.193936"; var map; function maines(vals,a){ geocoder.geocode({'address':vals},function(results, status){ if (status == google.maps.GeocoderStatus.OK) { latitude = results[0].geometry.location.lat(); longitude = results[0].geometry.location.lng(); var myLatlng = new google.maps.LatLng(latitude, longitude); initialize(latitude, longitude); }else alert('location not found'); }); } function initialize(){ var mapOptions = { zoom: 12, center: new google.maps.LatLng(latitude,longitude) }; map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); var weatherLayer = new google.maps.weather.WeatherLayer({ temperatureUnits: google.maps.weather.TemperatureUnit.CELSIUS }); weatherLayer.setMap(map); var cloudLayer = new google.maps.weather.CloudLayer(); cloudLayer.setMap(map); google.maps.event.addListener(map, 'click', function(event) { placeMarker(event.latLng); }); } google.maps.event.addDomListener(window, 'load', initialize); function placeMarker(location){ var marker = new google.maps.Marker({ position: location, map: map }); google.maps.event.addListener(marker, 'click', function(event) { alert(event.latLng); }); } //document.getElementById("bSubmit").addEventListener('click',maines); </script> </body> </html>