X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/9bdbbec0c8141bdcb22fb562b4e1235dadcc446c..80f7392fb1eff5c6b26e5f85b6873bb133576275:/lib/ClassTypes.php diff --git a/lib/ClassTypes.php b/lib/ClassTypes.php index d46847f1..60f18d95 100644 --- a/lib/ClassTypes.php +++ b/lib/ClassTypes.php @@ -6,6 +6,13 @@ function getInfo($aPlace) { $aClassType = getList(); + if ($aPlace['type'] == 'administrative' && isset($aPlace['place_type'])) { + $sName = 'place:'.$aPlace['place_type']; + if (isset($aClassType[$sName])) { + return $aClassType[$sName]; + } + } + if (isset($aPlace['admin_level'])) { $sName = $aPlace['class'].':'.$aPlace['type'].':'.$aPlace['admin_level']; if (isset($aClassType[$sName])) { @@ -72,12 +79,13 @@ function getList() 'boundary:administrative:1' => array('label' => 'Continent', 'frequency' => 0, 'icon' => 'poi_boundary_administrative', 'defdiameter' => 0.32), 'boundary:administrative:2' => array('label' => 'Country', 'frequency' => 0, 'icon' => 'poi_boundary_administrative', 'defdiameter' => 0.32), 'place:country' => array('label' => 'Country', 'frequency' => 0, 'icon' => 'poi_boundary_administrative', 'defzoom' => 6, 'defdiameter' => 15), - 'boundary:administrative:3' => array('label' => 'State', 'frequency' => 0, 'icon' => 'poi_boundary_administrative', 'defdiameter' => 0.32), + 'boundary:administrative:3' => array('label' => 'Region', 'frequency' => 0, 'icon' => 'poi_boundary_administrative', 'defdiameter' => 0.32), 'boundary:administrative:4' => array('label' => 'State', 'frequency' => 0, 'icon' => 'poi_boundary_administrative', 'defdiameter' => 0.32), 'place:state' => array('label' => 'State', 'frequency' => 0, 'icon' => 'poi_boundary_administrative', 'defzoom' => 8, 'defdiameter' => 5.12), + 'place:province' => array('label' => 'Province', 'frequency' => 0, 'icon' => 'poi_boundary_administrative', 'defzoom' => 8, 'defdiameter' => 5.12), 'boundary:administrative:5' => array('label' => 'State District', 'frequency' => 0, 'icon' => 'poi_boundary_administrative', 'defdiameter' => 0.32), 'boundary:administrative:6' => array('label' => 'County', 'frequency' => 0, 'icon' => 'poi_boundary_administrative', 'defdiameter' => 0.32), - 'boundary:administrative:7' => array('label' => 'County', 'frequency' => 0, 'icon' => 'poi_boundary_administrative', 'defdiameter' => 0.32), + 'boundary:administrative:7' => array('label' => 'Municipality', 'frequency' => 0, 'icon' => 'poi_boundary_administrative', 'defdiameter' => 0.32), 'place:county' => array('label' => 'County', 'frequency' => 108, 'icon' => 'poi_boundary_administrative', 'defzoom' => 10, 'defdiameter' => 1.28), 'boundary:administrative:8' => array('label' => 'City', 'frequency' => 0, 'icon' => 'poi_boundary_administrative', 'defdiameter' => 0.32), 'place:city' => array('label' => 'City', 'frequency' => 66, 'icon' => 'poi_place_city', 'defzoom' => 12, 'defdiameter' => 0.32),