In what library is the "inverseGeocoding" class?
You should refine your question and include exactly what library/geocoding service you are using so that people can investigate it properly. However, it sounds like it obviously does not meet your needs, but the Google webservice which I have linked to does.
The Google Geocoding documentation is available here:
http://code.google.com/apis/maps/documentation/geocoding/#ReverseGeocoding[
^]
The reverse geocoding API gives each separate part of the address as a named component, with a specific
type
. I believe the component type you are interested in is
locality
.
For example, a query for an address in Kensington:
http://maps.googleapis.com/maps/api/geocode/xml?latlng=51.4874,-0.1692&sensor=false[
^].
EDIT: just in case this is still unclear, look at the following XML snippet from the response above:
<address_component>
<long_name>London</long_name>
<short_name>London</short_name>
<type>locality</type>
<type>political</type>
</address_component>
You should locate this
address_component
element by checking for
type
=
locality
.