Advertisement
Guest User

Google map API

a guest
May 13th, 2015
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script src="https://maps.googleapis.com/maps/api/js?v=3.19&sensor=true_or_false"></script>
  2.     <script>
  3.    
  4.     var geocoder;
  5.     var ws_wsid = 'afca921c9778417e8dc16a8236d1f079';
  6.     var ws_address = "<?php echo $row['address']; ?>,<?php echo $row['city']; ?>";
  7.     var ws_width = '100%';
  8.     var ws_height = '400';
  9.     var ws_layout = 'vertical';
  10.     var ws_commute = 'true';
  11.     var ws_transit_score = 'true';
  12.     var ws_map_modules = 'all';
  13.     var address = "<?php echo $row['address']; ?>,<?php echo $row['city']; ?>";
  14.    
  15. function initialize() {
  16.   var fenway = new google.maps.LatLng(<?php echo $row['latitude']; ?>, <?php echo $row['longtitude']; ?>)
  17.   var mapOptions = {
  18.     center: fenway,
  19.     zoom: 14,
  20.     mapTypeId: google.maps.MapTypeId.ROADMAP
  21.   };
  22.    map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);
  23.   var contentString = '<a class="fancybox-inline" href="#request_form_pop">Request of showing this property</a>';
  24.   var infowindow = new google.maps.InfoWindow({
  25.       content: contentString
  26.   });
  27.  
  28.   var marker = new google.maps.Marker({
  29.       position: fenway,
  30.       map: map,
  31.       title: ''
  32.      
  33.   });
  34.  
  35.  
  36.     infowindow.open(map,marker);
  37.     google.maps.event.addListener(marker, 'click', function() {
  38.      });
  39.      
  40.     var panoramaOptions = {
  41.     position: fenway,
  42.     pov: {
  43.       heading: 34,
  44.       pitch: 10
  45.     }
  46.   };
  47.    panorama = new google.maps.StreetViewPanorama(document.getElementById('pano'), panoramaOptions);
  48.    map.setStreetView(panorama);
  49.  
  50. }
  51.  
  52. google.maps.event.addDomListener(window, 'load', initialize);
  53.     </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement