GoogleMapsのGeoCodingを行っておりますが、AutoCompleteのフィールドに日本語の住所を入力しても英語での住所表記の順番になって見づらいです。
これはどこをどう直せばいいのかわからないので伺いたいです。
ちなみにRailsアプリです。
View
ruby
1 = form_for @restaurant, url: {action: 'create', locale: I18n.locale} do |r| 2 dl.field 3 dt = r.label (t :map) 4 dd = (t :map_description) 5 #map style="margin-top: 50px; width: 800px;" 6 span = r.label (t :lat) 7 span = r.text_field :lat 8 span = r.label (t :lng) 9 span = r.text_field :lng 10 dl.field 11 dt = r.label (t :deleted_at) 12 dd = r.text_field :deleted_at 13 div.submit_btn 14 = r.submit (t :send_btn), :class => "btn btn-primary", data: {disable_with: (t :confirming), confirm: (t :send_permit)} 15 form 16 = text_field_tag :geocomplete, nil, :size => 80, :style => "position: relative; bottom: 420px;" 17
JS
javascript
1 script src="//maps.google.com/maps/api/js?v=3.exp&key=AIzaSyC1VAkgcOetg1-i7wn83woNMI5ZM014U4g&libraries=places&language=jp®ion=jp" 2 script src="//cdn.rawgit.com/mahnunchik/markerclustererplus/master/dist/markerclusterer.min.js" 3 script src='//cdn.rawgit.com/printercu/google-maps-utility-library-v3-read-only/master/infobox/src/infobox_packed.js' 4 5 6 javascript: 7 jQuery(function(){ 8 9 if (gon.location_available == true) { 10 var param = { 11 map: "#map", 12 location: [#{@restaurant.lat}, #{@restaurant.lng}], 13 details: "form ", 14 componentRestrictions: { 15 country: 'jp' 16 }, 17 markerOptions: { 18 draggable: true 19 } 20 }; 21 }else{ 22 var param = { 23 map: "#map", 24 details: "form ", 25 componentRestrictions: { 26 country: 'jp' 27 }, 28 markerOptions: { 29 draggable: true 30 } 31 }; 32 } 33 34 $("#geocomplete").geocomplete(param); 35 $("#geocomplete").bind("geocode:dragged", function(event, latLng){ 36 $("#restaurant_lat").val(latLng.lat()); 37 $("#restaurant_lng").val(latLng.lng()); 38 }); 39 $("#find").click(function(){ 40 $("#geocomplete").trigger("geocode"); 41 }); 42 }); 43 44 /! Le HTML5 shim, for IE6-8 support of HTML elements 45 /[if lt IE 9] 46 = javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js"
どなたかよろしくお願いします。
あなたの回答
tips
プレビュー