location.nl.inc 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. // Netherlands
  3. function location_province_list_nl() {
  4. return array(
  5. 'DR' => "Drenthe",
  6. 'FL' => "Flevoland",
  7. 'FR' => "Friesland",
  8. 'GE' => "Gelderland",
  9. 'GR' => "Groningen",
  10. 'LI' => "Limburg",
  11. 'NB' => "Noord Brabant",
  12. 'NH' => "Noord Holland",
  13. 'OV' => "Overijssel",
  14. 'UT' => "Utrecht",
  15. 'ZE' => "Zeeland",
  16. 'ZH' => "Zuid Holland",
  17. );
  18. }
  19. function location_map_link_nl_providers() {
  20. return array(
  21. 'google' => array(
  22. 'name' => 'Google Maps',
  23. 'url' => 'http://maps.google.nl',
  24. 'tos' => 'http://www.google.nl/help/terms_maps.html',
  25. ),
  26. );
  27. }
  28. function location_map_link_nl_default_providers() {
  29. return array('google');
  30. }
  31. function location_map_link_nl_google($location = array()) {
  32. $query_params = array();
  33. foreach (array('street', 'city', 'postal_code', 'country') as $field) {
  34. if (isset($location[$field])) {
  35. $query_params[] = $location[$field];
  36. }
  37. }
  38. if (count($query_params)) {
  39. return ('http://maps.google.nl?q='. urlencode(implode(', ', $query_params)));
  40. }
  41. else {
  42. return NULL;
  43. }
  44. }
  45. /**
  46. * Returns minimum and maximum latitude and longitude needed to create a bounding box.
  47. */
  48. function location_bounds_nl() {
  49. return array(
  50. 'minlng' => 3.3026,
  51. 'minlat' => 50.711233,
  52. 'maxlng' => 7.14225,
  53. 'maxlat' => 53.539867,
  54. );
  55. }