beshur

Untitled

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