From 342529c43d04b9e7b4ac6522b69a8aaac1d4428d Mon Sep 17 00:00:00 2001 From: zhegal Date: Tue, 5 Dec 2017 11:43:52 +0200 Subject: [PATCH] gmap --- frontend/assets/AppAsset.php | 16 ++++++++-------- frontend/web/css/custom.css | 1 + frontend/web/js/gmaps.init.js | 40 +++++++++++----------------------------- 3 files changed, 20 insertions(+), 37 deletions(-) diff --git a/frontend/assets/AppAsset.php b/frontend/assets/AppAsset.php index cd91097..a838146 100644 --- a/frontend/assets/AppAsset.php +++ b/frontend/assets/AppAsset.php @@ -21,15 +21,15 @@ 'css/custom.css', ]; public $js = [ - 'js/jquery.cookie.js', - 'js/waypoints.min.js', - 'js/jquery.counterup.min.js', - 'js/jquery.parallax-1.1.3.js', - 'js/front.js', - 'js/owl.carousel.min.js', - '//maps.google.com/maps/api/js?key=AIzaSyCgyPQhOmGEwyAdZ0uS6fJLLvnNxgncfy0', + '/js/jquery.cookie.js', + '/js/waypoints.min.js', + '/js/jquery.counterup.min.js', + '/js/jquery.parallax-1.1.3.js', + '/js/front.js', + '/js/owl.carousel.min.js', '/js/gmaps.init.js', - 'js/script.js', + '//maps.google.com/maps/api/js?key=AIzaSyCmojIzU4lFDnNUQymI35wxbiNDME-4l_Y', + '/js/script.js', ]; public $depends = [ 'yii\web\YiiAsset', diff --git a/frontend/web/css/custom.css b/frontend/web/css/custom.css index edfdcf8..5c7abe9 100644 --- a/frontend/web/css/custom.css +++ b/frontend/web/css/custom.css @@ -228,6 +228,7 @@ img.img-responsive.img-circle { color: #ff9701; border: 3px solid; border-color: #ff9701; + line-height: 75px; margin-bottom: 15px; } #sect3 .box-simple h3, #sect5 .box-simple h3{ diff --git a/frontend/web/js/gmaps.init.js b/frontend/web/js/gmaps.init.js index 58e3d00..52511a4 100644 --- a/frontend/web/js/gmaps.init.js +++ b/frontend/web/js/gmaps.init.js @@ -1,30 +1,12 @@ -$( - function() { - function initMap() { - var myLatLng = { - lat: parseFloat(window.lat), - lng: parseFloat(window.lon) - }; - - var map = new google.maps.Map( - document.getElementById('map'), { - center: myLatLng, - scrollwheel: false, - zoom: 14 - } - ); - - var marker = new google.maps.Marker( - { - position: myLatLng, - map: map, - title: 'Hello World!' - } - ); - - } - - window.initMap = initMap(); - } -); +function initMap() { + var uluru = {lat: 50.4416887, lng: 30.5175961}; + var map = new google.maps.Map(document.getElementById('map'), { + zoom: 4, + center: uluru + }); + var marker = new google.maps.Marker({ + position: uluru, + map: map + }); +} \ No newline at end of file -- libgit2 0.21.4