// Client-specific parameters for CivXplorer

//***************************************************************************
//*			map service and application server locations		    
//***************************************************************************
// MapServices
var MasterService = "LCwww2007";
var OverviewService = "waterfordtwp_overview";
// ACL map service authorization username and password (must be the same for map and overview!)
var MapServiceAuthorization = ""; // ex: "username:password"  must be seperated by ":"
// get machine name
var hostName = document.location.host;
var IMShost = document.location.host;
var docPath = "http://" + document.location.host + document.location.pathname;
var homeDir = docPath.substring(0,docPath.length-12);
var serverAlias = "/servlet/com.esri.esrimap.Esrimap";
// make URL for getting mapservice catalog
var catURL = "http://" + IMShost + serverAlias + "?ServiceName=catalog";
// make prefix for URL
var serverURL  = "http://" + IMShost + serverAlias + "?ServiceName=";
var imsURL = "http://" + IMShost + serverAlias + "?ServiceName=" + MasterService;
var imsOVURL =  "http://" + IMShost + serverAlias +"?ServiceName=" + OverviewService;
var imsQueryURL = imsURL + "&CustomService=Query";
var imsGeocodeURL = imsURL + "&CustomService=Geocode";
// the base servlet connector URL (moved from psXML.js)
var connectorURL = "http://" + IMShost + serverAlias + "?ServiceName=redirect";
// client version
var cVersion = "&ClientVersion=4.0"; // 4.0 or 3.1

//***************************************************************************
//*			map extent variables		    
//***************************************************************************
//initial map extent
var startExtentMapLayer = "";
var startLeft = 1.3370380E7;
var startRight = 1.3404230E7;
var startTop = 441575.000;
var startBottom = 407050.000;
//maximum map extent
var limitExtentMapLayer = "";
var limitLeft = 1.3370360E7;
var limitRight = 1.3404250E7;
var limitTop = 441595.000;
var limitBottom = 407000.000;
// if true, use a dropdown menu for overlay & image layers....otherwise uses a list
var OverlaysAsDropdown = true;
// if true, zoom to full extent uses starting extent, not maximum extent
var fullZoomAsStart = true;
// if true, user cannot zoom or pan outside of limit- extents
var enforceFullExtent = true;

//*********************************************************************
//*	  CX layout parameters			                    
//*********************************************************************
var CityLogo = homeDir + "";
var CityLogoWidth = 0;
var CityLogoHeight = 0;
var defaultReportTitle = "The Charter Township of Waterford";

// use start page content over map on page open
var useStartPage = true;
// CX - header content for client
var headerContent = 'Waterford Township GIS Online';
// CX - user page location for metadata
var MetaDataURL = "";
// CX - page location for FAQ
var faqURL = "";
// data info and disclaimer strings
var SourceString = "The Charter Township of Waterford and Oakland County, Michigan.";
var DateString = "Oakland County parcel data; updated weekly.  Spring of 2006 for B & W aerial imagery.  All other data updated as needed."
var MapDisclaimerString1 = "Information depicted hereon is for reference purposes only.  It was compiled from the best available resources which have varying degrees of accuracy.  This data in neither a legally recorded map nor a survey and is not intended to be used as such.  The Charter Township of Waterford assumes no responsibility for errors that arise from the use of this data.";
var MapDisclaimerString2 = "Information depicted hereon is for reference purposes only.  It was compiled from the best available resources which have varying degrees of accuracy.  This data in neither a legally recorded map nor a survey and is not intended to be used as such.  The Charter Township of Waterford assumes no responsibility for errors that arise from the use of this data.";
var LogoString = '<B>Created By:</B><br><img src="images/CXplansightsmall.gif">';

//*********************************************************************
//*	  data specific parameters			                    
//*********************************************************************
// starting selection layer
var startingSelectLayerID = "optional-parcels";
// set variables for layer indexes and query
var layerParcelQueryIDs = new Array("optional-parcels","optional-structures"); // corresponding mapservice Indexes of property layers
//layerParcelQueryIDs[0] = "optional-parcels";  // needed for single query layer with index 0
var PINFieldName = new Array("SID_DASH","SID_DASH"); // corresponding PIN search fields
var QueryPINIsString = new Array(true,true); // corresponding t/f for pin field is string
var AddressFieldName = new Array("ADDRESS","FT_NUM"); // corresponding house number search fields
var QueryAddressIsString = new Array(true,true); // corresponding t/f for house number field is string
var StreetFieldName = new Array("ADDRESS","FT_STREET");  // corresponding street name search fields
var OwnerFieldName = new Array("OWNER1","OWNER1");  // corresponding owner name search fields

// default values for parcel search
var defaultQueryPin="13-16-276-008";
var defaultQueryAddress="5200";
var defaultQueryStreet="Civic Center";

// geocoding options
var layerGeocodeID = "optional-base-streets";
var geocodeOnParcelFail = true;
var defaultQueryIntersection = "HIGHLAND & AIRPORT";

// mailing label resident name option
var mailingResidentText="CURRENT RESIDENT";
var useMailingResidentText = true;
var mailingCSZText = "";
var useMailingCSZText = false;

// buffer/measure/units
var defaultBufferSize = 300;
var MapUnits = "Feet";
var ScaleBarUnits = "Feet";
var numDecimals = 2; // number of decimal places to show after measurements

// no-show layers for legend (include labeling-only layers, image catalogs, etc)
var notInLegend = new Array("optional-addrtext","optional-sidwells","optional-dims","optional-alias","optional-sidwellcondo","optional-rdnames");
// no-show layers for imagery
var notOnPhotos = new Array("optional-runways","optional-structures","optional-lakes","optional-river");
// polygon layers only - list of layers and new drawing specs for on aerial photos
var PhotoColorChangeIDs = new Array("optional-parcels","base-water");
var PhotoColorChangeSpecs = new Array(new Array("3","solid","255,200,0","1.0","solid","0,0,0","0.0"),new Array("3","solid","0,0,255","1.0","solid","204,255,255","0.4"));
//new Array("0boundary width","1boundary line type","2boundary color","3boundary trans","4fill type","5fill color","6fill trans")

// maximum number of features returned from query
var maxFeaturesReturned = 1000;
var maxFeaturesDisplayed = 25;
// number of data samples retrieved for query form
var numberDataSamples = 500;

//*********************************************************************
//*	  map layout and control parameters			                    
//*********************************************************************
// overview map zoom to controls
var ovZoomToLayer = false;
var ovZoomLayer = "";
var ovZoomDistance = 2000;
// map colors for background
var mapBackColor = '';
var OVmapBackColor = '';
var legendBackColor = '';
// var legendFont = "Verdana"; // legend font
var legendFont = "Century Gothic"; // legend font

// Scale Bar & North Arrow
var drawScaleBar = true;
var drawNorthArrow = true;
var NorthArrowType = "4";
var NorthArrowSize = "15";
var NorthArrowCoords = "40 40"; // used for default and custom North Arrows
var NorthArrowAngle = "0";
// fill in only for custom north arrow image
var useCustomNorthArrow = false;
var CustomNorthArrowImageLoc = "D:/ArcIMS/icons/CXnortharrow.gif"; // use "\\" or "/" as directory dividers!
// custom logo on map
var useCustomMapLogo = false;
var CustomMapLogoImageLoc = "D:/ArcIMS/icons/NoviLogoSmall.gif"; // use "\\" or "/" as directory dividers!
var CustomMapLogoHeight = 75;
var CustomMapLogoWidth = 80;

// panning/zooming/selection parameters
var panFactor = 85/100; //panning factor for arrow buttons
var zoomFactor = 2; // single click zoom factor
var selectMargin = 650; // in Map Units - margin factor for zooming in on selected lines and polygons
var selectPointMargin = 650; // in Map Units - margin factor for zooming in on selected points
var pixelTolerance = 5; // search tolerance in pixels around click
// dynamic select/measure
var selectLineColor = "#FF0000";
var selectLineWidth = 3;
var showLength = true; // Show length information on measure line segments and circle radius



