Subject: | Using multi-value parameters in Geo::GeoNames |
Date: | Fri, 14 Aug 2009 10:19:57 -0400 (EDT) |
To: | bug-Geo-GeoNames [...] rt.cpan.org |
From: | Mike Lieberman <codepoet [...] umiacs.umd.edu> |
Hello,
Thanks for creating this useful module. One feature that seems to be
missing is the ability to specify multiple values for certain parameters
when doing a search. For example, I often want to restrict the Geonames
search to only featureClass of "A" (admin. division) and "P" (populated
place), but the Geo::GeoNames interface does not provide such an option,
although the valid parameters have been annotated with which allow
multiple values (the "m" value in %valid_parameters).
I've modified GeoNames.pm slightly to allow multiple values by passing the
multi values as an array reference, where before only a scalar value was
allowed. For example, to do a search using "A" and "P" values for
featureClass:
$geo->search(q => "London, United Kingdom", featureClass => ["A", "P"]);
I've attached a patch adding the above to the interface, feel free to
use it as you wish.
Best,
Mike Lieberman
Message body is not shown because sender requested not to inline it.