//////////////////////////////////////////// //gle.maps.MapTypeId.ROADMAP; break; // Stand alone configuration file for all map settings. // Should always be loaded in the index file before the main // javascript file. mM.config = { // WebADE settings to be replaced in JSP conversion geoserver: mM.env.geoserverUrl+mM.env.geoserverVersion+"/wms", // Map settings mapProjection: "EPSG:3857", // Use the modern web mercator zooms: 18, // The number of allowable zoom levels 0-22 //version: "0.2.0", // Version of the entire app - now pulled from webADE // Initial map state variables startX: -124.84, // Longitude in degrees startY: 54.30, // Latitude in degrees startZ: 6, // Zoom level 0-22 baseLayer: "bRoad", // This is the default base layer. Should match "objName" from layers array showBase: 6, // The number of base layers shown. ie. not in the "show more" drawer // Variables for the Geocoder/Zoom To tool geocoder: { zoom: 14, // The scale you zoom into. maxItems: 8 // Max number of items to show in the drop down. }, // GeoCoder Marker Icon geoCoderMarkerIcon: new OpenLayers.Icon( mM.env.appUrl+'images/GeoCoderMarker.png', new OpenLayers.Size(48,48), new OpenLayers.Pixel(-24, -48)), // Project related stuff projectZoom: 10, /* * Symbology for the acetate layers. * For a full list of styling options * see: http://docs.openlayers.org/library/feature_styling.html */ identStyle: { "default": { fillColor:"#00FFE7", pointRadius:8, fillOpacity:0.4, strokeColor:"#00FFE7", strokeWidth:6, strokeOpacity:0.8, cursor:"pointer" }, select: { fillColor:"#00FFE7", fillOpacity: 0.4, strokeColor: "#00FFE7", strokeWidth:3, strokeOpacity: 0.8, cursor:"pointer" }, draggable: { // This is for the draggable nodes on the Highway Query Tool fillColor:"#FF0000", fillOpacity: 0.4, strokeColor: "#FF0000", strokeWidth:3, strokeOpacity: 0.8, cursor:"pointer" } }, highlightStyle: { // This is purely for structure highlighted from the search window. "default": { fillColor:"#00FFE7", pointRadius:4, fillOpacity:0.7, strokeWidth:0, cursor:"pointer" } }, editStyle: { "default": { fillColor:"#FF0000", pointRadius:7, fillOpacity:0.4, strokeColor:"#FF0000", strokeWidth:3, strokeOpacity:0.6, cursor:"pointer" }, select: { fillColor:"#FF0000", fillOpacity: 0.5, strokeColor: "#FF0000", strokeWidth:3, strokeOpacity: 1, cursor:"pointer" } }, /* * Currently the order of layers defined below is the * default order portrayed on the map. Although * Openlayers automatically sticks basemaps at the bottom */ layers: [{ layerName:"MapQuest", objName:"mapquest", layerType:"tms", // TMS layer imageType: "png", visible:false, base:true, opacity: 1, domains: ["1", "2", "3", "4"], url: "http://otile{n}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png" },{ layerName:"Mapbox Moon", objName:"mapboxMoon", layerType:"tms", // TMS layer imageType: "png", visible:false, base:true, opacity: 1, domains: ["a", "b", "c", "d"], url: "https://{n}.tiles.mapbox.com/v3/examples.map-9d0r2yso/{z}/{x}/{y}.png", attributeLogo: "images/mapbox.png", attributeLogoLink: "http://www.mapbox.com/", attributeText: "Basemap courtesy of " },{ layerName:"Mapbox Mars", objName:"mapboxMars", layerType:"tms", // TMS layer imageType: "png", visible:false, base:true, opacity: 1, domains: ["a", "b", "c", "d"], url: "https://{n}.tiles.mapbox.com/v3/examples.map-qogxobv1/{z}/{x}/{y}.png", attributeLogo: "images/mapbox.png", attributeLogoLink: "http://www.mapbox.com/", attributeText: "Basemap courtesy of " },{ layerName:"Mapbox Terrain", objName:"mapboxTerrain", layerType:"tms", // TMS layer imageType: "png", visible:false, base:true, opacity: 1, domains: ["a", "b", "c", "d"], url: "https://{n}.tiles.mapbox.com/v3/examples.map-uci7ul8p/{z}/{x}/{y}.png", attributeLogo: "images/mapbox.png", attributeLogoLink: "http://www.mapbox.com/", attributeText: "Basemap courtesy of " },{ layerName:"Mapbox Streets", objName:"mapboxTerrain", layerType:"tms", // TMS layer imageType: "png", visible:false, base:true, opacity: 1, domains: ["a", "b", "c", "d"], url: "https://{n}.tiles.mapbox.com/v3/examples.map-vyofok3q/{z}/{x}/{y}.png", attributeLogo: "images/mapbox.png", attributeLogoLink: "http://www.mapbox.com/", attributeText: "Basemap courtesy of " },{ layerName:"Mapbox Night", objName:"mapboxNight", layerType:"tms", // TMS layer imageType: "png", visible:false, base:true, opacity: 1, domains: ["a", "b", "c", "d"], url: "https://{n}.tiles.mapbox.com/v3/examples.map-cnkhv76j/{z}/{x}/{y}.png", attributeLogo: "images/mapbox.png", attributeLogoLink: "http://www.mapbox.com/", attributeText: "Basemap courtesy of " },{ layerName:"Pale Dawn", objName:"dawn", layerType:"tms", // TMS layer imageType: "png", visible:false, base:true, opacity: 1, domains: ["a.", "b.", "c.", ""], url: "http://{n}tile.cloudmade.com/b5d7e02a5e414214b51c028eb20b4182/998/256/{z}/{x}/{y}.png" },{ layerName:"Midnight", objName:"midnight", layerType:"tms", // TMS layer imageType: "png", visible:false, base:true, opacity: 1, domains: ["a.", "b.", "c.", ""], url: "http://{n}tile.cloudmade.com/b5d7e02a5e414214b51c028eb20b4182/999/256/{z}/{x}/{y}.png" }, /* { layerName:"Google Terrain", objName:"gTer", layerType:"tms", // TMS layer imageType: "jpg", visible:false, base:true, opacity: 1, domains: ["1", "2", "3", "4"], url: "https://mts{n}.google.com/vt/lyrs=t@130,r@207000000&x={x}&y={y}&z={z}", attributeLogo: "https://maps.gstatic.com/intl/en_ALL/mapfiles/poweredby.png", attributeLogoLink: "http://maps.google.com" },{ layerName:"Google Streets", objName:"gMap", layerType:"tms", // TMS layer imageType: "jpg", visible:false, base:true, opacity: 1, domains: ["1", "2", "3", "4"], url: "https://mts{n}.google.com/vt/lyrs=m@253012794&x={x}&y={y}&z={z}", // url: "https://mts{n}.google.com/vt/lyrs=m@207000000&x={x}&y={y}&z={z}", attributeLogo: "https://maps.gstatic.com/intl/en_ALL/mapfiles/poweredby.png", attributeLogoLink: "http://maps.google.com" },{ layerName:"Google Satellite", objName:"gSat", layerType:"tms", // TMS layer imageType: "jpg", visible:false, base:true, opacity: 1, domains: ["0", "1", "2", "3"], url: "https://khms{n}.google.com/kh/v=145&x={x}&y={y}&z={z}", attributeLogo: "https://maps.gstatic.com/intl/en_ALL/mapfiles/poweredby.png", attributeLogoLink: "http://maps.google.com" }, */ { layerName:"Open Street Map", objName:"osm", layerType:"tms", // TMS layer imageType: "png", visible:false, base:true, opacity: 1, domains: ["a.", "b.", "c.", ""], url: "http://{n}tile.openstreetmap.org/{z}/{x}/{y}.png", attributeLogo: "images/osm.png", attributeLogoLink: "http://www.openstreetmap.org", attributeText: "Basemap courtesy of " },{ layerName:"Open Cycle Map", objName:"ocm", layerType:"tms", // TMS layer imageType: "png", visible:false, base:true, opacity: 1, domains: ["a.", "b.", "c.", ""], url: "http://{n}tile.opencyclemap.org/cycle/{z}/{x}/{y}.png", attributeLogo: "images/osm.png", attributeLogoLink: "http://www.openstreetmap.org", attributeText: "Basemap courtesy of " },{ layerName:"Open Transport Map", objName:"otm", layerType:"tms", // TMS layer imageType: "png", visible:false, base:true, opacity: 1, domains: ["a.", "b.", "c.", ""], url: "http://{n}tile2.opencyclemap.org/transport/{z}/{x}/{y}.png", attributeLogo: "images/osm.png", attributeLogoLink: "http://www.openstreetmap.org", attributeText: "Basemap courtesy of " },{ layerName:"ESRI Satellite", objName:"eSat", layerType:"tms", // TMS layer imageType: "jpg", visible:false, base:true, opacity: 1, domains: [], url: "https://services.arcgisonline.com/ArcGIS/rest/services/World_imagery/MapServer/tile/{z}/{y}/{x}.jpg", attributeLogo: "images/esri.png", attributeLogoLink: "http://www.esri.com", attributeText: "Basemap courtesy of " },{ layerName:"ESRI Terrain", objName:"eTer", layerType:"tms", // TMS layer imageType: "jpg", visible:false, base:true, opacity: 1, domains: [], url: "https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}.jpg", attributeLogo: "images/esri.png", attributeLogoLink: "http://www.esri.com", attributeText: "Basemap courtesy of " },{ layerName: "2004 – Present Traffic Data", objName: "cluster", layerType: "wfsCluster", visible: true, opacity: 1, on:true, base:false, layerSchema: "tig", layerWFS: "TIG_TMS_GEOMETRY_EXT_V", url: mM.env.geoserverUrl + mM.env.geoserverVersion + "/wms", // location of wms service geomColumn: "SHAPE", projection: "EPSG:3857", version: "2.0.0", identifiable: true, // meta: { // desc: "Here is a sample description" // Layer description // }, styleMap: new OpenLayers.StyleMap({ "default": new OpenLayers.Style({ pointRadius: "${radius}", label: "${count}", labelAlign: "${labelAlign}", labelYOffset: "${labelYOffset}", labelOutlineColor: "#FFFFFF", labelOutlineWidth: "${labelOutlineWidth}", fontColor: "${whatLabelColour}", fillColor: "${whatSymbolColour}", //fontWeight : 'default', fillOpacity: 0.8, strokeColor: "${whatSymbolColour}", strokeWidth: 8, strokeOpacity: 0.3 },{ context: { labelOutlineWidth: function(feature) { if (feature.attributes.count == 1) return 3; return 0; }, labelAlign: function(feature) { if (feature.attributes.count == 1) return "cm"; return "cm"; // TODO: and what do we have here. }, labelYOffset: function(feature) { if (feature.attributes.count == 1) return 15; return 0; }, radius: function(feature) { if (mM.map.getScale()<20000) {return Math.min(feature.attributes.count, 10) + 5;} else {return Math.min(feature.attributes.count, 10) + 3;} }, count: function(feature) { if (feature.attributes.count == 1) return feature.cluster[0].attributes.SITE_CODE; return feature.attributes.count; }, whatLabelColour: function(feature) { if ((feature.attributes.count == 1) && (feature.cluster[0].attributes.TYPE_CODE == 'P')) return '#CC0000'; // red if ((feature.attributes.count == 1) && (feature.cluster[0].attributes.TYPE_CODE == 'S')) return '#009900'; // green return '#FFFFFF'; }, whatSymbolColour: function(feature) { if ((feature.attributes.count == 1) && (feature.cluster[0].attributes.TYPE_CODE == 'P')) return '#CC0000'; // red if ((feature.attributes.count == 1) && (feature.cluster[0].attributes.TYPE_CODE == 'S')) return '#009900'; // green return '#009900'; // red } } }), "select": new OpenLayers.Style({ fillColor: '#00FFE6', strokeColor: '#00FFE6' //,fontWeight : 'bold' }) }) },{ layerName: "1994 – 2003 Traffic Data", objName: "clusterTMP", layerType: "wfsCluster", visible: true, opacity: 1, on:false, base:false, layerSchema: "tig", layerWFS: "TIG_TMP_GEOM_EXT_V", url: mM.env.geoserverUrl + mM.env.geoserverVersion + "/wms", // location of wms service geomColumn: "SHAPE", projection: "EPSG:3857", version: "2.0.0", identifiable: true, styleMap: new OpenLayers.StyleMap({ "default": new OpenLayers.Style({ pointRadius: "${radius}", label: "${count}", labelAlign: "${labelAlign}", labelYOffset: "${labelYOffset}", labelOutlineColor: "#FFFFFF", labelOutlineWidth: "${labelOutlineWidth}", fontColor: "${whatLabelColour}", fillColor: "#0033CC", //fontWeight : 'default', fillOpacity: 0.8, strokeColor: "#0033CC", strokeWidth: 8, strokeOpacity: 0.3 },{ context: { labelOutlineWidth: function(feature) { if (feature.attributes.count == 1) return 3; return 0; }, labelAlign: function(feature) { if (feature.attributes.count == 1) return "cm"; return "cm"; }, labelYOffset: function(feature) { if (feature.attributes.count == 1) return 15; return 0; }, radius: function(feature) { if (mM.map.getScale()<20000) {return Math.min(feature.attributes.count, 10) + 5;} else {return Math.min(feature.attributes.count, 10) + 3;} }, count: function(feature) { if (feature.attributes.count == 1) return feature.cluster[0].attributes.TMP_ID; return feature.attributes.count; }, whatLabelColour: function(feature) { if (feature.attributes.count == 1) return '#0033CC'; return '#FFFFFF'; } } }), "select": new OpenLayers.Style({ fillColor: '#00FFE6', strokeColor: '#00FFE6' //,fontWeight : 'bold' }) }) },{ layerName: "Turning Movement Counts", objName: "clusterTSG", layerType: "wfsCluster", visible: true, opacity: 1, on:false, base:false, layerSchema: "tsg", //layerWFS: "intersection_surveys_open_data2", layerWFS: "TSG_ARCIMS_SURVEY_V_SQLVIEW", url: mM.env.geoserverUrl + mM.env.geoserverVersion + "/wms", // location of wms service geomColumn: "SHAPE", projection: "EPSG:3857", version: "2.0.0", identifiable: true, styleMap: new OpenLayers.StyleMap({ "default": new OpenLayers.Style({ pointRadius: "${radius}", label: "${count}", labelAlign: "${labelAlign}", labelYOffset: "${labelYOffset}", labelOutlineColor: "#FFFFFF", labelOutlineWidth: "${labelOutlineWidth}", fontColor: "${whatLabelColour}", fillColor: "#FF6600", //fontWeight : 'default', fillOpacity: 0.8, strokeColor: "#FF6600", strokeWidth: 8, strokeOpacity: 0.3 },{ context: { labelOutlineWidth: function(feature) { if (feature.attributes.count == 1) return 3; return 0; }, labelAlign: function(feature) { if (feature.attributes.count == 1) return "cm"; return "cm"; }, labelYOffset: function(feature) { if (feature.attributes.count == 1) return 15; return 0; }, radius: function(feature) { if (mM.map.getScale()<20000) {return Math.min(feature.attributes.count, 10) + 5;} else {return Math.min(feature.attributes.count, 10) + 3;} }, count: function(feature) { if (feature.attributes.count == 1) return feature.cluster[0].attributes.SURVEY_NUMBER; return feature.attributes.count; }, whatLabelColour: function(feature) { if (feature.attributes.count == 1) return '#FF6600'; return '#FFFFFF'; } } }), "select": new OpenLayers.Style({ fillColor: '#00FFE6', strokeColor: '#00FFE6' //,fontWeight : 'bold' }) }) },{ layerName: "Uniform Traffic Volume Segments (UTVS)", objName: "utvs", layerType: "wms", visible: true, opacity: 1, on:false, base:false, layerSchema: "tig", layerWMS: "TIG_UTV_SEGMENT_EXT", url: mM.env.geoserverUrl + mM.env.geoserverVersion + "/wms", // location of wms service geomColumn: "SHAPE", projection: "EPSG:3857", version: "2.0.0", identifiable: true//, // meta: { // desc: "These are just sample legend entries. Stolen from BIG.", // Layer description // symbols: [{ // Legend symbols // icon: mM.env.geoserverUrl+mM.env.geoserverVersion + "/legends/BSR_BRIDGE.png", // desc: "Bridge" // },{ // icon: mM.env.geoserverUrl+mM.env.geoserverVersion + "/legends/BSR_CULVERT.png", // desc: "Culvert" // },{ // icon: mM.env.geoserverUrl+mM.env.geoserverVersion + "/legends/BSR_MARINE.png", // desc: "Marine" // },{ // icon: mM.env.geoserverUrl+mM.env.geoserverVersion + "/legends/BSR_RWALL.png", // desc: "Retaining Wall" // },{ // icon: mM.env.geoserverUrl+mM.env.geoserverVersion + "/legends/BSR_SIGN.png", // desc: "Sign" // },{ // icon: mM.env.geoserverUrl+mM.env.geoserverVersion + "/legends/BSR_TUNNEL.png", // desc: "Tunnel" // }] // } }, /* { layerName:"Google Streets", objName:"gMap2", layerType:"google", // Google base layer layerView:"streets", // The Google theme; streets, terrain, hybrid or satellite. // layerView:"streets", // The Google theme; streets, terrain, hybrid or satellite. visible:false, base:true, opacity: 1, attributeLogo: "https://maps.gstatic.com/intl/en_ALL/mapfiles/poweredby.png", attributeLogoLink: "http://maps.google.com" },{ layerName:"Google Satellite", objName:"gSat2", layerType:"google", // Google base layer layerView:"hybrid", // The Google theme; streets, terrain, hybrid or satellite. visible:false, base:true, opacity: 1, attributeLogo: "https://maps.gstatic.com/intl/en_ALL/mapfiles/poweredby.png", attributeLogoLink: "http://maps.google.com" }, */ { layerName:"Bing Roads", // Name viewed on the map objName:"bRoad", // The object name to be used in the main script layerType:"bing", // The source/type of layer layerView:"r", // r is for roads base:true, visible:true, // Visible to users url: "https://ecn.t{n}.tiles.virtualearth.net/tiles/{tileName}.jpeg?g=851&", //apiKey: "", attributeLogo: "https://dev.virtualearth.net/Branding/logo_powered_by.png", attributeLogoLink: "https://www.bing.com/maps", attributeText: "Basemap courtesy of " },{ layerName:"Bing Hybrid", // Name viewed on the map objName:"bHyb", // The object name to be used in the main script layerType:"bing", // The source/type of layer layerView:"h", // h is for hybrid base:true, visible:true, // Visible to users url: "https://ecn.t{n}.tiles.virtualearth.net/tiles/{tileName}.jpeg?g=851&", //apiKey: "", attributeLogo: "https://dev.virtualearth.net/Branding/logo_powered_by.png", attributeLogoLink: "https://www.bing.com/maps", attributeText: "Basemap courtesy of " },{ layerName:"Bing Satellite", // Name viewed on the map objName:"bSat", // The object name to be used in the main script layerType:"bing", // The source/type of layer layerView:"a", // a is for aerial base:true, visible:false, // Visible to users url: "https://ecn.t{n}.tiles.virtualearth.net/tiles/{tileName}.jpeg?g=851&", //apiKey: "", attributeLogo: "https://dev.virtualearth.net/Branding/logo_powered_by.png", attributeLogoLink: "https://www.bing.com/maps", attributeText: "Basemap courtesy of " }] };