|
|
|
@ -16,7 +16,12 @@ function addStandardTargetsToAliases(standard, aliases) {
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
// a list of all sources
|
|
|
|
|
var SOURCES = ['openstreetmap', 'openaddresses', 'geonames', 'whosonfirst']; |
|
|
|
|
var SOURCES = [ |
|
|
|
|
'openstreetmap', |
|
|
|
|
'openaddresses', |
|
|
|
|
'geonames', |
|
|
|
|
'geonames-mil', |
|
|
|
|
'whosonfirst']; |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
* A list of alternate names for sources, mostly used to save typing |
|
|
|
@ -25,6 +30,7 @@ var SOURCE_ALIASES = {
|
|
|
|
|
'osm': ['openstreetmap'], |
|
|
|
|
'oa': ['openaddresses'], |
|
|
|
|
'gn': ['geonames'], |
|
|
|
|
'gnm': ['geonames-mil'], |
|
|
|
|
'wof': ['whosonfirst'] |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
@ -44,14 +50,16 @@ var SOURCE_MAPPING = addStandardTargetsToAliases(SOURCES, SOURCE_ALIASES);
|
|
|
|
|
* not going to match any records and will return no results. |
|
|
|
|
*/ |
|
|
|
|
var LAYERS_BY_SOURCE = { |
|
|
|
|
openstreetmap: [ 'address', 'venue', 'street' ], |
|
|
|
|
openaddresses: [ 'address' ], |
|
|
|
|
geonames: [ 'country','macroregion', 'region', 'county','localadmin', |
|
|
|
|
'locality','borough', 'neighbourhood', 'venue' ], |
|
|
|
|
whosonfirst: [ 'continent', 'empire', 'country', 'dependency', 'macroregion', 'region', |
|
|
|
|
'locality', 'localadmin', 'macrocounty', 'county', 'macrohood', 'borough', |
|
|
|
|
'neighbourhood', 'microhood', 'disputed', 'venue', 'postalcode', |
|
|
|
|
'continent', 'ocean', 'marinearea'] |
|
|
|
|
openstreetmap: [ 'address', 'venue', 'street' ], |
|
|
|
|
openaddresses: [ 'address' ], |
|
|
|
|
geonames: [ 'country', 'macroregion', 'region', 'county','localadmin', |
|
|
|
|
'locality','borough', 'neighbourhood', 'venue' ], |
|
|
|
|
geonames-mil: [ 'country', 'macroregion', 'region', 'county','localadmin', |
|
|
|
|
'locality','borough', 'neighbourhood', 'venue' ], |
|
|
|
|
whosonfirst: [ 'continent', 'empire', 'country', 'dependency', 'macroregion', 'region', |
|
|
|
|
'locality', 'localadmin', 'macrocounty', 'county', 'macrohood', 'borough', |
|
|
|
|
'neighbourhood', 'microhood', 'disputed', 'venue', 'postalcode', |
|
|
|
|
'continent', 'ocean', 'marinearea'] |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|