Copyright (c) 2001, DM Solutions Group Inc. * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ //set the language resource file $szLanguageResource = str_replace("\\","/",dirname(__FILE__))."/Locate.dbf"; // include the supporting php functions include("../session.inc.php"); include_once("../CWC2ButtonCache.php"); // Include geocoder API include_once(COMMON."phpgeocoder/geocoder.php" ); // List of search services to use include_once(COMMON."phpgeocoder/services/gazetteer_server.php"); include_once(COMMON."phpgeocoder/services/gmap_server.php"); include_once(COMMON."phpgeocoder/services/postalcode_server.php"); include_once(COMMON."phpgeocoder/services/NTS_server.php"); include_once(COMMON."phpgeocoder/services/watershed_server.php"); $szOnload = ""; if (isset($http_form_vars['szField']) && $http_form_vars['szField'] != "") { $szOnload = "removeSpinner()"; $oGeoCoder = new PHPGeoCoder(); $oGeoCoder->oErrorManager =& $_SESSION['gErrorManager']; switch($http_form_vars['szField']) { case "placename" : { $oGeoCoder->addSearchAttribute(new PlaceName($http_form_vars['szPlaceName'])); $oGeoCoder->addSearchService(new GazetteerServer($oGeoCoder)); }break; case "postalcode" : { $oGeoCoder->addSearchAttribute(new PostalCode($http_form_vars['szPostalCode'])); $oGeoCoder->addSearchService(new PostalCodeServer($oGeoCoder)) ; }break; case "nts" : { $oGeoCoder->addSearchAttribute(new MapSheet($http_form_vars['szNTS'])); $oGeoCoder->addSearchService(new NTSServer($oGeoCoder)) ; } break; case "watershed" : { $oGeoCoder->addSearchAttribute(new WatershedCode($http_form_vars['szWatershed'])); $oGeoCoder->addSearchService(new WatershedServer($oGeoCoder)) ; } break; default : break; } } $szPlaceName = ((isset($http_form_vars['szPlaceName'])) ? $http_form_vars['szPlaceName'] : ""); $szPostalCode = ((isset($http_form_vars['szPostalCode'])) ? $http_form_vars['szPostalCode'] : ""); $szNTS = ((isset($http_form_vars['szNTS'])) ? $http_form_vars['szNTS'] : ""); $szWatershed = ((isset($http_form_vars['szWatershed'])) ? $http_form_vars['szWatershed'] : ""); ?> <?php echo trim($oMLT->get("0", "Find a location")); ?> "; ?>
 get("1", "Gazetteer Service")); ?>

get("2", "Please enter the name of the place or feature that you are trying to find in the field below.")); ?>

get("3", "Place or Feature")); ?>: get("6", "Locate Place")), trim($oMLT->get("6", "Locate Place")), array( "width" => 140 ) ); ?>
get("4", "Postal Code")); ?>: get("7", "Locate Code")), trim($oMLT->get("7", "Locate Code")), array( "width" => 140 ) ); ?>
get("5", "NTS Map Sheet")); ?>: get("8", "Locate NTS")), trim($oMLT->get("8", "Locate NTS")), array( "width" => 140 ) ); ?>
get("18", "Watershed")); ?>: get("19", "Locate Watershed")), trim($oMLT->get("20", "Locate Watershed by Code")), array( "width" => 140 ) ); ?>
 get("9", "Search Results")); ?>

get("10", "Below are the results of the search. Select one of the locations from the list to display on your map. It may be assigned a point on the map, and/or the map view can be adjusted to better view the selected location.")); ?>

oErrorManager->popLastError()) { echo "ERROR ".$oErr->nErrorType.": ".$oErr->szMessage.""; } ?>
 

get("12", "Set map view to better see this location.")); ?>
get("13", "Add a point to this location.")); ?>
get("Apply", "Apply")), trim($oCommonMLT->get("Apply", "Apply")), array( "width" => 100 ) ); ?>    get("Ok", "Ok")), trim($oCommonMLT->get("OkTip", "Apply and close")), array( "width" => 100 ) ); ?>    get("Cancel", "Cancel")), trim($oCommonMLT->get("CancelTip", "Close Dialog")), array( "width" => 100 ) ); ?>