忍者ブログ
JavaScript , Java , DOS , HTML(CSS) , JSP , SQL , VB , VBScript , ・・・etc などの覚書
×

[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。

Google MAP API
(社内イントラサイトやユーザーIDなどが必要なホームページなどは、無償で使用できない)


参考
まーかーを複数設置: http://gmap3.blog52.fc2.com/blog-entry-17.html
住所から座標を取得: http://www.ajaxtower.jp/googlemaps/geocoding/index1.html

噴出し:http://www.nanchatte.com/map/showDifferentInfoWindowOnEachMarker.html

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta http-equiv="Content-Script-Type" content="text/javascript">
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
</head>
<body>


<input type='button' value='検索' onclick="aaa()">

<div id="map" style="width:100%; height:90%;"><br>
<script type='text/javascript'>

var realAdr = [
["仕入れ先1","東京都大田区"],
["仕入れ先2","横浜市青葉区"],
["仕入れ先3","大阪市平野区"]
];

var map = new google.maps.Map(document.getElementById("map"), {
zoom: 5,
center: new google.maps.LatLng(36,138),
mapTypeId: google.maps.MapTypeId.ROADMAP
});

 

function aaa(){

for (var i = 0; i < realAdr.length; i++) {

getLatLng(realAdr[i][1],realAdr[i][0]);
}
}

function getLatLng(place,placeName) {
var geocoder = new google.maps.Geocoder();

geocoder.geocode({
address: place,
region: 'jp'
},function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {

//var bounds = new google.maps.LatLngBounds();
for (var r in results) {
if (results[r].geometry) {

//座標取得
var latlng = results[r].geometry.location;

//bounds.extend(latlng);

var address = results[0].formatted_address.replace(/^日本, /, '');


//初期値は吹き出しなしの場合
var myMarker = new google.maps.Marker({
position: latlng,
map: map,
title: placeName
});

//クリックして吹き出し
attachMessage(myMarker, placeName);

/*
//吹き出しを付ける場合
new google.maps.InfoWindow({
content: placeName
}).open(map, new google.maps.Marker({
position: latlng,
map: map,
title: "aaa"
}));
*/

}
}
//map.fitBounds(bounds);
} else if (status == google.maps.GeocoderStatus.ERROR) {
alert("通信エラー");
} else if (status == google.maps.GeocoderStatus.INVALID_REQUEST) {
alert("リクエストエラー");
} else if (status == google.maps.GeocoderStatus.OVER_QUERY_LIMIT) {
alert("送信多数エラー");
} else if (status == google.maps.GeocoderStatus.REQUEST_DENIED) {
alert("ジオコーダの利用不可エラー");
} else if (status == google.maps.GeocoderStatus.UNKNOWN_ERROR) {
alert("サーバ側エラー");
} else if (status == google.maps.GeocoderStatus.ZERO_RESULTS) {
alert("見つかりません");
} else {
alert("エラー");
}
});
}


//クリックしたら吹き出し表示
function attachMessage(marker, msg) {
google.maps.event.addListener(marker, 'click', function(event) {
new google.maps.InfoWindow({
content: msg
}).open(marker.getMap(), marker);
});
}


</script>

</div>
</body>
</html>

PR
参考URLhttp://www.shift-the-oracle.com/sql/merge.html


MERGE INTO USER_MASTER
USING USER_MASTER_IMPORT 
ON ( USER_MASTER.USER_ID = USER_MASTER_IMPORT.USER_ID)
-- 既存レコードの更新
WHEN MATCHED THEN
	UPDATE SET
		USER_NAME = USER_MASTER_IMPORT.USER_NAME,
		DEPT_NO = USER_MASTER_IMPORT.DEPT_NO,
		MODIFIED_ON = SYSDATE
-- 新規レコードの作成
WHEN NOT MATCHED THEN
	INSERT
		( USER_ID, USER_NAME, DEPT_NO )
	VALUES
		( USER_MASTER_IMPORT.USER_ID,
		USER_MASTER_IMPORT.USER_NAME || '(新人)',
		USER_MASTER_IMPORT.DEPT_NO )
サーバーに配置している画像パスを指定し、 setBinaryStream としてセットする。


 String db = "TEST";
 Connection c = null;
     
      c = ConnectionHelper.getConnection(db);
      String fileName = "c:/temp/aaa.jpg";
      StringBuffer strsql = new StringBuffer();
      
      strsql.append("UPDATE DRAW");
      strsql.append(" SET DATA = ?");
      strsql.append(" WHERE CODE = ?");

    //条件設定
    PreparedStatement ps = c.prepareStatement(strsql.toString());
    
    ps.setBinaryStream(1,new FileInputStream(file),(int)file.length());
    ps.setString(2, "1111111111");

  return ( ps.executeUpdate());
ただしテキストエリア上でIMEの変更は可能

                        <mx:FormItem label="指定なし">
                                <mx:TextInput width="200"/>
                        </mx:FormItem>
                        <mx:FormItem label="全角英数">
                                <mx:TextInput width="200" imeMode="ALPHANUMERIC_FULL" />
                        </mx:FormItem>
                        <mx:FormItem label="半角英数">
                                <mx:TextInput width="200" imeMode="ALPHANUMERIC_HALF" />
                        </mx:FormItem>
                        <mx:FormItem label="全角かな">
                                <mx:TextInput width="200" imeMode="JAPANESE_HIRAGANA" />
                        </mx:FormItem>
                        <mx:FormItem label="全角カナ">
                                <mx:TextInput width="200" imeMode="JAPANESE_KATAKANA_FULL" />
                        </mx:FormItem>
                        <mx:FormItem label="半角カナ">
                                <mx:TextInput width="200" imeMode="JAPANESE_KATAKANA_HALF" />
                        </mx:FormItem>
TIFFファイルをバッチで印刷させたい場合は、以下のコマンドを使用する。


rundll32.exe shimgvw.dll,ImageView_PrintTo /pt フルパス引用符付き "プリンタ名"

ブログ内検索
カレンダー
03 2025/04 05
S M T W T F S
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30

Copyright © [ moriBlog-memo ] All rights reserved.
Special Template : 忍者ブログ de テンプレート Special Thanks : 忍者ブログCommercial message : [PR]