location.gb.inc 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. <?php
  2. // Great Britain
  3. function location_province_list_gb() {
  4. return array(
  5. 'GSY' => "Guernsey",
  6. 'JSY' => "Jersey",
  7. 'BDG' => "Barking and Dagenham",
  8. 'BNE' => "Barnet",
  9. 'BNS' => "Barnsley",
  10. 'BAS' => "Bath and North East Somerset",
  11. 'BDF' => "Bedfordshire",
  12. 'BEX' => "Bexley",
  13. 'BIR' => "Birmingham",
  14. 'BBD' => "Blackburn with Darwen",
  15. 'BPL' => "Blackpool",
  16. 'BOL' => "Bolton",
  17. 'BMH' => "Bournemouth",
  18. 'BRC' => "Bracknell Forest",
  19. 'BRD' => "Bradford",
  20. 'BEN' => "Brent",
  21. 'BNH' => "Brighton and Hove",
  22. 'BST' => "Bristol City of",
  23. 'BRY' => "Bromley",
  24. 'BKM' => "Buckinghamshire",
  25. 'BUR' => "Bury",
  26. 'CLD' => "Calderdale",
  27. 'CAM' => "Cambridgeshire",
  28. 'CMD' => "Camden",
  29. 'CHS' => "Cheshire",
  30. 'CON' => "Cornwall",
  31. 'COV' => "Coventry (West Midlands district)",
  32. 'CRY' => "Croydon",
  33. 'CMA' => "Cumbria",
  34. 'DAL' => "Darlington",
  35. 'DER' => "Derby",
  36. 'DBY' => "Derbyshire",
  37. 'DEV' => "Devon",
  38. 'DNC' => "Doncaster",
  39. 'DOR' => "Dorset",
  40. 'DUD' => "Dudley (West Midlands district)",
  41. 'DUR' => "Durham",
  42. 'EAL' => "Ealing",
  43. 'ERY' => "East Riding of Yorkshire",
  44. 'ESX' => "East Sussex",
  45. 'ENF' => "Enfield",
  46. 'ESS' => "Essex",
  47. 'GAT' => "Gateshead (Tyne & Wear district)",
  48. 'GLS' => "Gloucestershire",
  49. 'GRE' => "Greenwich",
  50. 'HCK' => "Hackney",
  51. 'HAL' => "Halton",
  52. 'HMF' => "Hammersmith and Fulham",
  53. 'HAM' => "Hampshire",
  54. 'HRY' => "Haringey",
  55. 'HRW' => "Harrow",
  56. 'HPL' => "Hartlepool",
  57. 'HAV' => "Havering",
  58. 'HEF' => "Herefordshire County of",
  59. 'HRT' => "Hertfordshire",
  60. 'HIL' => "Hillingdon",
  61. 'HNS' => "Hounslow",
  62. 'IOW' => "Isle of Wight",
  63. 'IOS' => "Isles of Scilly",
  64. 'ISL' => "Islington",
  65. 'KEC' => "Kensington and Chelsea",
  66. 'KEN' => "Kent",
  67. 'KHL' => "Kingston upon Hull City of",
  68. 'KTT' => "Kingston upon Thames",
  69. 'KIR' => "Kirklees",
  70. 'KWL' => "Knowsley",
  71. 'LBH' => "Lambeth",
  72. 'LAN' => "Lancashire",
  73. 'LDS' => "Leeds",
  74. 'LCE' => "Leicester",
  75. 'LEC' => "Leicestershire",
  76. 'LEW' => "Lewisham",
  77. 'LIN' => "Lincolnshire",
  78. 'LIV' => "Liverpool",
  79. 'LND' => "London City of",
  80. 'LUT' => "Luton",
  81. 'MAN' => "Manchester",
  82. 'MDW' => "Medway",
  83. 'MRT' => "Merton",
  84. 'MDB' => "Middlesbrough",
  85. 'MIK' => "Milton Keynes",
  86. 'NET' => "Newcastle upon Tyne",
  87. 'NWM' => "Newham",
  88. 'NFK' => "Norfolk",
  89. 'NEL' => "North East Lincolnshire",
  90. 'NLN' => "North Lincolnshire",
  91. 'NSM' => "North Somerset",
  92. 'NTY' => "North Tyneside",
  93. 'NYK' => "North Yorkshire",
  94. 'NTH' => "Northamptonshire",
  95. 'NBL' => "Northumberland",
  96. 'NGM' => "Nottingham",
  97. 'NTT' => "Nottinghamshire",
  98. 'OLD' => "Oldham",
  99. 'OXF' => "Oxfordshire",
  100. 'PTE' => "Peterborough",
  101. 'PLY' => "Plymouth",
  102. 'POL' => "Poole",
  103. 'POR' => "Portsmouth",
  104. 'RDG' => "Reading",
  105. 'RDB' => "Redbridge",
  106. 'RCC' => "Redcar and Cleveland",
  107. 'RIC' => "Richmond upon Thames",
  108. 'RCH' => "Rochdale",
  109. 'ROT' => "Rotherham",
  110. 'RUT' => "Rutland",
  111. 'SHN' => "St Helens",
  112. 'SLF' => "Salford",
  113. 'SAW' => "Sandwell",
  114. 'SFT' => "Sefton",
  115. 'SHF' => "Sheffield",
  116. 'SHR' => "Shropshire",
  117. 'SLG' => "Slough",
  118. 'SOL' => "Solihull",
  119. 'SOM' => "Somerset",
  120. 'SGC' => "South Gloucestershire",
  121. 'STY' => "South Tyneside",
  122. 'STH' => "Southampton",
  123. 'SOS' => "Southend-on-Sea",
  124. 'SWK' => "Southwark",
  125. 'STS' => "Staffordshire",
  126. 'SKP' => "Stockport",
  127. 'STT' => "Stockton-on-Tees",
  128. 'STE' => "Stoke-on-Trent",
  129. 'SFK' => "Suffolk",
  130. 'SND' => "Sunderland",
  131. 'SRY' => "Surrey",
  132. 'STN' => "Sutton",
  133. 'SWD' => "Swindon",
  134. 'TAM' => "Tameside",
  135. 'TFW' => "Telford and Wrekin",
  136. 'THR' => "Thurrock",
  137. 'TOB' => "Torbay",
  138. 'TWH' => "Tower Hamlets",
  139. 'TRF' => "Trafford",
  140. 'WKF' => "Wakefield",
  141. 'WLL' => "Walsall",
  142. 'WFT' => "Waltham Forest",
  143. 'WND' => "Wandsworth",
  144. 'WRT' => "Warrington",
  145. 'WAR' => "Warwickshire",
  146. 'WBK' => "West Berkshire",
  147. 'WSX' => "West Sussex",
  148. 'WSM' => "Westminster",
  149. 'WGN' => "Wigan",
  150. 'WIL' => "Wiltshire",
  151. 'WNM' => "Windsor and Maidenhead",
  152. 'WRL' => "Wirral",
  153. 'WOK' => "Wokingham",
  154. 'WLV' => "Wolverhampton",
  155. 'WOR' => "Worcestershire",
  156. 'YOR' => "York",
  157. 'ANT' => "Antrim",
  158. 'ARD' => "Ards",
  159. 'ARM' => "Armagh",
  160. 'BLA' => "Ballymena",
  161. 'BLY' => "Ballymoney",
  162. 'BNB' => "Banbridge",
  163. 'BFS' => "Belfast",
  164. 'CKF' => "Carrickfergus",
  165. 'CSR' => "Castlereagh",
  166. 'CLR' => "Coleraine",
  167. 'CKT' => "Cookstown",
  168. 'CGV' => "Craigavon",
  169. 'DRY' => "Derry",
  170. 'DOW' => "Down",
  171. 'DGN' => "Dungannon and South Tyrone",
  172. 'FER' => "Fermanagh",
  173. 'LRN' => "Larne",
  174. 'LMV' => "Limavady",
  175. 'LSB' => "Lisburn",
  176. 'MFT' => "Magherafelt",
  177. 'MYL' => "Moyle",
  178. 'NYM' => "Newry and Mourne",
  179. 'NTA' => "Newtownabbey",
  180. 'NDN' => "North Down",
  181. 'OMH' => "Omagh",
  182. 'STB' => "Strabane",
  183. 'ABE' => "Aberdeen",
  184. 'ABD' => "Aberdeenshire",
  185. 'ANS' => "Angus",
  186. 'AGB' => "Argyll and Bute",
  187. 'CLK' => "Clackmannanshire",
  188. 'DGY' => "Dumfries and Galloway",
  189. 'DND' => "Dundee",
  190. 'EAY' => "East Ayrshire",
  191. 'EDU' => "East Dunbartonshire",
  192. 'ELN' => "East Lothian",
  193. 'ERW' => "East Renfrewshire",
  194. 'EDH' => "Edinburgh",
  195. 'ELS' => "Eilean Siar",
  196. 'FAL' => "Falkirk",
  197. 'FIF' => "Fife",
  198. 'GLG' => "Glasgow",
  199. 'HLD' => "Highland",
  200. 'IVC' => "Inverclyde",
  201. 'NAY' => "North Ayrshire",
  202. 'NLK' => "North Lanarkshire",
  203. 'ORK' => "Orkney Islands",
  204. 'PKN' => "Perth and Kinross",
  205. 'MLN' => "Midlothian",
  206. 'MRY' => "Moray",
  207. 'RFW' => "Renfrewshire",
  208. 'SCB' => "Scottish Borders The",
  209. 'ZET' => "Shetland Islands",
  210. 'SAY' => "South Ayrshire",
  211. 'SLK' => "South Lanarkshire",
  212. 'STG' => "Stirling",
  213. 'WDU' => "West Dunbartonshire",
  214. 'WLN' => "West Lothian",
  215. 'BGW' => "Blaenau Gwent",
  216. 'BGE' => "Bridgend",
  217. 'CAY' => "Caerphilly",
  218. 'CRF' => "Cardiff",
  219. 'CMN' => "Carmarthenshire",
  220. 'CGN' => "Ceredigion",
  221. 'CWY' => "Conwy",
  222. 'DEN' => "Denbighshire",
  223. 'FLN' => "Flintshire",
  224. 'GWN' => "Gwynedd",
  225. 'AGY' => "Isle of Anglesey",
  226. 'MTY' => "Merthyr Tydfil",
  227. 'MON' => "Monmouthshire",
  228. 'NTL' => "Neath Port Talbot",
  229. 'NWP' => "Newport",
  230. 'PEM' => "Pembrokeshire",
  231. 'POW' => "Powys",
  232. 'RCT' => "Rhondda Cynon Taf",
  233. 'SWA' => "Swansea",
  234. 'TOF' => "Torfaen",
  235. 'VGL' => "Vale of Glamorgan",
  236. 'WRX' => "Wrexham",
  237. );
  238. }
  239. function location_map_link_gb_providers() {
  240. return array(
  241. 'google' => array(
  242. 'name' => 'Google Maps',
  243. 'url' => 'http://maps.google.co.uk',
  244. 'tos' => 'http://www.google.co.uk/help/terms_maps.html',
  245. ),
  246. );
  247. }
  248. function location_map_link_gb_default_providers() {
  249. return array('google');
  250. }
  251. function location_map_link_gb_google($location = array()) {
  252. $query_params = array();
  253. foreach (array('street', 'city', 'postal_code', 'country') as $field) {
  254. if (isset($location[$field])) {
  255. $query_params[] = $location[$field];
  256. }
  257. }
  258. if (count($query_params)) {
  259. return ('http://maps.google.co.uk?q='. urlencode(implode(', ', $query_params)));
  260. }
  261. else {
  262. return NULL;
  263. }
  264. }
  265. /**
  266. * Returns minimum and maximum latitude and longitude needed to create a bounding box.
  267. */
  268. function location_bounds_gb() {
  269. // NaturalEarth 10m Admin 0 - Countries (v1.3.0)
  270. // EPSG:900913
  271. // From ISO code GB.
  272. return array(
  273. 'minlng' => -13.691355,
  274. 'minlat' => 49.9096161,
  275. 'maxlng' => 1.77170536,
  276. 'maxlat' => 60.8475532,
  277. );
  278. }