Commit e29897ba by Mykhailo Makohin

finish integrate google map

parent 33761f70
......@@ -138,25 +138,35 @@ function initTip(){
$('[data-toggle=tooltip]').tooltip();
}
function initMap(){
if ($('#map').length) {
var map = new GMaps({
el: '#map',
lat: -12.043333,
lng: -77.028333,
zoomControl : true,
zoomControlOpt: {
style : 'SMALL',
position: 'TOP_LEFT'
},
panControl : false,
streetViewControl : false,
mapTypeControl: false,
overviewMapControl: false
});
}
function initMap() {
// The location of Uluru
var uluru = {lat: 48.9161793, lng: 24.7258968};
// The map, centered at Uluru
var map = new google.maps.Map(
document.getElementById('map'), {zoom: 4, center: uluru});
// The marker, positioned at Uluru
var marker = new google.maps.Marker({position: uluru, map: map});
}
// function initMap(){
// if ($('#map').length) {
// var map = new GMaps({
// el: '#map',
// lat: -12.043333,
// lng: -77.028333,
// zoomControl : true,
// zoomControlOpt: {
// style : 'SMALL',
// position: 'TOP_LEFT'
// },
// panControl : false,
// streetViewControl : false,
// mapTypeControl: false,
// overviewMapControl: false
// });
// }
// }
function mobilePartners() {
var checkWidth = $(window).width();
......
......@@ -6,28 +6,31 @@
= csrf_meta_tags
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
= javascript_include_tag 'application', 'data-turbolinks-track': 'reload'
%meta{:charset => "utf-8"}
%meta{:charset => "utf-8"}/
%meta{:content => "", :name => "description"}/
%meta{:content => "width=device-width", :name => "viewport"}/
%meta{:content => "IE=edge", "http-equiv" => "X-UA-Compatible"}/
/
Fonts
\==================================================
%link{:href => "//fonts.googleapis.com/css?family=Open+Sans:400,600,700", :rel => "stylesheet", :type => "text/css"}/
%link{:href => "//fonts.googleapis.com/css?family=PT+Sans:400,700italic,700,400italic", :rel => "stylesheet", :type => "text/css"}/
%link{:href => "//fonts.googleapis.com/css?family=Noto+Serif:400,400italic&subset=latin,cyrillic-ext", :rel => "stylesheet", :type => "text/css"}/
:javascript
var GOOGLE_API_KEY="#{ENV['AIzaSyALmxk-nEaCo8KVfJTdAiVFPBKA9s0VnmM']}"
= javascript_include_tag 'application'
= javascript_include_tag "//maps.googleapis.com/maps/api/js?libraries=places&key=#{ENV['AIzaSyALmxk-nEaCo8KVfJTdAiVFPBKA9s0VnmM']}"
%link{:href => "//fonts.googleapis.com/css?family=PT+Sans+Narrow:400,700&subset=cyrillic-ext", :rel => "stylesheet"}/
%link{:href => "//fonts.googleapis.com/css?family=Roboto+Slab:300,400&subset=cyrillic-ext", :rel => "stylesheet"}/
%link{:href => "//fonts.googleapis.com/css?family=Roboto:300,500&subset=cyrillic-ext", :rel => "stylesheet"}/
/
Styles
\==================================================
/
Favicons + Touch Icons
\==================================================
%link{:href => "img/favicons/apple-touch-icon57.png", :rel => "icon", :type => "image/png"}/
%link{:href => "img/favicons/apple-touch-icon57.png", :rel => "apple-touch-icon", :sizes => "57x57"}/
%link{:href => "img/favicons/apple-touch-icon60.png", :rel => "apple-touch-icon", :sizes => "60x60"}/
%link{:href => "img/favicons/apple-touch-icon114.png", :rel => "apple-touch-icon", :sizes => "114x114"}/
%link{:href => "img/favicons/apple-touch-icon120.png", :rel => "apple-touch-icon", :sizes => "120x120"}/
%link{:href => "img/favicons/apple-touch-icon180.png", :rel => "apple-touch-icon", :sizes => "180x180"}/
%body
= render 'partials/modal'
- if current_page?(root_path)
......
/
Javascript
\==================================================
/ Connecting jQuery library from CDN
%script{:src => "//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"}
/ If CDN unavailable - connect local copy of jQuery
:javascript
window.jQuery || document.write('<script src="jquery.min.js"><\/script>')
/ Plugins goes here
%script{:src => "//maps.google.com/maps/api/js?sensor=true", :type => "text/javascript"}
/ %script{:src => "build.min.js"}
\ No newline at end of file
%script{:src => "http://maps.googleapis.com/maps/api/js?libraries=geometry&sensor=false&key=AIzaSyCd7M4P6CpmOv7_K1XGn_0JgEa47r97tu4&callback=initMap", :type => "text/javascript"}
:cdata
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment