2012-03-27 12 views

答えて

2

マップのために使用されるデフォルトが、これらは以下のとおりです。

container_id:  "map_container", 
id:    "map", 
type:    "ROADMAP", // HYBRID, ROADMAP, SATELLITE, TERRAIN 
center_latitude : 0, 
center_longitude: 0, 
disableDefaultUI: false, 
disableDoubleClickZoom: false,  
draggable: true, 
mapTypeControl: null,  // display the map type dropdown, unless set to false it will be displayed 
detect_location: false,  // should the browser attempt to use geolocation detection features of HTML5? 
center_on_user: false,   // centers map on the location detected through the browser 
zoom :   1,   // initial zoom 
maxZoom:  null,   //max zoom level 
minZoom:  null,   //min zoom level 
auto_adjust: true,   //adjust the map to the markers if set to true 
auto_zoom:  true   //comes with auto_adjust. Choose whether or not you want to use an automatic zoom or the one you set in the 'zoom' option. 
bounds: []     //adjust map to these limits. Should be [{"lat": , "lng": }, {"lat": , "lng": } ...] 

私は、アプリケーション全体のデフォルトを上書きするかどうかはわかりませんが、あなたはビューで地形ロードマップからCanChangeメソッド:

<%= gmaps({"map_options" => { type => "TERRAIN" })%> 
0

あなたにはデフォルト値を変更することができ

/assets/javascript/gmaps4rails/gmaps4rails.googlemaps.js.coffee

関連する問題