diff options
author | Matthew Somerville <matthew@mysociety.org> | 2019-09-19 20:27:46 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2019-09-19 20:27:46 +0100 |
commit | 9d12ecc52d5a3413b12d3781349e228026e79f5e (patch) | |
tree | b3fdabfa42cf0c7264f5ecb29ccb6a8637fb0107 /perllib/FixMyStreet/Geocode/Bing.pm | |
parent | 645c0663c4c7ce2d2d240858ed06446efe8ad328 (diff) | |
parent | fa879675558632ae54b32a10707397a01edc362d (diff) |
Merge branch 'bexley-map-tiles'
Diffstat (limited to 'perllib/FixMyStreet/Geocode/Bing.pm')
-rw-r--r-- | perllib/FixMyStreet/Geocode/Bing.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Geocode/Bing.pm b/perllib/FixMyStreet/Geocode/Bing.pm index 9e425441a..ee5e15f8c 100644 --- a/perllib/FixMyStreet/Geocode/Bing.pm +++ b/perllib/FixMyStreet/Geocode/Bing.pm @@ -11,13 +11,19 @@ use strict; use FixMyStreet::Geocode; use Utils; +sub setup { + my $cls = shift; + return 1 if FixMyStreet->config('BING_MAPS_API_KEY'); + return 0; +} + # string STRING CONTEXT # Looks up on Bing Maps API, and caches, a user-inputted location. # Returns array of (LAT, LON, ERROR), where ERROR is either undef, a string, or # an array of matches if there are more than one. The information in the query # may be used to disambiguate the location in cobranded versions of the site. sub string { - my ( $s, $c ) = @_; + my ( $cls, $s, $c ) = @_; my $params = $c->cobrand->disambiguate_location($s); # Allow cobrand to fixup the user input |