Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/google-maps/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google maps 谷歌地图版本3,标签中有magento_Google Maps_Magento_Google Maps Api 3 - Fatal编程技术网

Google maps 谷歌地图版本3,标签中有magento

Google maps 谷歌地图版本3,标签中有magento,google-maps,magento,google-maps-api-3,Google Maps,Magento,Google Maps Api 3,我正在尝试加载谷歌地图版本3,标签中有magento。地图上显示的灰色部分覆盖了地图的大部分 任何人都可以帮助我。提前感谢。我发现谷歌地图第3版在标签页中有magento的问题,我在谷歌上做了很多研发后,找到了一个解决方案。我想与大家分享……以下是解决方案: <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script> <script typ

我正在尝试加载谷歌地图版本3,标签中有magento。地图上显示的灰色部分覆盖了地图的大部分


任何人都可以帮助我。提前感谢。

我发现谷歌地图第3版在标签页中有magento的问题,我在谷歌上做了很多研发后,找到了一个解决方案。我想与大家分享……以下是解决方案:

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script type="text/javascript">
 var latLng;
function initialize() {
var map = new google.maps.Map(document.getElementById('map'), {
    zoom: 8,
    center: new google.maps.LatLng(26.937201,75.785672),
    scrollwheel: true,
    disableDefaultUI: true,
    navigationControl: true,
    mapTypeId: google.maps.MapTypeId.ROADMAP,

});


var infoWindow = new google.maps.InfoWindow;

var onMarkerClick = function() {
  var marker = this;
  var latLng = marker.getPosition();
  infoWindow.setContent("I'm here!!!!");

  infoWindow.open(map, marker);
};
google.maps.event.addListener(map, 'click', function() {
  infoWindow.close();
});


var marker1 = new google.maps.Marker({
  map: map,
  position: new google.maps.LatLng(26.937201,75.785672)
});


google.maps.event.addListener(marker1, 'click', onMarkerClick);
  } 
 var GMaps = Class.create();
GMaps.prototype = {             }
var gmaps = null;
function switchGMapsTab(tab){
    if ( tab.tab.container.activeTab.id == 'googlemap_tabs_id'){
        if (!gmaps){
               initialize();
        }
    }
}
varienGlobalEvents.attachEventHandler('showTab', switchGMapsTab);    
</script>

var latLng;
函数初始化(){
var map=new google.maps.map(document.getElementById('map'){
缩放:8,
中心:新google.maps.LatLng(26.937201,75.785672),
滚轮:对,
disableDefaultUI:true,
导航控制:对,
mapTypeId:google.maps.mapTypeId.ROADMAP,
});
var infoWindow=new google.maps.infoWindow;
var onMarkerClick=function(){
var标记=这个;
var latLng=marker.getPosition();
setContent(“我在这里!!!!”);
信息窗口。打开(地图、标记);
};
google.maps.event.addListener(映射,'click',函数(){
infoWindow.close();
});
var marker1=新的google.maps.Marker({
地图:地图,
位置:新google.maps.LatLng(26.937201,75.785672)
});
google.maps.event.addListener(marker1,'click',onMarkerClick);
} 
var GMaps=Class.create();
GMaps.prototype={}
var-gmaps=null;
功能开关GMAPSTAB(选项卡){
if(tab.tab.container.activeTab.id=='googlemap\u tabs\u id'){
如果(!gmaps){
初始化();
}
}
}
可变全局事件。附加事件处理程序('showTab',switchGMapsTab);
访问链接也可以,它也可以帮助你

谢谢