1

Fusion テーブルにカスタム情報ウィンドウがあります。

<div class='googft-info-window' style='font-family: sans-serif'>
<img src="{image}" width=200 align=right>
<b>ID Number:</b> {pkey}<br>
<b>Condition:</b> {stateofrepair}<br>...

しかし、利用可能な {image} がない場合があり、その結果、ほとんどのブラウザで壊れた画像アイコンが表示されます。<img>{image} が空白の場合、タグをオフのままにする方法はありますか?

4

1 に答える 1

1

This isn't possible using the Fusion Tables UI.

But you can do this using the Fusion Tables Layer in the Google Maps API. You can set a click listener on the layer using the Google Maps API. You can access the data associated with the clicked feature in the Event object returned from the click. At this point, you can test whether or not the image value actually contains data, and, if so, show the image.

Here's an example:

http://code.google.com/apis/fusiontables/docs/samples/change_infowindow_content.html

于 2012-01-24T00:26:24.993 に答える