/** * まず設定を読み込む。callbackで初期設定 */ function load_config(callback) { if (window.YKHM == null) { window.YKHM = {}; } YKHM.tmpStyle = OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style['default']); YKHM.tmpStyle.fillOpacity = 0; YKHM.tmpStyle.strokeDashstyle="dash"; YKHM.tmpStyle.strokeColor="#FF0000"; YKHM.tmpStyle.fillColor="#FF0000"; YKHM.tmpStyle2 = OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style['default']); YKHM.tmpStyle2.strokeDashstyle="dash"; YKHM.tmpStyle2.strokeColor="#FF0000"; YKHM.tmpStyle2.fillColor="#FF0000"; YKHM.CM = { ImgBasePath: "../../mapimg", PhotoDir: "photo", PhotoSmallDir: "small", TopURL: "http://gistat.city.yokohama.lg.jp/yokohamap/", BASE_URL: "../../app/js/frame", yokohama_def_icon: "./img/todo/icon.png", MAP_IMG_BASE_PATH: "../../", yokohama_srs: "EPSG:2451" } YKHM.BasePath = "../../app/js/frame"; YKHM.Config = { Define: { LAYER_TITLE: "地図リスト", DESCRIPTION: "市立図書館と、予約資料の貸出や返却などができる、取次サービスポイントのマップです。" }, Map: { extent: new OpenLayers.Bounds(15512309.0, 4206632.0, 15564947.0, 4246186.0), options: { projection: "EPSG:900913", displayProjection: new OpenLayers.Projection("EPSG:4326"), units: "m", minZoomLevel: 9, maxExtent: new OpenLayers.Bounds(15436304.0 ,4089685.0, 15698790.0, 4345597.93146), scales: [1733380,866690,433340,216670,108340,54170,27080,13540,6770,5000,3390,1690, 840] }, imageReload: 5, referenceMap: { layer: "base" }, compass: { id: "o-compass" } }, Layer: [ { // 横浜市DMデータ // "http://202.248.86.108/tiles/tile.php", // "http://10.255.126.198/tiles/tile.php", layerClass: OpenLayers.Layer.KaMap, args: [ "yokohamap_dm", "http://gistat.city.yokohama.lg.jp/tiles/tile.php", { g: "__base__", m: "def", meta: 4, map: "yokohamap_dm", i: "PNG8" }, { buffer: 1, layerTitle: "基本背景地図", basemapId: 1, copyright: { url: YKHM.BasePath+"/app/img/copy1.gif", width: 230, height: 17 } } ] }, { // 横浜市DMグレースケールデータ // "http://202.248.86.108/tiles/tile.php", // "http://10.255.126.198/tiles/tile.php", layerClass: OpenLayers.Layer.KaMap, args: [ "yokohamap_dm_gray", "http://gistat.city.yokohama.lg.jp/tiles/tile.php", { g: "__base__", m: "def", meta: 4, map: "yokohamap_dm_gray", i: "PNG8" }, { buffer: 1, layerTitle: "グレースケール地図", basemapId: 4, copyright: { url: YKHM.BasePath+"/app/img/copy1.gif", width: 230, height: 17 } } ] },{ // 横浜市航空写真 // "http://202.248.86.108/tiles/tile.php", // "http://10.255.126.198/tiles/tile.php", layerClass: OpenLayers.Layer.KaMap, args: [ "yokohamap_aero", "http://gistat.city.yokohama.lg.jp/tiles/tile.php", { g: "__base__", m: "def", meta: 4, map: "yokohamap_aero", i:"jpeg" }, { buffer: 1, layerTitle: "航空写真", basemapId: 2, copyright: { url: YKHM.BasePath+"/app/img/copy2.gif", width: 372, height: 17 } } ] }, { // 昭和30年代地形図 // "http://202.248.86.108/tiles/tile.php", // "http://10.255.126.198/tiles/tile.php", layerClass: OpenLayers.Layer.KaMap, args: [ "yokohamap_3000", "http://gistat.city.yokohama.lg.jp/tiles/tile.php", { g: "__base__", m: "def", meta: 8, map: "yokohamap_3000", i: "jpeg" },{ buffer: 1, layerTitle: "昭和30年代地形図", basemapId: 3, copyright: { url: YKHM.BasePath+"/app/img/copy3.gif", width: 381, height: 17 } } ] } ], LayerBase: "base", LayerTree: { separator: "#", model: null }, Filter: null, Control: { "zoombar": { cls: OpenLayers.Control.PanZoomBar }, "scaleline": { cls: OpenLayers.Control.ScaleLine, options: function () { return { geodesic: true } } }, "mouseposition": { addAfter: true, cls: OpenLayers.Control.MousePosition, options: function () { return { element: document.getElementById("mapPosition"), prefix: "x:", separator: " | y:",displayProjection:new OpenLayers.Projection("EPSG:2451") }; } } }, Global: { result: true, console: true, log: true }, Plugin: { "geocoding": { "url": YKHM.BasePath+"/plugins/geocoding/", "js": ["GeoCoding.js"], "className": "YKHM.Plugin.GeoCoding" }, "search_area": { "url": YKHM.BasePath+"/plugins/search_area/", "js": ["SearchArea.js"], "className": "YKHM.Plugin.SearchArea" }, "search_memo": { "url": YKHM.BasePath+"/plugins/search_memo/", "js": ["SearchMemo.js"], "className": "YKHM.Plugin.SearchMemo" }, "layer_area": { "url": YKHM.BasePath+"/plugins/layer_area/", "js": ["LayerArea.js"], "className": "YKHM.Plugin.LayerArea" }, "print": { "url": YKHM.BasePath+"/plugins/print/", "js": ["Print.js"], "className": "YKHM.Plugin.Print" } , "help": { "url": YKHM.BasePath+"/plugins/help/", "js": ["Help.js"], "className": "YKHM.Plugin.Help", "locate_path": "../../php/view/help/view/" } }, Toolbar: { height: 30, activeItem: "pan", items: [ { "group": "nav", "name": "pan", "control": { "cls": OpenLayers.Control.Navigation, "options": function(){ return { "mouseWheelOptions": {cumulative: false}}; } }, "icon": YKHM.BasePath+"/app/img/icon/pan.png", "tooltip": "移動", "type": OpenLayers.Control.TYPE_TOGGLE }, { "group": "nav", "name": "measure_path", "control": { "cls": YKHM.Wrapper.Control.Measure, "options": function(){ return { handler: "OpenLayers.Handler.Path",geodesic: true,handlerOptions:{style:YKHM.tmpStyle2}} } }, "icon": YKHM.BasePath+"/app/img/icon/length-measure.png", "tooltip": "距離測定", "type": OpenLayers.Control.TYPE_TOGGLE },{ "group": "nav", "name": "measure_polypath", "control": { "cls": YKHM.Wrapper.Control.Measure, "options": function(){ return { handler:"OpenLayers.Handler.Polygon",geodesic: true,area:false,handlerOptions:{style:YKHM.tmpStyle}} } }, "icon": YKHM.BasePath+"/app/img/icon/area-line_measure.png", "tooltip": "周長測定", "type": OpenLayers.Control.TYPE_TOGGLE },{ "group": "nav", "name": "measure_poly", "control": { "cls": YKHM.Wrapper.Control.Measure, "options": function(){ return { handler:"OpenLayers.Handler.Polygon",geodesic: true,handlerOptions:{style:YKHM.tmpStyle2}} } //"options": function(){ return { handler:"OpenLayers.Handler.Polygon",div:"measure_pos"} } }, "icon": YKHM.BasePath+"/app/img/icon/area-measure.png", "tooltip": "面積測定", "type": OpenLayers.Control.TYPE_TOGGLE },{ "group": "nav", "name": "addCircle", "control": { "cls": YKHM.Wrapper.Control.AddCircle }, "icon": YKHM.BasePath+"/app/img/icon/target.png", "tooltip": "円描画", "type": OpenLayers.Control.TYPE_TOGGLE },{ "name": "fill", // 名称は変更しないこと! "items": new Ext.Toolbar.Fill() } ,{ "name": "top", "icon": "../../data/favicon.gif", "tooltip": "トップページへもどります。", "text": "トップページ" } ] }, REQUEST_URL: { yokohamap_address: "../service/search/address.php", yokohamap_logout: "../service/auth/logOut.php", yokohamap_view_point_list: "../service/view/point_list.php", yokohamap_print: "../service/print/print.php", yokohamap_print_page: "../service/print/print_page.php", yokohamap_view_map_list: "../service/view/map_list.php", yokohamap_header_info: "../service/view/map_info.php", yokohamap_explayer_list: "../service/search/explayer_list.php", yokohamap_explayer_extent: "../service/search/explayer_extent.php", yokohamap_detail: "../service/view/detail.php", yokohamap_area_map: "../service/search/map.php" }, yokohama_grid_num: 20, yokohama_search_near_num: 20, Message:{ RELOAD_PAGE: "ページを再読み込みしてください。", COPYRIGHT: "Copyright(C) Yokohamap All rights reserved." } }; callback(); }