画像を描画する

説明

画像を描画するにはdraw_symbol()を使います。パラメータは画像のURL、表示サイズ、表示X座標(または経度)、表示Y座標(または緯度)の順番で指定します。

サンプルプログラム

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=shift_jis">
<title>電子国土(国土地理院)</title>
<script type="text/javascript"><!--
function app_main(){
top.map.draw_xyunit("screen");
top.map.draw_level("all");
top.map.draw_color(255,0,0);
top.map.draw_symbol("http://www.openspc2.org/title.gif", 200, 130,120);
top.map.setMapCenter(137.95340448617935, 36.114983812119554, 18000);
top.map.openMap();
}
// --></script>
</head>
<body>
<h1>画像を描画する</h1>
<iframe name="map" src="./map.html" width="640" height="480"></iframe>
</body>
</html>
サンプルを実行
[戻る]