Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/fortran/2.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 谷歌地图:无法在手机上滚动_Google Maps_Mobile - Fatal编程技术网

Google maps 谷歌地图:无法在手机上滚动

Google maps 谷歌地图:无法在手机上滚动,google-maps,mobile,Google Maps,Mobile,我在我的网站上使用谷歌地图。它在所有浏览器中都能正常工作,但是我在手机上使用它时遇到了问题:我无法滚动地图。我怀疑这是由eventListener“点击”引起的,可能是这样吗?我正在用户单击的位置放置标记。 代码如下: <script src="http://maps.google.com/maps/api/js?sensor=false&language=${Locale.getDefault()}" type="text/javascript"></scrip

我在我的网站上使用谷歌地图。它在所有浏览器中都能正常工作,但是我在手机上使用它时遇到了问题:我无法滚动地图。我怀疑这是由eventListener“点击”引起的,可能是这样吗?我正在用户单击的位置放置标记。
代码如下:

   <script src="http://maps.google.com/maps/api/js?sensor=false&language=${Locale.getDefault()}" type="text/javascript"></script>

$(document).ready(function(){
     createMap();
});


function createMap(){

  geocoder = new google.maps.Geocoder();
  infowindow = new google.maps.InfoWindow();
  latlng = new google.maps.LatLng(55.783234,12.518363);
  var myOptions = {
    zoom: 7,
    center: latlng,
    mapTypeId: google.maps.MapTypeId.ROADMAP
  };
  map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
  marker = new google.maps.Marker();
  google.maps.event.addListener(map, 'click', function(event) {
    makeMarker(event.latLng, true);
  });
}

$(文档).ready(函数(){
createMap();
});
函数createMap(){
geocoder=新的google.maps.geocoder();
infowindow=new google.maps.infowindow();
latlng=新的google.maps.latlng(55.783234,12.518363);
变量myOptions={
缩放:7,
中心:拉特林,
mapTypeId:google.maps.mapTypeId.ROADMAP
};
map=new google.maps.map(document.getElementById(“map_canvas”),myOptions);
marker=新的google.maps.marker();
google.maps.event.addListener(映射,'click',函数(事件){
makeMarker(event.latLng,true);
});
}

在移动设备上使用谷歌地图不是一个好主意。

在移动设备上使用谷歌地图不是一个好主意