beshur

Untitled

Dec 16th, 2013
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function initializeLocMap(coords) {
  2.     if (!coords) return;
  3.  
  4.     // latLngCenter = [new google.maps.LatLng(46.47498, 30.72424)]
  5.     //var latLngCenter_c = new google.maps.LatLng(46.47574, 30.7248 );
  6.     latLngCenter = new google.maps.LatLng(coords[1], coords[0]);
  7.                    
  8.     map = new google.maps.Map( document.getElementById('location_map'), {
  9.         zoom: 12,
  10.         center: latLngCenter,
  11.         disableDefaultUI: true,
  12.         mapTypeId: google.maps.MapTypeId.ROADMAP
  13.     });
  14.    
  15.     var markers = [
  16.         new google.maps.Marker({
  17.             position: latLngCenter,
  18.             map: map,
  19.             visible: false,
  20.             // icon: image1,
  21.             title:"Location",
  22.  
  23.         })
  24.     ]
  25.  
  26.     var infowindow1 = new google.maps.InfoWindow({
  27.         maxWidth: 450,
  28.         content: $(".events-list.m_single .map .hidden-tooltip").html()
  29.     });
  30.            
  31.     infowindow1.open(map,markers[0]);
  32.  
  33.     google.maps.event.trigger(map, 'resize');
  34.     map.setZoom( map.getZoom() );
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment