You are here

README.txt in Leaflet More Maps 7

INSTALLATION
============
Before you enable the Leaflet More Maps module, you need to download and enable
the Leaflet module and the Libraries module.

Then download the Leaflet javascript library from
http://leafletjs.com/download.html.
Drop the unzipped folder in sites/all/libraries and rename it to leaflet, so
that the path to the essential javascript file becomes:
sites/all/libraries/leaflet/leaflet.js

If all's ok, you won't see any errors in the Status Report admin/reports/status.

After this all you have to do is enable Leaflet More Maps to enhance your
mapping experience with lots of attractive map options.

You select your favorite map when you format a single field (eg Geofield) as a
map or when you format a View (of multiple nodes or users) as a map. The module
"IP Geolocation Views and Maps" is particularly good for this.

You can assemble your own map from the available layers at the Leaflet More Maps
configuration page: admin/config/system/leaflet_more_maps. A layer switcher will
automatically appear in the upper right-hand corner.

The included submodule Leaflet Demo introduces a block that you can enable on a
page to showcase all maps available, centered on your current location, or any
other location for which you specify lat/long coordinates.
Not all maps are available at all coordinates and zoom levels.
All maps show at lat=31, long=-89, zoom=4


FOR PROGRAMMERS
===============
You can add your own map by implementing hook_leaflet_map_info(). See
leaflet_leaflet_map_info() in leaflet.module for an example. Or check out the
Catalonian map with 3 layers defined in leaflet_catalunya_leaflet_map_info(),
file leaflet_more_maps.api.php.

You can alter the default settings of any Leaflet More Maps map on your system
by implementing hook_leaflet_map_info_alter().
In this example snippet the default zoom of all maps is set to 2:

  function MYMODULE_leaflet_map_info_alter(&$map_info) {
    foreach ($map_info as $map_id => $info) {
      $map_info[$map_id]['settings']['zoom'] = 2;
      $map_info[$map_id]['label'] += ' ' . t('default zoom=2');
    }
  }


References and licensing terms:

o http://leaflet.cloudmade.com
o http://www.openstreetmap.org/copyright
o http://mapbox.com/tos
o http://maps.stamen.com/#watercolor/12/37.7706/-122.3782
o http://thunderforest.com
o http://www.esri.com
o http://mapquest.com
o http://www.google.com/intl/en_au/help/terms_maps.html
o http://legal.yandex.ru/maps_termsofuse
o http://www.microsoft.com/maps/product/terms.html

File

README.txt
View source
  1. INSTALLATION
  2. ============
  3. Before you enable the Leaflet More Maps module, you need to download and enable
  4. the Leaflet module and the Libraries module.
  5. Then download the Leaflet javascript library from
  6. http://leafletjs.com/download.html.
  7. Drop the unzipped folder in sites/all/libraries and rename it to leaflet, so
  8. that the path to the essential javascript file becomes:
  9. sites/all/libraries/leaflet/leaflet.js
  10. If all's ok, you won't see any errors in the Status Report admin/reports/status.
  11. After this all you have to do is enable Leaflet More Maps to enhance your
  12. mapping experience with lots of attractive map options.
  13. You select your favorite map when you format a single field (eg Geofield) as a
  14. map or when you format a View (of multiple nodes or users) as a map. The module
  15. "IP Geolocation Views and Maps" is particularly good for this.
  16. You can assemble your own map from the available layers at the Leaflet More Maps
  17. configuration page: admin/config/system/leaflet_more_maps. A layer switcher will
  18. automatically appear in the upper right-hand corner.
  19. The included submodule Leaflet Demo introduces a block that you can enable on a
  20. page to showcase all maps available, centered on your current location, or any
  21. other location for which you specify lat/long coordinates.
  22. Not all maps are available at all coordinates and zoom levels.
  23. All maps show at lat=31, long=-89, zoom=4
  24. FOR PROGRAMMERS
  25. ===============
  26. You can add your own map by implementing hook_leaflet_map_info(). See
  27. leaflet_leaflet_map_info() in leaflet.module for an example. Or check out the
  28. Catalonian map with 3 layers defined in leaflet_catalunya_leaflet_map_info(),
  29. file leaflet_more_maps.api.php.
  30. You can alter the default settings of any Leaflet More Maps map on your system
  31. by implementing hook_leaflet_map_info_alter().
  32. In this example snippet the default zoom of all maps is set to 2:
  33. function MYMODULE_leaflet_map_info_alter(&$map_info) {
  34. foreach ($map_info as $map_id => $info) {
  35. $map_info[$map_id]['settings']['zoom'] = 2;
  36. $map_info[$map_id]['label'] += ' ' . t('default zoom=2');
  37. }
  38. }
  39. References and licensing terms:
  40. o http://leaflet.cloudmade.com
  41. o http://www.openstreetmap.org/copyright
  42. o http://mapbox.com/tos
  43. o http://maps.stamen.com/#watercolor/12/37.7706/-122.3782
  44. o http://thunderforest.com
  45. o http://www.esri.com
  46. o http://mapquest.com
  47. o http://www.google.com/intl/en_au/help/terms_maps.html
  48. o http://legal.yandex.ru/maps_termsofuse
  49. o http://www.microsoft.com/maps/product/terms.html