The Info Window-GoogleMaps/API/doc/APIoverview/03-TheInfoWindow-N☆E 学習帳

[ リロード ]   [ ソース ]  [ トップ | 一覧 | 単語検索 | 最新 | バックアップ | ヘルプ ]

Counter: 3809, today: 1, yesterday: 1

The Info Window

http://www.google.com/apis/maps/docu­mentation/

Version 2 (2006.4)

Each map has a single "info window," which displays HTML content in a floating window above the map. The info window looks a little like a comic-book word balloon; it has a content area and a tapered stem, where the tip of the stem is at a specified point on the map. You can see the info window in action by clicking a marker in Google Maps.

You can't show more than one info window at a time for a given map, but you can move the info window and change its contents as needed.

The basic info window method is openInfoWindow, which takes a point and an HTML DOM element as arguments. The HTML DOM element is appended to the info window container, and the info window window tip is anchored to the given point.

The openInfoWindowHtml method is similar, but it takes an HTML string as its second argument rather than a DOM element.

To display an info window above an overlay like a marker, you can pass an optional third argument that specifies the pixel offset between the specified point and the tip of the info window. So, if your marker is 10 pixels tall, you might pass the pixel offset GSize(0, -10).

The GMarker class exports openInfoWindow methods that handle the pixel offset issues for you based on the size and shape of the icon, so you generally don't have to worry about calculating icon offsets in your application.

See the GMap2 and GMarker class references for more information.

Version 1

The Map class has a single "info window," which displays HTML content in a floating window above the map.

The basic info window method is openInfoWindow, which takes a point and an HTML DOM element as an argument. The HTML DOM element is appended to the info window container, and the info window is displayed over the given point.

openInfoWindowHtml is similar, but it takes an HTML string as an argument rather than a DOM element. openInfoWindowXslt takes in an XML DOM element and the URL of an XSLT document to produce the info window contents, downloading the XSLT asynchronously if it has not already been downloaded by the user's browser.

To display an info window above an overlay like a marker, you can pass an optional third argument that gives a pixel offset between the lat/lng point passed in and the tip of the info window. So, if your marker was 10 pixels tall, you would pass the pixel offset GSize(0, -10).

The GMarker class exports openInfoWindow methods that handle the pixel offset issues for you based on the size and shape of the icon, so you will generally not have to worry about calculating icon offsets in your application.

↓ざっぱにまとめる(しかし理解はしていない、日本語にもなっていない)

  • 地図には単一のインフォウィンドウ
  • 基本はopenInfoWindow、引数でポイントとHTML DOMが渡され、表示される。
  • openInfoWindowHtmlも同様。HTML文字列で渡される。
  • openInfoWindowXsltにXML DOM と XSLT documentのURLが渡される。
  • もしあなたのマーカーが10ピクセルの高さなら、GSize(0, -10)とオフセットを渡すでしょう。??
  • GMarkerクラスのopenInfoWindowメソッドがあるからオフセットは気にしなくていいってこと


(2005.12)

Each map has a single "info window," which displays HTML content in a floating window above the map. The info window looks a little like a comic-book word balloon; it has a content area and a tapered stem, where the tip of the stem is at a specified point on the map. You may have seen the info window appear when you click a marker in Google Maps or Google Local.
 
You can't show more than one info window at once for a given map, but you can move the info window and change its contents as needed.
 
The basic info window method is openInfoWindow, which takes a point and an HTML DOM element as arguments. The info window appears with its tip at the given point on the map, and it displays the DOM element in its content area.
 
The openInfoWindowHtml method is similar, but it takes an HTML string as its second argument rather than a DOM element.
 
Similarly, openInfoWindowXslt takes a point, an XML DOM element, and the URL of an XSLT document, and it applies the XSLT to the XML to produce the info window contents. This method downloads the XSLT asynchronously if it has not already been downloaded by the user's browser.
 
To display an info window above an overlay like a marker, you can pass an optional third argument: a pixel offset between the specified point and the tip of the info window. So, if your marker is 10 pixels tall, you might pass the pixel offset GSize(0, -10). (For more information, see the GSize class reference.)
 
The GMarker class exports openInfoWindow methods that handle the pixel offset issues for you based on the size and shape of the icon, so you generally don't have to worry about calculating icon offsets in your application.

 

DOM

Document Object Model
e-Words → http://e-words.jp/w/DOM.html

Webページの内容(文章、画像、音声など)およびそれらの配置、スタイルをオブジェクトとして扱い、スクリプト言語を使って制御するための取り決め。

XSLT

XML Stylesheet Language Transformations
e-Words → http://e-words.jp/w/XSLT.html

XMLによって記述された文書を他のXML文書に変換するための簡易言語。