blob: d0a5f47605f6c35b3466bb6d88d26bd5cca7a9bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package FixMyStreet::MapIt;
use FixMyStreet;
use mySociety::MaPit;
sub call {
my ($url, $params, %opts) = @_;
# 'area' always returns the ID you provide, no matter its generation, so no
# point in specifying it for that. 'areas' similarly if given IDs, but we
# might be looking up types or names, so might as well specify it then.
$opts{generation} = FixMyStreet->config('MAPIT_GENERATION')
if $url ne 'area' && FixMyStreet->config('MAPIT_GENERATION');
return mySociety::MaPit::call($url, $params, %opts);
}
1;
|