You are here

readme.txt in Address Field Static Map 7

After installing the Address Field Static Map, it needs to be configured.

First, add a new Address Field to an existing or a new content type. A content
type may have several address fields - "Physical Address", "Mailing Address",
and "Owner's Address" for example. In this readme, we'll use a single address
field named "Physical Address".

Next, tell Address Field Static Map to use your address field. Go to
Admin/Configuration/System/Address Field Static Map Block. In the box labeled
"Address Field" choose the name of your address field. On this screen, you'll
also want to enter your Google Maps API key and tweak other settings.  Click
Save Configuration at the bottom of the page.

Third, you need to tell Drupal where to put the map. There are two ways to do
this.

First, you could go to Admin/Structure/Blocks and place the provided block in
your page layout. The Address Field Static Map will initially be at the
bottom under "Disabled". Move it to your desired region and order within that
region and then click "Save Blocks" at the bottom of the page.

Alternatively, you could simply modify the display settings in the content
type, choosing the 'Address Field Static Map' formatter and configuring it there.

You will probably have to experiment with the map size and the position a few
times to get it how you want it.

Beginning with version 1.8, you can size maps using CSS. To do this, configure
one of your map types at admin/config/system/addressfield_staticmap
to use a Regular Google Map with fallback to the static maps API. Pick this
type when configuring your field formatter and ensure the map size field is
empty. When this is done, the formatter summary will say:

  Map size: Styled using CSS

You can then add CSS to style your map as desired. This has been tested using
a viewport width & height, and using percentage heights (this required setting
heights on parent divs too).

File

readme.txt
View source
  1. After installing the Address Field Static Map, it needs to be configured.
  2. First, add a new Address Field to an existing or a new content type. A content
  3. type may have several address fields - "Physical Address", "Mailing Address",
  4. and "Owner's Address" for example. In this readme, we'll use a single address
  5. field named "Physical Address".
  6. Next, tell Address Field Static Map to use your address field. Go to
  7. Admin/Configuration/System/Address Field Static Map Block. In the box labeled
  8. "Address Field" choose the name of your address field. On this screen, you'll
  9. also want to enter your Google Maps API key and tweak other settings. Click
  10. Save Configuration at the bottom of the page.
  11. Third, you need to tell Drupal where to put the map. There are two ways to do
  12. this.
  13. First, you could go to Admin/Structure/Blocks and place the provided block in
  14. your page layout. The Address Field Static Map will initially be at the
  15. bottom under "Disabled". Move it to your desired region and order within that
  16. region and then click "Save Blocks" at the bottom of the page.
  17. Alternatively, you could simply modify the display settings in the content
  18. type, choosing the 'Address Field Static Map' formatter and configuring it there.
  19. You will probably have to experiment with the map size and the position a few
  20. times to get it how you want it.
  21. Beginning with version 1.8, you can size maps using CSS. To do this, configure
  22. one of your map types at admin/config/system/addressfield_staticmap
  23. to use a Regular Google Map with fallback to the static maps API. Pick this
  24. type when configuring your field formatter and ensure the map size field is
  25. empty. When this is done, the formatter summary will say:
  26. Map size: Styled using CSS
  27. You can then add CSS to style your map as desired. This has been tested using
  28. a viewport width & height, and using percentage heights (this required setting
  29. heights on parent divs too).