;(function() { var JSLoader = function(options){var options = options || {};this.pointer = 0;this.finish = options.finish || function(){};this.append = options.append || null;this.queue = {length : 0,list : [],push : function(arg){this.list.push(arg);this.length++;}};return this;};JSLoader.prototype = {next : function(){var self = this;var loader = new JSLoader({append : self.append,finish : function(){self._next();}});var args = [];for(var i=0, l=arguments.length; i 0) { for (var j=0; j -1) { allowShowMap = true; break; } } } // referrerのチェックで有効なURLではない場合、urlでFQDNをチェック if(!allowShowMap){ var fqdn = location.host; if(fqdn && fqdn.length > 0 && $.inArray(fqdn,allowDomain) > -1){ allowShowMap = true; } } }else{ var fqdn = location.host; if(fqdn && fqdn.length > 0 && $.inArray(fqdn,allowDomain) > -1){ allowShowMap = true; } } if(!allowShowMap){ var span = $(""); span.text("該当のページでは、地図を表示することができません。"); $("body").append(span); return; } var defaultconfJson = { } var defaultconfJson = ; var defaultconf = defaultconfJson.JsonResult.ConfigsObject; var configs = $.extend(true, { MapProjection: { }, MapScript: { MapFeatureTarget: { url:defaults.iniDomainURL + "Map/GetFeature" ,iniDomainURL:defaults.iniDomainURL ,requestInterval: 0 ,iconPath: "" ,target: { layerName: "TargetLayer" ,icon: { style: { externalGraphic: "./Content/images/plugin/map_target/target_red.gif" ,graphicWidth : 34 ,graphicHeight : 34 } } } ,feature: { layerName: "TargetFeatureLayer" ,icon: { style: { externalGraphic: "" ,graphicWidth : 22 ,graphicHeight : 22 } } } }, id: "mapscript_"+(Math.random().toString().replace(".", "")) ,width: defaultconf.MapApi.mapAPIW || 400 ,height: defaultconf.MapApi.mapAPIH || 300 ,isWebApi:'0' ,mapOptions: { maxExtent : new OpenLayers.Bounds(-180, -90, 180, 90) /* 地図表示範囲 */ ,units : "degrees" /* 単位メートル */ ,projection : "EPSG:4301" /* 緯度経度 世界測地系:4326,日本測地系:4301 */ //サーバ取得予定 ,controls : [] /* 初期コントロール */ } ,mapParam: { sids : "1001" /* SIDS */ ,gprj : "1" /* 世界測地系:2,日本測地系:1 */ ,centerLon : defaultconf.MapCoordinateInfo.defaultParamsGetCoordinate.mpx || 0 /* 中心経度 */ ,centerLat : defaultconf.MapCoordinateInfo.defaultParamsGetCoordinate.mpy || 0 /* 中心緯度 */ ,scale : "" || 5000//5000 /* 現縮尺値 */ ,bgMapList: defaultconf.MapManager.mapParam.bgMapList ,bgMapId: defaultconf.MapApi.bgMap ,bgMapEnable: defaultconf.MapApi.bgMapEnable } ,imageLayerName: "imageLayer" ,urlGetMapImage: defaults.iniDomainURL + "SaveImage/GetPrintImage/" ,urlGetMapPrintImage: defaults.iniDomainURL + "SaveImage/GetPrintImage/" ,paramKeyGetMapPrintImage: { MapId: "mid" ,LayerId: "mtl" //主題レイヤーId ,CodesetId: "mcl" //主題コードセットId ,ULayerId: "mul" //ユーザーレイヤーレイヤーId ,UCodesetId: "mucl" //ユーザーレイヤーコードセットId ,LinkId: "linkid" // } ,paramValueGetMapPrintImage: { ClickX: "0" //クリックX座標 ,ClickY: "0" //クリックY座標 ,FeatureId: defaultconf.MapApi.fid || "" //主題レイヤー図形Id ,mro: defaultconf.MapApi.mro || 0 //地図画像強制背景出力(0:なし 1:強制 2:FIDのみ強制) ,pmd: "print" //印刷モード(print:印刷モード) ,bct: "FALSE" //中心十字 (true:表示する(既定) false:表示しない) ,mapapioffline: "" ,iork: "" } ,DragMove: true ,WheelZoom: true ,CenterMarker: (defaultconf.MapApi.flgCrossBar == 1) //中心十字表示有無 ,centerMarker: { url: defaults.iniDomainURL + "./pref-chiba/Content/images/plugin/map/cross.gif" ,width: 15 ,height: 15 } ,BaseMapList: (defaultconf.MapApi.flgBground == 1) ,ScaleList: (defaultconf.MapApi.flgScaleChg == 1) ,ScaleListChg:(defaultconf.MapApi.flgScaleListChg == 1) ,ScaleLine: (defaultconf.MapApi.flgScaleBar == 1) ,ScaleTopLine: (defaultconf.MapApi.flgScaleTopBar == 1) ,ShowFidOnly: (defaultconf.MapApi.ShowFidOnly == 1) ,defaultIcon: defaultconf.MapApi.defaultIcon ,defaultIconPath: defaults.iniDomainURL + "/pref-chiba" + "/Content/images/plugin/map_api/" ,info:"" ,initBassGprj:"" ,routeParam: { routeValue: defaultconf.MapApi.routeValue ,lineStyle: { strokeColor: "#000000" //{String} Color for line stroke. , strokeOpacity: 0.7 //{Number} Stroke opacity (0-1). , strokeWidth: 3 //{Number} Pixel stroke width. , strokeLinecap: "butt" //{String} Stroke cap type (“butt”, “round”, or “square”). , strokeDashstyle: "" //{String} Stroke dash style according to the SLD spec. } ,markStyle: { numberMark: { width: 20 , height: 20 , style: { externalGraphic: defaults.iniDomainURL + "/pref-chiba" +"/Content/images/plugin/map-route/number_bg.png" , pointRadius: 10 } } } ,labelStyle: { labelXOffset: 0 , labelYOffset: -1 , fontColor: "#FFFFFF" , fontWeight: "bold" , labelAlign: "cb" , labelSelect: true } } } }, {}); $("head").each(function() { var exists = false; $(this).find("link").each(function(i, obj) { if (obj.href != undefined) { if (obj.href.match(/jq.MapScript.css/i)) { exists = true; return false; } } }); if (!exists) { $("").appendTo(this); } }); $("body").find("script").each(function(i, obj) { var $s = null; var $div = null; obj = obj || {}; if (obj.src != undefined) { if (obj.src.match(/APIDetail\/Gate/i) || obj.src.match(/DynamicAPI\/Index/i)) { var $s = $(obj); if ($s.prev(".MapScript").size() == 0) { var $div = $("
").insertBefore($s); $div .bind("onGetMapPrintImageParamValue", function(e, param) { var memory = $(this).triggerHandler("GetMemory"); var config = $(this).triggerHandler("GetConfig"); var imageType = memory.imageType; param = param || {}; param.MapId = defaultconf.MapSelect.mapID;//"Model.MapSelect.mapId"; param.LinkId = defaultconf.MapApi.linkid || ""; //※おそらくこの形で初期値が設定される if (defaultconf.MapApi.flgTheme == 1) { param.LayerId = defaultconf.MapApi.mtl;//""//"Model.mtl"; if ((defaultconf.MapApi.linkid || "").toString().length == 0) { param.CodesetId = defaultconf.MapApi.mcl;//""//"Model.mcl"; }else if((defaultconf.MapApi.linkid || "").toString().length > 0 && defaultconf.MapApi.mcl.length > 0){ param.CodesetId = defaultconf.MapApi.mcl; } param.ULayerId = defaultconf.MapApi.mul; param.UCodesetId = defaultconf.MapApi.mucl; } else { param.LayerId = "-1";//""//"Model.mtl"; } param.ImageType = imageType; }) .MapScript(configs.MapScript) .MapProjection(configs.MapProjection) .triggerHandler("Initialize"); } } } }); } if(typeof jQuery=='undefined') { executeScript(defaults.iniDomainURL, "../v/common/Scripts/jquery-1.10.2.min.js", function() { executeScript(defaults.iniDomainURL, "../v/common/Scripts/plugin/lib/jquery.extend.js", function() { executeScript(defaults.iniDomainURL, "../v/common/Scripts/plugin/lib/GeoAccessJS/OpenLayers.js", function() { executeScript(defaults.iniDomainURL, "../v/common/Scripts/plugin/lib/function.js", function() { executeScript(defaults.iniDomainURL, "../v/common/Scripts/plugin/lib/fix-ie-css.js", function() { executeScript(defaults.iniDomainURL, "../v/common/Scripts/plugin/lib/GeoAccessJS_extend.js", function() { executeScript(defaults.iniDomainURL, "../v/common/Scripts/plugin/jq.map_projection.js", function() { executeScript(defaults.iniDomainURL, "../v/common/Scripts/plugin/jq.mapscript.js" + "?"+(Math.random().toString().replace(".", ""))+"=", function() { initialize(jQuery); }, false); }, false); }, false); }, false); }, false); }, false); }, false); }, false, ["bundles/jquery"]); }else{ executeScript(defaults.iniDomainURL, "../v/common/Scripts/plugin/lib/GeoAccessJS/OpenLayers.js", function() { executeScript(defaults.iniDomainURL, "../v/common/Scripts/plugin/lib/function.js", function() { executeScript(defaults.iniDomainURL, "../v/common/Scripts/plugin/lib/fix-ie-css.js", function() { executeScript(defaults.iniDomainURL, "../v/common/Scripts/plugin/lib/GeoAccessJS_extend.js", function() { executeScript(defaults.iniDomainURL, "../v/common/Scripts/plugin/jq.map_projection.js", function() { executeScript(defaults.iniDomainURL, "../v/common/Scripts/plugin/jq.mapscript.js" + "?"+(Math.random().toString().replace(".", ""))+"=", function() { initialize(jQuery); }, false); }, false); }, false); }, false); }, false); }, false); } })();