﻿/*
 *  __  __   ____  ____    ___              
 * |  \/  | / ___||  _ \  |_ _| _ __    ___ 
 * | |\/| || |  _ | |_) |  | | | '_ \  / __|
 * | |  | || |_| ||  __/   | | | | | || (__ 
 * |_|  |_| \____||_|     |___||_| |_| \___|
 *  
 * Copyright © 2009, MGP, Inc.
 * All rights reserved.
 * 
 */

if(!MGP) var MGP={};
if(!MGP.Product) MGP.Product={};
if(!MGP.Product.WebMap) MGP.Product.WebMap={};
if(!MGP.Product.WebMap.Config) MGP.Product.WebMap.Config={};

MGP.Product.WebMap.Config.CommunityLocale = {
    GetConfigKeyList: function(){
		var list = [];
		list.push("CLF");
		list.push("CDP");
		list.push("CHP");
		list.push("CPR");
		list.push("EGV");
		list.push("VDF");
		list.push("VGC");
		list.push("VGV");
		list.push("VLW");
		list.push("VMG");
		list.push("VNR");
		list.push("VOB");
		list.push("VOL");
		list.push("VRS");
		list.push("VSK");
		list.push("VWH");
		list.push("VWN");
		return list;
    },
    GetConfigList: function(){
		var list = new Array();
		list["CLF"] = '{"rows":[{"LOCALE":"CLF","CONFIG":"{ DEFAULT_MAP_EXTENT: \\"1096876.049,2015935.213,1131177.874,2046260.015\\",  GEODBID: \\"017\\"}" }]}';
		list["CDP"] = '{"rows":[{"LOCALE":"CDP","CONFIG":"{ DEFAULT_MAP_EXTENT: \\"1084284.29086944,1942541.12596997,1117862.34640578,1971673.54125475\\",  GEODBID: \\"005\\"}" }]}';
		list["CHP"] = '{"rows":[{"LOCALE":"CHP","CONFIG":"{ DEFAULT_MAP_EXTENT: \\"1111391.48325881,1996560.3360812,1141569.96972105,2026738.82254345\\", GEODBID: \\"001\\"}" }]}';
		list["CPR"] = '{"rows":[{"LOCALE":"CPR","CONFIG":"{ DEFAULT_MAP_EXTENT: \\"1104260.30722845,1936643.88808137,1129135.4511845,1961519.03203742\\",  GEODBID: \\"003\\"}" }]}';
		list["EGV"] = '{"rows":[{"LOCALE":"EGV","CONFIG":"{ DEFAULT_MAP_EXTENT: \\"1056240.75575737,1927779.49900958,1094156.8368466,1965695.58009881\\", GEODBID: \\"014\\"}" }]}';
		list["VDF"] = '{"rows":[{"LOCALE":"VDF","CONFIG":"{ DEFAULT_MAP_EXTENT: \\"1104823.78017959,1994690.48830433,1123968.80808749,2013835.51621223\\", GEODBID: \\"006\\"}" }]}';
		list["VGC"] = '{"rows":[{"LOCALE":"VGC","CONFIG":"{ DEFAULT_MAP_EXTENT: \\"1130698.46741097,1984514.97144596,1146692.45688431,2000508.96091929\\", GEODBID: \\"002\\"}" }]}';
		list["VGV"] = '{"rows":[{"LOCALE":"VGV","CONFIG":"{ DEFAULT_MAP_EXTENT: \\"1106189.34945209,1955743.09505038,1141101.83219742,1990655.57779571\\", GEODBID: \\"011\\"}" }]}';
		list["VLW"] = '{"rows":[{"LOCALE":"VLW","CONFIG":"{ DEFAULT_MAP_EXTENT: \\"1138480.37561048,1937939.33232824,1154407.75176915,1953866.70848691\\", GEODBID: \\"010\\"}" }]}';
		list["VMG"] = '{"rows":[{"LOCALE":"VMG","CONFIG":"{ DEFAULT_MAP_EXTENT: \\"1120374.59488377,1948399.36970037,1140433.24691604,1968458.02173265\\", GEODBID: \\"007\\"}" }]}';
		list["VNR"] = '{"rows":[{"LOCALE":"VNR","CONFIG":"{ DEFAULT_MAP_EXTENT: \\"1115459.8936031,1923069.80347084,1129290.71282674,1936900.62269448\\", GEODBID: \\"012\\"}" }]}';
		list["VOB"] = '{"rows":[{"LOCALE":"VOB","CONFIG":"{ DEFAULT_MAP_EXTENT: \\"1074537.5525732,1872301.29745227,1098257.12657381,1896020.87145288\\", GEODBID: \\"016\\"}" }]}';
		list["VOL"] = '{"rows":[{"LOCALE":"VOL","CONFIG":"{ DEFAULT_MAP_EXTENT: \\"1085994.7781904,2005236.01198158,1106805.4805709,2026046.71436208\\", GEODBID: \\"004\\"}" }]}';
		list["VRS"] = '{"rows":[{"LOCALE":"VRS","CONFIG":"{ DEFAULT_MAP_EXTENT: \\"1118720.21343274,1875593.95284032,1130288.36632648,1887162.10573406\\",  GEODBID: \\"015\\"}" }]}';
		list["VSK"] = '{"rows":[{"LOCALE":"VSK","CONFIG":"{ DEFAULT_MAP_EXTENT: \\"1131299.22463422,1943478.26710176,1156816.1880016,1968995.23046913\\", GEODBID: \\"009\\"}" }]}';
		list["VWH"] = '{"rows":[{"LOCALE":"VWH","CONFIG":"{ DEFAULT_MAP_EXTENT: \\"1082680.36417469,1976702.83282472,1106963.54992317,2000986.01857321\\", GEODBID: \\"013\\"}" }]}';
		list["VWN"] = '{"rows":[{"LOCALE":"VWN","CONFIG":"{ DEFAULT_MAP_EXTENT: \\"1134907.48992955,1973463.43739859,1154388.32070986,1992944.26817891\\", GEODBID: \\"008\\"}" }]}';
		return list;
    }
}

MGP.Product.WebMap.Config.ConsortiumLocale = {
    GetConfigKeyList: function(){
		var list = [];
		list.push("GISC");
		return list;
	},
    GetConfigList: function(){
		var list = new Array();
		list["GISC"] = '{"rows":[{"LOCALE":"GISC","CONFIG":"{ DEFAULT_MAP_EXTENT: \\"926706.6961637572,1801523.767205657,1312991.4183859797,2096662.656094546\\", GEODBID: \\"900\\"}" }]}';
		return list;
	}
}

MGP.Product.WebMap.Config.InteractiveMap = {
	GetFrameworkKeyList: function() {
		var list = [];
		list.push("SERVICE_REST_URL");
		list.push("SERVICE_REST_MAPSERVICE");
		list.push("SERVICE_REST_MAPSERVICE_HIDDEN");
		list.push("SERVICE_REST_TOKEN");
		list.push("SECURITY_SERVICE_REST");
		return list;
	},
	GetFrameworkList: function() {
		var list = new Array();
		list["SERVICE_REST_URL"] = "http://www.mgpinc.com/ArcGIS/rest/services";
		list["SERVICE_REST_MAPSERVICE"] = "GISC_MAPOFFICE_Project,GISC_WEBSITE_DynamicMap";
		list["SERVICE_REST_MAPSERVICE_HIDDEN"] = "GISC_WEBSITE_DynamicMap";
		list["SERVICE_REST_TOKEN"] = "r5SvXIZ0Bl2zDsu_slzjSJmEU3wcPgTwcS1kRnQG0FLrgTnlDb0dUsIBLaZ2b5ZvfjtnPyPF2q_7aSEPH7RTLw..";
		list["SECURITY_SERVICE_REST"] = "1";
		return list;
	},
	GetMapServiceKeyList: function() {
		var list = [];
		list.push("GISC_MAPOFFICE_PROJECT");
		list.push("GISC_WEBSITE_DYNAMICMAP");
		return list;
	},
	GetMapServiceList: function() {
		var list = new Array();
		list["GISC_MAPOFFICE_PROJECT"] = '{"NAME":"GISC_MAPOFFICE_Project","URL":"GISC_MAPOFFICE_Project/MapServer","TYPE":"REST","CONFIG":"DETAIL:ArcGISTiledMapServiceLayer"}';
		list["GISC_WEBSITE_DYNAMICMAP"] = '{"NAME":"GISC_WEBSITE_DynamicMap","URL":"GISC_WEBSITE_DynamicMap/MapServer","TYPE":"REST","CONFIG":"DETAIL:ArcGISDynamicMapServiceLayer"}';
		return list;
	},
    GetAnalysisList: function(){
		var list = [];
		list.push('{"LAYER":"Form of Government","ANALYSIS":"Form of government"}');
		list.push('{"LAYER":"Home Rule","ANALYSIS":"Home rule"}');
		list.push('{"LAYER":"Population","ANALYSIS":"Population"}');
		list.push('{"LAYER":"Median Household Income","ANALYSIS":"Median income"}');
		return list;
	},
    GetAnalysisMapServiceKeyList: function(){
		var list = [];
		list.push("GISC_WEBSITE_DYNAMICMAP");
		return list;
	},
	GetAnalysisLegendList: function(){
		var list = new Array();
		list["Form of Government"] =  "<table>"
			+ "<tr><td style='background-color:#fff;'><div style='background-color: rgb(0,77,168); height: 16px; width: 16px; border: solid 1px #000;filter:alpha(opacity=50);-moz-opacity: 0.5; opacity: 0.5;'>&nbsp;</div></td><td> - Census Designated Place</td></tr>"
			+ "<tr><td style='background-color:#fff;'><div style='background-color: rgb(168,56,0); height: 16px; width: 16px; border: solid 1px #000;filter:alpha(opacity=50);-moz-opacity: 0.5; opacity: 0.5;'>&nbsp;</div></td><td> - City</td></tr>"
			+ "<tr><td style='background-color:#fff;'><div style='background-color: rgb(132,0,168); height: 16px; width: 16px; border: solid 1px #000;filter:alpha(opacity=50);-moz-opacity: 0.5; opacity: 0.5;'>&nbsp;</div></td><td> - Town</td></tr>"
			+ "<tr><td style='background-color:#fff;'><div style='background-color: rgb(76,230,0); height: 16px; width: 16px; border: solid 1px #000;filter:alpha(opacity=50);-moz-opacity: 0.5; opacity: 0.5;'>&nbsp;</div></td><td> - Village</td></tr>"
			+ "</table>";
		list["Home Rule"] =  "<table>"
			+ "<tr><td style='background-color:#fff;'><div style='background-color: rgb(0,92,230); height: 16px; width: 16px; border: solid 1px #000;filter:alpha(opacity=50);-moz-opacity: 0.5; opacity: 0.5;'>&nbsp;</div></td><td> -  Yes</td></tr>"
			+ "<tr><td style='background-color:#fff;'><div style='background-color: rgb(255,0,0); height: 16px; width: 16px; border: solid 1px #000;filter:alpha(opacity=50);-moz-opacity: 0.5; opacity: 0.5;'>&nbsp;</div></td><td> -  No </td></tr>"
			+ "</table>";
		list["Median Household Income"] =  "<table>"
			+ "<tr><td style='background-color:white;'><div style='background-color: rgb(60,50,100); height: 16px; width: 16px; border: solid 1px #000;filter:alpha(opacity=50);-moz-opacity: 0.5; opacity: 0.5;'>&nbsp;</div></td><td align='right'> < $40,000 </td></tr>"
			+ "<tr><td style='background-color:white;'><div style='background-color: rgb(250,209,58); height: 16px; width: 16px; border: solid 1px #000;filter:alpha(opacity=50);-moz-opacity: 0.5; opacity: 0.5;'>&nbsp;</div></td><td align='right'> $40,000 - $50,000</td></tr>"
			+ "<tr><td style='background-color:white;'><div style='background-color: rgb(242,167,46); height: 16px; width: 16px; border: solid 1px #000;filter:alpha(opacity=50);-moz-opacity: 0.5; opacity: 0.5;'>&nbsp;</div></td><td align='right'> $50,001 - $70,000</td></tr>"
			+ "<tr><td style='background-color:white;'><div style='background-color: rgb(173,83,19); height: 16px; width: 16px; border: solid 1px #000;filter:alpha(opacity=50);-moz-opacity: 0.5; opacity: 0.5;'>&nbsp;</div></td><td align='right'> $70,000 - $120,000</td></tr>"
			+ "<tr><td style='background-color:white;'><div style='background-color: rgb(107,0,0); height: 16px; width: 16px; border: solid 1px #000;filter:alpha(opacity=50);-moz-opacity: 0.5; opacity: 0.5;'>&nbsp;</div></td><td align='right'> > $120,000  </td></tr>"
			+ "</table>";
		list["Population"] =  "<table>"
			+ "<tr><td style='background-color:white;'><div style='background-color: rgb(0,245,0); height: 16px; width: 16px; border: solid 1px #000;filter:alpha(opacity=50);-moz-opacity: 0.5; opacity: 0.5;'>&nbsp;</div></td><td align='right'> < 10,000 </td></tr>"
			+ "<tr><td style='background-color:white;'><div style='background-color: rgb(148,247,0); height: 16px; width: 16px; border: solid 1px #000;filter:alpha(opacity=50);-moz-opacity: 0.5; opacity: 0.5;'>&nbsp;</div></td><td align='right'> 10,000 - 30,000</td></tr>"
			+ "<tr><td style='background-color:white;'><div style='background-color: rgb(255,255,0); height: 16px; width: 16px; border: solid 1px #000;filter:alpha(opacity=50);-moz-opacity: 0.5; opacity: 0.5;'>&nbsp;</div></td><td align='right'> 30,001 - 60,000</td></tr>"
			+ "<tr><td style='background-color:white;'><div style='background-color: rgb(252,139,0); height: 16px; width: 16px; border: solid 1px #000;filter:alpha(opacity=50);-moz-opacity: 0.5; opacity: 0.5;'>&nbsp;</div></td><td align='right'> 60,000 - 150,000</td></tr>"
			+ "<tr><td style='background-color:white;'><div style='background-color: rgb(245,0,0); height: 16px; width: 16px; border: solid 1px #000;filter:alpha(opacity=50);-moz-opacity: 0.5; opacity: 0.5;'>&nbsp;</div></td><td align='right'> > 150,000  </td></tr>"
			+ "</table>";
		return list;
	}

}