How To Add Google Maps To Your Review Site
« Review Foundry User Manual
Tutorial Table Of Contents
Obtain Review Foundry »
All Template Toolkit templates that deal with Google Maps are have a common file naming format. They start with the prefix gmaps_ and can be found with all the other templates used to create public pages.
The templates that you are most likely to want to edit are the ones that determine what information from a thing record should appear in the popup window that appears when the visitor runs their mouse over a location marker. These are the "tooltip" templates, since Google refers to this popup element as a tooltip:
gmaps_tooltip_item.ttml gmaps_tooltip_member.ttml gmaps_tooltip_supplier.ttml
In addition to the formatting for a thumnailed image, you might find a table row that contains something like the following:
[% comma = '' %] [% newline = '' %] [%- IF supplier.contact_phone %][% comma = ', ' %][% newline %][% newline = '
This is very straightforward. All the code does is check for the existence of a few fields, and, if found, a separate line is added to the table cell to display that piece of information. You would use something similar in the tooltip template for the Item or Member table.
If you can restrict your editing of the Google Maps templates to the few lines in the relevant table row shown above, you will be doing yourself a big favor. Ambitious editing is likely only to cause you a good deal of headaches when your Google Map mysteriously disappears.
[%- html = html FILTER replace("\n\r?","'\n+'") -%]
When a Google Map is created which shows a number of different locations, the size of the geographic window displayed needs to be automatically determined. For example, if you are viewing a page of search results, or a category listing, where there are going to be several matching locations displayed, the size of the window is preselected. This selected size might not suit you. By default the boundaries of the window are such that all locations fall within the window. However, no account is made of how close the locations may come to the window boundaries. Location markers may not fit entirely within the window. Because of this, the zoom factor that Google selects is reduced by one more factor withing Review Foundry, so that markers always fall within the window. If you do not want this zoom reduction to take place, toggle the following configuration variable to the Yes state:
Copyright © 2004 Random Mouse Software. All Rights Reserved.