Using the location (mapping) feature

Overview

  • The location feature provides a new content type – location – that will be displayed on a map view.
  • A location type vocabulary lets you add categories that can have an accompanying icon so that various types of locations can be graphically identified. Filters let users show only the categories they want to see.
  • Content administrators can add locations either by using an address or by directly adding a location on a map view.

Initial configuration

  • The first step is to determine what centerpoint and zoom level you would like on your site. This configuration can be found on the Configuration page under Regional and language. (admin/config/regional/debut-location)
  • Use the pan and zoom controls to set the map display you would like to show initially. This will also determine the initial map setting for inputting locations. For example, if you are a site based within a city-wide geographic area set the centerpoint and zoom so that just your city shows. This will make the items displayed have more relevance.

Add terms

  • Your next step should be to add some terms to the Location type vocabulary
  • Under Structure navigate to Taxonomy and then Location type (admin/structure/taxonomy/location_type).
  • Add a term giving it the name you want displayed, a description that will help content editors and an icon. A useful mapping icon set can be found at: http://mapicons.nicolasmollet.com/
  • Terms can be nested, so that you have categories and sub-categories. For example, a category of Agriculture could have sub-categories of Farm stand, U-pick and Vineyard. To do so, first add Agriculture as a term. Next add Farm stand as a new term, using the Relation to make Agriculture its parent term.
  • If you want to mass upload icons, you can add the Bulk Media Upload module.

Add locations

  • Add a new piece of content of the type Location (node/add/location).
  • Add the title of your location.
  • Fill in the address fields if needed/appropriate (some locations do not have an address and so you may not want to use.) The default country will be the country that is set for your site. If you select another country the correct fields will be displayed. So for example, if Canada is the chosen country, it will show Province as a field as well as Postal code.
  • If you want to map your location using the address, click the Find using address field button. Your location will appear on the map.
  • If you want to place your location on the map without using the address, you can place it directly on the map itself.
  • The icons in the top, right corner of the map determine what kind of item you are adding (polygon, point or line.) Note only a point will display with the selected icon.
  • For example, to select a point, zoom your map to an appropriate level to place your point exactly. Click on the pencil icon then click exactly where you want your point to be located.
  • Next select the location type (if you are using taxonomy based terms and icons).
  • Add a description or any other type of information into the body field.
  • Save your location.

Changing the menu label

  • By default the menu item displays “Locations.” To change this wording and customize, go to the main menu settings (admin/structure/menu/manage/main-menu) and edit the menu item Location, giving it the title and description you would like. Save your changes.

Using location region taxonomy to display multiple map displays

Newly developed functionality (Debut Location beta2 version, as of June 2013) allows for the creation of location regions that can be used to display particular regions. For example, in a community asset map you want to be able to show the whole city in the main view, but would also like to allow users to easily select their neighbourhood.

Add regions

  • Navigate to the Location region vocabulary (admin/structure/taxonomy/location_region), and select Add term.
  • Give your region a required name and an optional description.
  • To define the geographical extent of your region, use the polygon tool on the map to define your region’s boundaries, clicking to define each point in your polygon and double-clicking to complete.

Map displays

  • Once you have created a region, this will now over-ride the settings you have created for your main map display. This will now be defined as the sum total of all the regions.
  • The region maps can be accessed via their taxonomy term id, for example, location/3 (where 3 is the term id for the particular region.)
  • This makes it easy to add menu items for the regional maps, for example as child menu items under location.