Вход Регистрация
Файл: templates/backend/default/assets/js/google_maps.js
Строк: 111
<?php
/* Webarch Admin Dashboard 
/* This JS is only for DEMO Purposes - Extract the code that you need
-----------------------------------------------------------------*/ 

$(document).ready(function() {    
    $(
'#map').height($('.page-container').height());
    $( 
window ).resize(function() {
       $(
'#map').height($('.page-container').height());
    });
      
//Initialize Map
      
map = new GMaps({
        
el'#map',
        
lat: -12.043333,
        
lng: -77.028333,
        
zoomControl false,
        
zoomControlOpt: {
            
style 'SMALL',
            
position'TOP_LEFT'
        
},
         
markers: [
            {
lat: -12.043333lng: -77.028333},
            {
lat: -12.045333lng: -77.034},
            {
lat: -12.045633lng: -77.022}
        ],
        
panControl false,
        
streetViewControl false,
        
mapTypeControlfalse,
        
overviewMapControlfalse,
        
      });
      
// Add a random mark
      
setTimeout( function(){
          
map.addMarker({
                  
lat: -12.043333,
                  
lng: -77.028333,
                  
animationgoogle.maps.Animation.DROP,
                  
draggable:true,
                  
title'New marker'
          
});
      },
3000);
      
//Initialize Context Menu
        
map.setContextMenu({
        
control'map',
        
options: [{
          
title'Add marker',
          
name'add_marker',
          
action: function(e){
            
console.log(e.latLng.lat());
            
console.log(e.latLng.lng());
            
this.addMarker({
              
late.latLng.lat(),
              
lnge.latLng.lng(),
              
animationgoogle.maps.Animation.DROP,
              
draggable:true,
              
title'New marker'
            
});
            
this.hideContextMenu();
          }
        }, {
          
title'Center here',
          
name'center_here',
          
action: function(e){
            
this.setCenter(e.latLng.lat(), e.latLng.lng());
          }
        }]
      });
      
map.setContextMenu({
        
control'marker',
        
options: [{
          
title'Center here',
          
name'center_here',
          
action: function(e){
            
this.setCenter(e.latLng.lat(), e.latLng.lng());
          }
        }]
      });
            
map.travelRoute({
        
origin: [-12.044012922866312, -77.02470665341184],
        
destination: [-12.090814532191756, -77.02271108990476],
        
travelMode'driving',
        
step: function(e){
          $(
'#instructions').append('<li>'+e.instructions+'</li>');
          $(
'#instructions li:eq('+e.step_number+')').delay(450*e.step_number).fadeIn(200, function(){
            
map.drawPolyline({
              
pathe.path,
              
strokeColor'#131540',
              
strokeOpacity0.6,
              
strokeWeight6
            
});  
          });
        }
      });
      $(
"#map-zoom-out").click(function() {
         
map.zoomOut(1);          
      });
      
      $(
"#map-zoom-in").click(function() {
        
map.zoomIn(1);      
      });
      
});
?>
Онлайн: 2
Реклама