Google Maps API-この行の意味/機能は何ですか?

andydavies

Googleマップに検索ボックスを追加しています。ドキュメント(https://developers.google.com/maps/documentation/javascript/examples/places-searchbox)から:

// Create the search box and link it to the UI element.
var input = document.getElementById('pac-input');
var searchBox = new google.maps.places.SearchBox(input);
map.controls[google.maps.ControlPosition.TOP_LEFT].push(input);

私はこれが低レベルでどのように機能するかを正確に理解しようとしています。最後の行は何をしますか?コメントにあるように、検索ボックスをUI要素にリンクする場合、これはどのように行われますか?

アントン

https://developers.google.com/maps/documentation/javascript/controls#CustomExampleで説明されているように

// Add the control to the map at a designated control position
// by pushing it on the position's array. This code will
// implicitly add the control to the DOM, through the Map
// object. You should not attach the control manually.
map.controls[google.maps.ControlPosition.TOP_RIGHT].push(controlDiv);

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

これは何を意味するのでしょうか?(Google Maps API)

分類Dev

Google Maps API V3のAPIキーは何ですか?

分類Dev

Google Maps APIの北東と南西の境界は何ですか?

分類Dev

Google Maps APIの警告:NoApiKeys

分類Dev

Google Maps APIの変更?

分類Dev

Google Maps API DeletedApiProjectMapError

分類Dev

Google Maps API

分類Dev

Google Maps Directions API

分類Dev

Google Maps Autocompletion API

分類Dev

Google Maps API + Google Maps Engine / My Maps

分類Dev

Google Maps API - 精度評価。高精度評価とは何ですか。

分類Dev

Google maps api geocoder is not working

分類Dev

Python Google Maps Geocoding API

分類Dev

Google Maps Embed Advanced API

分類Dev

Google Maps API key not used

分類Dev

Blazor:Google Maps JS API

分類Dev

Dynamically load Google Maps API

分類Dev

Google Maps Api、GeoJson、InfoWindow

分類Dev

Printing and lots of google maps (api)

分類Dev

Google Maps APIでWebpackを使用する方法

分類Dev

キーのないGoogle Maps API?

分類Dev

Google Maps API v3Firefoxの問題

分類Dev

localhostのGoogle Maps v3 APIが機能しない

分類Dev

Google Maps APIのhttp.get()が機能しない

分類Dev

Google Maps APIを使用したAndroidのMKMapView見出し機能?

分類Dev

Google Maps APIを使用するにはどのAPIキーが必要ですか?

分類Dev

Google Maps API for Work customers - API Requests

分類Dev

Google Maps Geocoding APIに多くのリクエストを送信する適切な方法は何ですか?

分類Dev

Google Maps Places:なぜAPIキーが必要なのですか?

Related 関連記事

ホットタグ

アーカイブ