Getlocations field + Ajax views

WE HAVE MOVED!

Please visit our new Drupal Website at https://www.xenyo.com我們的新網頁設計公司網頁.

/**
 * Ajax view
 **/
$.ajax({
  url: "/views/ajax",
  type: "POST",
  dataType:"json",
  data: {
    "js":0,
    "view_name":"cakemap",
    "view_display_id":"block_1",
    "view_args": param
  },
  success: function(view) {
    Drupal.settings.getlocations = view[0].settings.getlocations;
    $(".cakebase-view").replaceWith(view[1].data);
    Drupal.attachBehaviors(".cakebase-view");
    getlocations_init();  
  }
})
/**
 * Get street view by latitude and longtitude 
 **/
function generate_stview(lat,lng) {
  var fenway = new google.maps.LatLng(lat, lng);
  var panoramaOptions = {
    position: fenway,
    pov: {
      heading: 34,
      pitch: 10,
      zoom: 1
    }
  };
  var panorama = new google.maps.StreetViewPanorama(document.getElementById('stview'), panoramaOptions);
  getlocations_map.key_1.setStreetView(panorama);
}
 
<style>
#stview img { max-width:none!important;}   // fix a bug on Zen responsive theme
#stview_close {
float:right;
z-index:2;
font-weight:bold;
color:#fff;
margin-top:5px;
margin-right:5px;
position:relative;
}
</style>
<div id="stview" style="display:none;width:800px;height:400px;position:absolute;"><a id="stview_close" href="javascript:void(0);" onclick="javascript:jQuery('#stview').hide();">Close</a></div>
Help Share this Article