Difference between revisions of "JReviews GeoMaps Add-on"
(→Tips & Tricks) |
(→Using multiple Google Maps API keys when using domain aliases) |
||
Line 57: | Line 57: | ||
<source lang="php"> | <source lang="php"> | ||
function beforeFilter() { | function beforeFilter() { | ||
− | |||
# Init Access | # Init Access | ||
− | |||
− | |||
if(isset($this->Access)){ | if(isset($this->Access)){ | ||
− | |||
− | |||
$this->Access->init($this->Config); | $this->Access->init($this->Config); | ||
} | } | ||
− | |||
− | |||
− | |||
# Load a different google maps key for every domain alias - Alejandro | # Load a different google maps key for every domain alias - Alejandro | ||
− | |||
switch($_SERVER['HTTP_HOST']) { | switch($_SERVER['HTTP_HOST']) { | ||
− | |||
− | |||
case 'www.domain-alias.com': | case 'www.domain-alias.com': | ||
$this->Config->{'geomaps.google_key'} = 'Google Maps API Key for the domain alias'; | $this->Config->{'geomaps.google_key'} = 'Google Maps API Key for the domain alias'; | ||
break; | break; | ||
− | |||
− | |||
} | } | ||
− | |||
</source> | </source> | ||
Revision as of 14:47, 17 February 2011
Documentation
Sales FAQ
How do I purchase GeoMaps Add-on if I already purchased JReviews
Read this article:
How do I install the Add-on? There's no download for it in the client area
The Add-on is installed directly from the JReviews administration. Please read the installation instructions in the manual:
I purchased the addon, but it still says "addon not active for this license"
Go to the JReviews admin license screen. Clear the local key text area and re-submit the license number. This will fetch a new local key that includes the addon information.
How can I test GeoMaps before purchasing?
GeoMaps addon can be seen and tested there on the demo site: http://demo.reviewsforjoomla.com
The Add-on is used in the New York City Guide:
Video Tutorials
Building a City Guide Website with JReviews
- Building a City Guide Website with JReviews (21:25 min.) - Learn how to create a Website for Restaurants, Hotels and other listing types for the City Guide
Using the GeoMaps Add-on in a City Guide Website
- Using the GeoMaps Add-on in a City Guide Website (11:51 min.) - This video continues on the "Building a City Guide Website with JReviews" video - you will learn how to install the Addon, configure it and how to geocode addresses.
Tips & Tricks
Displaying the Map inside a tab
Hiding map from certain sections or categories
You've successfully added GeoMaps to your site, but you also have certain categories, like news and blogs and others that don't require showing maps. Read the How to hide the map from certain categories to solve this problem.
Using multiple Google Maps API keys when using domain aliases
The add-on has a setting for only one API key. If you have alias domains pointed to your main site you will need one key per domain. The following hack will allow you to do that.
/components/com_jreviews/jreviews/controllers/my_controller.php
function beforeFilter() { # Init Access if(isset($this->Access)){ $this->Access->init($this->Config); } # Load a different google maps key for every domain alias - Alejandro switch($_SERVER['HTTP_HOST']) { case 'www.domain-alias.com': $this->Config->{'geomaps.google_key'} = 'Google Maps API Key for the domain alias'; break; }
Troubleshooting
Marker assignment via a custom field not working
The add-on allows you to use the images assigned to custom field options as markers. This is particularly useful if you've used a custom field for categorization. If the marker is not appearing on your maps you need to check a couple of things:
1. The field needs to be a single select or radio field because it's no possible to show more than one marker per listing.
2. The marker image needs to be placed in the add-on's icon folder. This means you will need to copy the image from the theme's theme_images folder to the icon folder where the add-on can find it.