我是中国的学生.并使用gmap4rails宝石时,我有一个疑难问题.要设置的茂中心和缩放一样,官方指导报价
https://developers.google.com/maps/documentation/javascript/tutorial?#HelloWorld 
所以像我的代码图片显示.但它不起作用.谷歌的问题,但没有得到答案.更多的是,我想把语言设置为中文我喜欢这样做,但它没有用.
var mapOptions = {
center: new google.maps.LatLng(-34.397, 150.644),
zoom: 8
};
handler = Gmaps.build('Google',mapOptions);
你能帮助我吗?
你应该做:
var mapOptions = {
  center: new google.maps.LatLng(-34.397, 150.644),
  zoom: 8
};
handler = Gmaps.build('Google');
handler.buildMap( {provider: mapOptions, internal: {id: 'map'}}, function(){
  //code to add overlays etc... here
});
要么:
handler = Gmaps.build('Google');
handler.buildMap( {internal: {id: 'map'}}, function(){
  // handler.map is the proxy object created by the gem, 
  // where you can add your custom methods,
  // like centerOn
  handler.map.centerOn([-34.397, 150.644]);
  // handler.getMap() is the google map object
  // you can also access it with handler.map.getServiceObject()
  handler.getMap().setZoom(8);
});
传递您希望地图显示id的div位置非常重要.