var bolPc = true; var arrSystemType = [ "", "レーダー式", "Hシステム", "ループコイル式", "ループコイル式H", "移動式車両", "移動式小型", "移動式中型", "レーザー自立型", "レーザー支柱型", "半固定式" ]; var arrCameraPosition = [ "", "左側に設置", "右側に設置", "上に設置" ]; var arrLaneSide = [ "", "左", "右" ]; var arrRoadType = [ "", "一般道", "有料・高速" ]; var arrDirectionType = [ "", "上り方面", "下り方面", "北行き", "北東行き", "東行き", "南東行き", "南行き", "南西行き", "西行き", "北西行き", "内回り", "外回り" ]; var ico_r_normal = L.icon( { iconUrl: '//orbis-guide.com/cmn/image/icon/map_marker_orbis_r_normal.png', iconSize: [ 26, 32 ], iconAnchor: [ 13, 32 ], popupAnchor: [ 13, -36 ], } ); var ico_r_highway = L.icon( { iconUrl: '//orbis-guide.com/cmn/image/icon/map_marker_orbis_r_highway.png', iconSize: [ 26, 32 ], iconAnchor: [ 13, 32 ], popupAnchor: [ 13, -36 ], } ); var ico_h_normal = L.icon( { iconUrl: '//orbis-guide.com/cmn/image/icon/map_marker_orbis_h_normal.png', iconSize: [ 26, 32 ], iconAnchor: [ 13, 32 ], popupAnchor: [ 13, -36 ], } ); var ico_h_highway = L.icon( { iconUrl: '//orbis-guide.com/cmn/image/icon/map_marker_orbis_h_highway.png', iconSize: [ 26, 32 ], iconAnchor: [ 13, 32 ], popupAnchor: [ 13, -36 ], } ); var ico_l_normal = L.icon( { iconUrl: '//orbis-guide.com/cmn/image/icon/map_marker_orbis_l_normal.png', iconSize: [ 26, 32 ], iconAnchor: [ 13, 32 ], popupAnchor: [ 13, -36 ], } ); var ico_l_highway = L.icon( { iconUrl: '//orbis-guide.com/cmn/image/icon/map_marker_orbis_l_highway.png', iconSize: [ 26, 32 ], iconAnchor: [ 13, 32 ], popupAnchor: [ 13, -36 ], } ); var ico_lh_normal = L.icon( { iconUrl: '//orbis-guide.com/cmn/image/icon/map_marker_orbis_lh_normal.png', iconSize: [ 26, 32 ], iconAnchor: [ 13, 32 ], popupAnchor: [ 13, -36 ], } ); var ico_lh_highway = L.icon( { iconUrl: '//orbis-guide.com/cmn/image/icon/map_marker_orbis_lh_highway.png', iconSize: [ 26, 32 ], iconAnchor: [ 13, 32 ], popupAnchor: [ 13, -36 ], } ); var ico_ic_normal = L.icon( { iconUrl: '//orbis-guide.com/cmn/image/icon/map_marker_orbis_ic_normal.png', iconSize: [ 26, 32 ], iconAnchor: [ 13, 32 ], popupAnchor: [ 13, -36 ], } ); var ico_ic_highway = L.icon( { iconUrl: '//orbis-guide.com/cmn/image/icon/map_marker_orbis_ic_highway.png', iconSize: [ 26, 32 ], iconAnchor: [ 13, 32 ], popupAnchor: [ 13, -36 ], } ); var ico_is_normal = L.icon( { iconUrl: '//orbis-guide.com/cmn/image/icon/map_marker_orbis_is_normal.png', iconSize: [ 26, 32 ], iconAnchor: [ 13, 32 ], popupAnchor: [ 13, -36 ], } ); var ico_is_highway = L.icon( { iconUrl: '//orbis-guide.com/cmn/image/icon/map_marker_orbis_is_highway.png', iconSize: [ 26, 32 ], iconAnchor: [ 13, 32 ], popupAnchor: [ 13, -36 ], } ); var ico_im_normal = L.icon( { iconUrl: '//orbis-guide.com/cmn/image/icon/map_marker_orbis_im_normal.png', iconSize: [ 26, 32 ], iconAnchor: [ 13, 32 ], popupAnchor: [ 13, -36 ], } ); var ico_im_highway = L.icon( { iconUrl: '//orbis-guide.com/cmn/image/icon/map_marker_orbis_im_highway.png', iconSize: [ 26, 32 ], iconAnchor: [ 13, 32 ], popupAnchor: [ 13, -36 ], } ); var ico_lp_normal = L.icon( { iconUrl: '//orbis-guide.com/cmn/image/icon/map_marker_orbis_lp_normal.png', iconSize: [ 26, 32 ], iconAnchor: [ 13, 32 ], popupAnchor: [ 13, -36 ], } ); var ico_lp_highway = L.icon( { iconUrl: '//orbis-guide.com/cmn/image/icon/map_marker_orbis_lp_highway.png', iconSize: [ 26, 32 ], iconAnchor: [ 13, 32 ], popupAnchor: [ 13, -36 ], } ); var ico_ls_normal = L.icon( { iconUrl: '//orbis-guide.com/cmn/image/icon/map_marker_orbis_ls_normal.png', iconSize: [ 26, 32 ], iconAnchor: [ 13, 32 ], popupAnchor: [ 13, -36 ], } ); var ico_ls_highway = L.icon( { iconUrl: '//orbis-guide.com/cmn/image/icon/map_marker_orbis_ls_highway.png', iconSize: [ 26, 32 ], iconAnchor: [ 13, 32 ], popupAnchor: [ 13, -36 ], } ); var ico_hk_normal = L.icon( { iconUrl: '//orbis-guide.com/cmn/image/icon/map_marker_orbis_hk_normal.png', iconSize: [ 26, 32 ], iconAnchor: [ 13, 32 ], popupAnchor: [ 13, -36 ], } ); var ico_hk_highway = L.icon( { iconUrl: '//orbis-guide.com/cmn/image/icon/map_marker_orbis_hk_highway.png', iconSize: [ 26, 32 ], iconAnchor: [ 13, 32 ], popupAnchor: [ 13, -36 ], } ); var ico_mobile = L.icon( { iconUrl: '//orbis-guide.com/cmn/image/icon/map_marker_mobile.png', iconSize: [ 26, 32 ], iconAnchor: [ 13, 32 ], popupAnchor: [ 13, -36 ], } ); var ico_mousetrap = L.icon( { iconUrl: '//orbis-guide.com/cmn/image/icon/map_marker_mousetrap.png', iconSize: [ 26, 32 ], iconAnchor: [ 13, 32 ], popupAnchor: [ 13, -36 ], } ); var ico_inspection = L.icon( { iconUrl: '//orbis-guide.com/cmn/image/icon/map_marker_inspection.png', iconSize: [ 26, 32 ], iconAnchor: [ 13, 32 ], popupAnchor: [ 13, -36 ], } ); var ico_common = L.icon( { iconUrl: '//orbis-guide.com/cmn/image/icon/map_marker_common.png', iconSize: [ 26, 32 ], iconAnchor: [ 13, 32 ], popupAnchor: [ 13, -36 ], } ); var dobLatitude = 35.416872; var dobLongitude = 136.77389; // var map; var arrMarkerList = []; var iconExplain; function initMap() { map = ( dobLatitude > 0 && dobLongitude ) ? L.map( "map_canvas" ).setView( [ dobLatitude, dobLongitude ], 13 ) : L.map( "map_canvas" ).setView( [ 35.180188, 136.906565 ], 8 ) ; var tiles = L.tileLayer( "//{s}.tile.osm.org/{z}/{x}/{y}.png", { minZoom: 8, maxZoom: 16, attribution: '© OpenStreetMap contributors' } ); map.addLayer( tiles ); L.Control.Watermark = L.Control.extend( { onAdd: function(map) { var img = L.DomUtil.create( "img" ); img.src = "https://orbis-guide.com/cmn/image/index/marker_explain.png"; img.style.width = "110px"; img.style.cursor = "pointer"; img.setAttribute( 'onclick', 'clearExplain()' ); return img; }, onRemove: function(map) { } }); L.control.watermark = function(opts) { return new L.Control.Watermark(opts); } iconExplain = L.control.watermark({ position: 'bottomleft' }).addTo(map); /////////////////////////// L.CustomControl = L.Control.extend( { options: { position: 'topright' }, onAdd: function (map) { var container = L.DomUtil.create( 'div', 'leaflet-bar leaflet-control' ); container.style.cursor = "pointer"; container.style.backgroundColor = "white"; container.style.padding = "5px"; container.innerHTML = '' + '' + '' + ''; return container; } }); // var control = new L.CustomControl().addTo(map); updateMap(); } var intRoadType = 0; var intMobile = 1; function setRoadType( intValue ) { intRoadType = intValue; updateMap(); } function setMobile() { intMobile = document.getElementsByName( "controlMobile" )[ 0 ].checked ? 1 : 0; updateMap(); } function updateMap() { clearMarker() $.getJSON( "//orbis-guide.com/cmn/script/point.php", { "latStart" : 25, "latEnd" : 46, "lngStart" : 125, "lngEnd" : 150, "road" : intRoadType, "mobile" : intMobile, timestamp: new Date().getTime() }, function(ret) { if( ret.error.code != 0 ) { alert( "error\n" + ret.error.desc ); return false; } var data = ret[ "data" ]; for( var i = 0; i < data[ "arrPointList" ].length; i++ ) { var pointData = data[ "arrPointList" ][ i ]; var decLatitude = data[ "arrPointList" ][ i ][ "decLatitude" ]; var decLongitude = data[ "arrPointList" ][ i ][ "decLongitude" ]; var intOrbisKey = parseInt( data[ "arrPointList" ][ i ][ "intOrbisKey" ].replace( "o", "" ) ); var intImageKey = parseInt( data[ "arrPointList" ][ i ][ "intImageKey" ] ); var strYoutubeKey = data[ "arrPointList" ][ i ][ "strYoutubeKey" ]; var intSystemType = parseInt( data[ "arrPointList" ][ i ][ "intSystemType" ] ); var intCameraPosition = parseInt( data[ "arrPointList" ][ i ][ "intCameraPosition" ] ); var intSpeedLimit = parseInt( data[ "arrPointList" ][ i ][ "intSpeedLimit" ] ); var intLaneType = parseInt( data[ "arrPointList" ][ i ][ "intLaneType" ] ); var intLaneSide = parseInt( data[ "arrPointList" ][ i ][ "intLaneSide" ] ); var intLaneNum = parseInt( data[ "arrPointList" ][ i ][ "intLaneNum" ] ); var strOtherDetail = data[ "arrPointList" ][ i ][ "strOtherDetail" ]; var intRoadType = parseInt( data[ "arrPointList" ][ i ][ "intRoadType" ] ); var strRoadName = data[ "arrPointList" ][ i ][ "strRoadName" ]; var intDirectionType = parseInt( data[ "arrPointList" ][ i ][ "intDirectionType" ] ); var strDirectionDetail = data[ "arrPointList" ][ i ][ "strDirectionDetail" ]; var strKilopost = data[ "arrPointList" ][ i ][ "strKilopost" ]; var strAddress = data[ "arrPointList" ][ i ][ "strPrefecturesName" ] + data[ "arrPointList" ][ i ][ "strCityName" ] + data[ "arrPointList" ][ i ][ "strAddress" ]; var strHint = data[ "arrPointList" ][ i ][ "strHint" ]; var intDirection = parseInt( data[ "arrPointList" ][ i ][ "intDirection" ] ); var strDetail = ( bolPc ) ? '
' +
'' + strRoadName + ' ' + strAddress + ' ☞' + ' | '+
'|
' + ' | ' + '
移動式オービスは過去の目撃ポイントです。
' : '' ) + '