/*
 *
 * This establishes a number of constants used for configuration of the application
 *
 * Many of these can be over-ridden in the Mapbook. Some cannot as they are used to initalize the interface.
 * Example:
 * <mapbook>
 *	<interface>
 *		<param name="BLANK_IMAGE" value="shared/images/my_blank.gif"/>
 *		<param name="MAP_GROUND_UNITS" value="FT"/>
 *	</interface>
 *	...
 * </mapbook>
 *
 */

/*
 * Application Configuration Location
 */

var MAPBOOK_FILE = 'demo.xml'; /* This is the default mapbook! This setting can be overridden by setting the mapbook= variable in the URL */


/*
 * Additional Server Tools
 */
var DRAWING_URL = '/gis/mapscript/cgi-bin/saveDrawing.pl?coords=%COORDS%&shape=%SHAPE%&buffer=%BUFFER%&title=%TITLE%';

/*
 * MapServer Location
 */

var MAPSERVER_ROOT = '/cgi-bin/mapserv';
var MAPSERVER_IMAGE_URL = MAPSERVER_ROOT+'?map=%MAPFILE%&mapext=%EXTENTS%&mapsize=%SIZE%&mode=map';
var MAPSERVER_DATA_URL = MAPSERVER_ROOT+'?map=%MAPFILE%&mapext=%EXTENTS%&mapsize=%SIZE%&mode=nquery&searchmap=true';
var MAPSERVER_LEGEND_URL = MAPSERVER_ROOT+'?map=%MAPFILE%&mapext=%EXTENTS%&mapsize=%SIZE%&mode=legend';

/* 
 * THIS WILL BE DEPRECIATED IN FAVOR OF SCALE BAR ON THE MAP!
 * You can have what-ever CGI you want generate a scale bar
 * only two variables are passed to it:
 *	[SIZE] - The image size of hte map
 *	[EXTENTS] - The extents in "MINX MINY MAXX MAXY" format.
 * To disable the Scalebar, simply set SCALEBAR_CALL to null or ''
 */
var SCALEBAR_CALL = '/datasets/ANNOTATION/SAINT_PAUL/PUBLIC_WORKS/GISMO/scalebar.map?mapsize=[SIZE]&mapext=[EXTENTS]&mode=scalebar';

/*
 * This is the client enforced limit on how many objects it will
 * be willing to process once downloaded.  Setting this rediculously high
 * will the control to be in the mapfiles/server.
 */
var LAYER_MAXIMUM_OBJECTS = 200;

/*
 * If there is a failure, Moose will attempt to make the call again
 * this sets the maximum number of attempts
 */
var SERVER_MAXIMUM_ATTEMPTS = 3;

/*
 * Default Image Icons
 */

var BLANK_IMAGE = 'shared/images/blank.gif';
var UNKNOWN_DEFAULT_ICON = 'shared/images/map_info.gif';
var SERVICE_DEFAULT_ICON = 'shared/images/tool.png';
var MAP_DEFAULT_ICON = 'shared/images/map_image_loaded.png';
var VIEW_DEFAULT_ICON = 'shared/images/view.gif';

var FOLDER_ICON = 'shared/images/folder.png';
var FOLDER_OPEN_ICON = 'shared/images/open_folder.png';
var MAP_LOADING_ICON ='shared/images/loading.png';
var MAP_DATA_ICON = 'shared/images/map_data_loaded.png';
var MAP_OVERLOAD_ICON = 'shared/images/map_overload.png';
var MAP_ERROR_ICON = 'shared/images/map_error.png';

var REMOVE_ICON = 'shared/images/remove.png';
var RELOAD_ICON = 'shared/images/reload.png';
var FADE_ICON = 'shared/images/fade.png';
var UNFADE_ICON = 'shared/images/unfade.png';

var CHECKED_ICON = 'shared/images/map_info.gif';
var UP_ICON = 'shared/images/arrow_up.png';
var DOWN_ICON = 'shared/images/arrow_down.png';

var SLIDE_LEFT = 'shared/images/slide_left.png';
var SLIDE_RIGHT = 'shared/images/slide_right.png';

var META_DEFAULT_ICON = 'shared/images/meta.png';
var HELP_DEFAULT_ICON = 'shared/images/help.png';


var DEFAULT_WINDOW_INDEX = 100;

/*
 * Cursor Configuration
 */

var CURSOR_NOTHING = 'default';

var CURSOR_ZOOM_IN = 'url(cursors/zoomin.cur),auto';
var CURSOR_ZOOM_OUT = 'url(cursors/zoomout.cur),auto';
var CURSOR_ZOOM_PAN = 'url(cursors/pan.cur),auto';

var CURSOR_POPUPS = 'help';
var CURSOR_DRAW = 'url(cursors/pencil.cur),auto';
var CURSOR_MEASURE = 'url(cursors/measure.cur),auto';

/*
 * OpenMNND Specific Configuration
 */
var OPENMNND_SKIN = 'green'; /* Default skin/theme to load */
var HEADER_URL = 'skins/%THEME%/header.html'; /* The header could be fixed, but this default allows it to change with the Theme */
var SIDE_PANEL_RIGHT = true;	/* Sets whether the side panel should be on the right or left side of the screen */

/* Settings for the Map Navigator */
var SHOW_MAP_NAVIGATOR = true;
var EAST_WEST_PERCENTAGE = .25; /* Percentage of the map that they Map Navigator will scroll when clicked */
var NORTH_SOUTH_PERCENTAGE = .25;
var SLIDER_MIN_SCALE = 2;	/* Map Navigator Minimum/Maximum Scale */
var SLIDER_MAX_SCALE = 100000;

/* Settings for the references map */
var REFERENCE_MAP = true;		/* Turns on/off the reference map */
var REFERENCE_MAP_WIDTH = 150;		/* Reference Map Dimensions */
var REFERENCE_MAP_HEIGHT = 100;
var REFERENCE_MAP_TOP = true;		/* Reference Map Location, the reference map can be pinned to one of the four corners of the map */
var REFERENCE_MAP_LEFT = false;
var REFERENCE_MAP_DYNAMIC = true;	/* The reference map can be static (older style) or Dynamic like Google & others (newer style) */
					/* Not fully implemented */
var REFERENCE_MAP_MULTIPLIER = 16;	/* The scale multiplier between the main-map and the reference map */

var OPENMNND_ORGANIZATION = 'City of Saint Paul'; /* Organization that will be displayed in the footer */

/*
 * Toolbar Display Options
 */
var TOOLBAR_TEXT = false; /* Toggles whether the Tools show have the title shown */
var TOOLBAR_IMAGE = true; /* Toggles whether the Tools should have icons */
var TOOLS_SHOW_AS_SELECTED = false; /* Toggles Whether the Tools anchors have the .className is set to selected */
var TOOLS_DIVIDE_PANEL = false; /* This makes the upper toolbar defined only on-load and the tool-panel dynamic if set true, otherwise both are dynamic */
var TOOLS_SHOW_TAB = true; /* Defines whether to show the Tools Tab */
/*
 * Unit Specification
 */

var MAP_GROUND_UNITS = "M"; // "IN", "FT", "M", "MI" /* Sets the type of Ground Units */
var MAP_COORDINATE_DISPLAY = true; /* Toggles whether to the map coordinates should be shown in the footer. */
var MAP_SCALE_DISPLAY = true;	/* Toggles whether the scale box should be shown */
var MAP_COORDINATE_SYSTEM = 'UTM-15'; /* Sets the Map Coordinate system, for coordinate reprojection to Lat/Long */
//MAP_COORDINATE_SYSTEM = 'MNCOUNTY-RAMSEY';

var MAP_PIXELS_PER_INCH = 72; /* Sets the scrreen DPI for scale calculations */

var ZOOM_BOX_SHAPE = 'box'; ///'scalebox' /* The rubber-band zoom in/out can be forced to be displayed using the aspect ratio of the map */


/*
 * These set the scale-settings
 * This is an associative array, the Key is displayed as the title and the Value is the Scale
 */
var SCALEBOX_JUMPER_INCREMENTS = new Array();
SCALEBOX_JUMPER_INCREMENTS['6 Inches'] = '6';
SCALEBOX_JUMPER_INCREMENTS['1 Foot'] = '12';
SCALEBOX_JUMPER_INCREMENTS['10 Feet'] = '120';
SCALEBOX_JUMPER_INCREMENTS['100 Feet'] = '1200';
SCALEBOX_JUMPER_INCREMENTS['500 Feet'] = '6000';
SCALEBOX_JUMPER_INCREMENTS['1 Mile'] = '63360';
SCALEBOX_JUMPER_INCREMENTS['10 Miles'] = '633600';


var SERVICE_RETURN_NEW_WINDOW = false;/* Sets whether results will be rendered in a new window or in the control panel. */ 
var SERVICE_SHOW_WARNINGS = false; /* Default empty results checking can be turned off */

/*
 * This controls the visibility and names of the tabs as they are displayed
 * in the side-panel
 */
var TABS_SHOW_PANEL = true;
var TABS_CATALOG_NAME = 'Map Layers';
var TABS_LEGENDS_NAME = 'Legends & Controls';
var TABS_TOOLS_NAME = 'Tools';

