update place type taxonomy

This commit is contained in:
rolux 2011-06-01 12:48:11 +02:00
parent 357968c4b1
commit 94f34a8d0e
2 changed files with 11 additions and 13 deletions

View file

@ -431,10 +431,9 @@ Ox.ListMap = function(options, self) {
{id: 'region', title: 'Region'},
{id: 'city', title: 'City'},
{id: 'borough', title: 'Borough'},
{id: 'street', title: 'Street'},
{id: 'premise', title: 'Premise'},
{id: 'feature', title: 'Feature'},
{id: 'other', title: 'Other'}
{id: 'street', title: 'Street'}, // streets, squares, bridges, tunnels, ...
{id: 'building', title: 'Building'},
{id: 'feature', title: 'Feature'} // continents, islands, rivers, lakes, seas, oceans, ...
],
label: 'Type',
labelWidth: 64,

View file

@ -892,20 +892,19 @@ Ox.Map = function(options, self) {
// see http://code.google.com/apis/maps/documentation/javascript/services.html#GeocodingAddressTypes
var strings = {
'country': ['country'],
'region': ['administrative_area'],
'region': ['administrative_area', 'colloqual_area'],
'city': ['locality'],
'borough': ['neighborhood', 'sublocality'],
'borough': ['neighborhood', 'postal_code', 'sublocality'],
'street': [
'intersection', 'route',
'street_address', 'street_number'
],
'premise': [
'airport', 'establishment', 'park',
'premise', 'subpremise'
],
'feature': ['natural_feature']
'building': [
'airport', 'establishment', 'floor',
'premise', 'room', 'subpremise'
]
},
type = 'other';
type = 'feature';
Ox.forEach(strings, function(values, key) {
Ox.forEach(values, function(value) {
if (find(value)) {
@ -913,7 +912,7 @@ Ox.Map = function(options, self) {
return false;
}
});
return type == 'other';
return type == 'feature';
});
return type;
function find(type) {