diff --git a/config/vufind/WorldCat.ini b/config/vufind/WorldCat.ini index d78e36b365bc9b322dea05aeed06e5b5fda7b079..e3b303c0d35bb7a6d017834c4da7e71449a093a3 100644 --- a/config/vufind/WorldCat.ini +++ b/config/vufind/WorldCat.ini @@ -73,6 +73,10 @@ view=full ; This section contains additional settings to pass to the WorldCat connector ; code. [Connector] +; Set this to the latitude,longitude position of your library to ensure that +; custom holding locations are retrieved from your region first. +;latLon = "40.0373881,-75.3442107" + ; When looking up holdings at other libraries, should we retrieve holdings for ; any record matching the FRBR group (true) or only for exact matches (false)? ;useFrbrGroupingForHoldings = false \ No newline at end of file diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat/Connector.php b/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat/Connector.php index 056dfe3f8debca9b77899b68d051890eb8656f40..b280d16b41c4edfd8575ff55ed15f48b0ab77b9e 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat/Connector.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat/Connector.php @@ -89,6 +89,10 @@ class Connector extends \VuFindSearch\Backend\SRU\Connector } $uri = "http://www.worldcat.org/webservices/catalog/content/libraries/{$id}" . "?wskey={$this->wskey}&servicelevel=full&frbrGrouping=$grouping"; + if (isset($this->options['latLon'])) { + list($lat, $lon) = explode(',', $this->options['latLon']); + $uri .= '&lat=' . urlencode($lat) . '&lon=' . urlencode($lon); + } $this->client->setUri($uri); $this->debug('Connect: ' . $uri); $result = $this->client->setMethod('POST')->send();