// グローバル変数 -------------------------------- itsmo.meetingplace = {}; itsmo.meetingplace.w = 390; itsmo.meetingplace.h = 190; //------------------------------------------------ // 待ち合わせ・設定画面画面初期化 //------------------------------------------------ itsmo.meetingplace.check_message = function() { if (!(flg1 = itsmo.validate.check({id:'meetingplace_message', name:'messsage', option:['rangeMax, 50']}))) { return false; } }; //------------------------------------------------ // 待ち合わせ場所地図画像URL生成 //------------------------------------------------ itsmo.meetingplace.set_mapimg = function(lat, lon, lvl) { var mapimg = '/map.php?lvl=' + lvl; mapimg += '&lat=' + lat + '&lon=' + lon; mapimg += '&w=' + itsmo.meetingplace.w + '&h=' + itsmo.meetingplace.h; mapimg += '&icn=link02:' + lat + ':' + lon +'&nc=1'; mapimg += '&w=' + itsmo.meetingplace.w + '&h=' + itsmo.meetingplace.h; $('#ajax_map_meetingplace').find('img').attr('src', mapimg); }; //------------------------------------------------ // 待ち合わせ場所URL生成 //------------------------------------------------ itsmo.meetingplace.set_mapurl = function() { var loc = itsmo.lib.toMilliSec(itsmo.vars.g_map_obj.getLatLon()); var lvl = itsmo.vars.g_map_obj.getZoom(); var url = itsmo.vars.d_mobile_maptolink + 'p1?'+loc.lat+'-'+loc.lon+'-'+lvl; var msg = $("#meetingplace_message").val(); msg = msg.replace(/\n/g,''); msg = msg.replace(/\r/g,''); itsmo.lib.document_setvalue("ajax_map_url", url+'-'+msg); // URL設定 //メール送信のためのhref作成 $('#meetingplace_mail').attr('href', 'mailto:?BODY=' + escape(url) + escape('-') + escape(encodeURIComponent( msg )) ); }; itsmo.meetingplace.countdown = function( idn, srcid, str, mnum ) { if (mnum - str.length < 1) { $("#" + srcid).val(str.substring(0,mnum)); str = str.substring(0,mnum); } $("#" + idn).text(mnum - str.length); };