J and Beyond 2013 | An International Joomla! Conference - May 31st - 2nd, 2013, Noordwijkerhout, The Netherlands
It is currently Sun May 19, 2013 5:42 am

Google Map not showing on frontend

Forum for JEvents 3.0 for Joomla 3.0 and 2.5.

Re: Google Map not showing on frontend

Postby Fredie » Tue Feb 19, 2013 4:52 pm

Yes, I've configured Locations and the map shows on the backend when I enter an event. I'm attaching a copy of the Locations Configuration, in case I don't have it correctly done.
locationsMapConfig130219.jpg
locationsMapConfig130219.jpg (94.08 KiB) Viewed 139 times
Fredie
Gold Members
Posts: 147
Joined: Fri Jan 04, 2013 4:41 pm

Re: Google Map not showing on frontend

Postby carcam » Wed Feb 20, 2013 7:08 am

It seems ok to me, but for latest Google maps versions you do not need to provide an API key if you are not in heavy traffic and using a "payed" version of the API. Is this your case? Otherwise, can you please try getting rid of the API key?
carcam
Contributor
Posts: 3391
Joined: Wed Aug 06, 2008 7:50 pm
Location: Córdoba

Re: Google Map not showing on frontend

Postby Geraint » Wed Feb 20, 2013 11:04 am

Hi Fredie

I found the problem - the managed locations code is using a script call to load the google javascript that worked in Joomla 2.5 but not in Joomla 3.0

I'll upload a new release the managed locations addon in a few minutes - it will be version 3.0.3
------------
JEvents club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits.

Join the JEvents club today!
User avatar
Geraint
Posts: 30507
Joined: Fri Feb 15, 2008 6:14 pm

Re: Google Map not showing on frontend

Postby Fredie » Thu Feb 21, 2013 1:40 am

Still no map on the frontend. I uninstalled locations 3.0.1 then installed the 3.0.3 version, but can't see any changes. I get the same, google is not defined error, and when I do a site search for 'maps.googleapis.com' it's only found in 'administrator\components\com_jevlocations\config.xml' and 'administrator\components\com_jevpeople\config.xml'.
Fredie
Gold Members
Posts: 147
Joined: Fri Jan 04, 2013 4:41 pm

Re: Google Map not showing on frontend

Postby Geraint » Thu Feb 21, 2013 1:58 pm

the config.xml file set the config options for the component which you hav set to maps.googleapis.com in your screenshot earlier.

In the location plugin file plugins/jevents/jevlocations/jevlocations.php at line 664 we get the API Url from the config and then load it a few lines later. This is in the event detail page.

Can you try this experiment - first of all make sure lines 666-673 of this file look like
Code: Select all
            if ($googlekey != "")
            {
               JHTML::script( $googleurl. '/maps/api/js?key=' . $googlekey . "&sensor=false", true);
            }
            else
            {
               JHTML::script( $googleurl. '/maps/api/js?sensor=false&region='.$gregion, true);
            }

if the do not then it looks as though the upgrade didn't work on your site. If that is how it looks then change it temporarily to
Code: Select all
            if ($googlekey != "")
            {
               JHTML::script( $googleurl. '/maps/api/js?key=' . $googlekey . "&sensor=false", true);
               echo $googleurl. '/maps/api/js?key=' . $googlekey . "&sensor=false";
            }
            else
            {
               JHTML::script( $googleurl. '/maps/api/js?sensor=false&region='.$gregion, true);
               echo $googleurl. '/maps/api/js?sensor=false&region='.$gregion;
            }
            exit();

the view the event detail page - it should now output the URL it is loading the javascript from - it that is ok then try the map under the locations list by changing components/com_jevlocations/views/locations/tmpl/locations_map.php and replace lines 13-20 with
Code: Select all
if ($googlekey != "")
{
   JHTML::script($googleurl. '/maps/api/js?key=' . $googlekey."&sensor=false".'&hl='.$hl, true);
   echo $googleurl. '/maps/api/js?key=' . $googlekey."&sensor=false".'&hl='.$hl;
}
else {
   JHTML::script($googleurl. '/maps/api/js?sensor=false'.'&hl='.$hl,  true);
   echo $googleurl. '/maps/api/js?sensor=false'.'&hl='.$hl;
}
exit();
------------
JEvents club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits.

Join the JEvents club today!
User avatar
Geraint
Posts: 30507
Joined: Fri Feb 15, 2008 6:14 pm

Re: Google Map not showing on frontend

Postby Fredie » Thu Feb 21, 2013 9:25 pm

Thank you. I have it working now. After reading your last response, I realized that I hadn't been checking the event detail dispay. I was only cheking the backend and the default year / month listings. To be sure that I was on track with your response, I removed and re-installed locations ver 3.0.3. With it installed I was able to see the map on the backend and on the detail page, but not for the default year or month listing. To get them to work, I modified the template override to use the last code that you send (less the echo and exit). The only issue that I seem to have now is with the zoom control on the map. It's seems to be there but is distorted. I've attached a screen shot to illustrate.
mapDistorted-Zoom-Control-130221.jpg
mapDistorted-Zoom-Control-130221.jpg (63.38 KiB) Viewed 133 times
Fredie
Gold Members
Posts: 147
Joined: Fri Jan 04, 2013 4:41 pm

Re: Google Map not showing on frontend

Postby Geraint » Fri Feb 22, 2013 8:49 am

Are you using the Map layout (http://www.jevents.net/products/club-layoutsthemes) is have the code already built in so there is no need for a template override.
------------
JEvents club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits.

Join the JEvents club today!
User avatar
Geraint
Posts: 30507
Joined: Fri Feb 15, 2008 6:14 pm

Re: Google Map not showing on frontend

Postby Fredie » Tue Feb 26, 2013 2:46 pm

The MAP Layout View doesn't work for me. When I select MAP in the JEvents configuration Choose layout view option, all that I can get on the frontend is an Error 500, Layout calendar not found.
Fredie
Gold Members
Posts: 147
Joined: Fri Jan 04, 2013 4:41 pm

Re: Google Map not showing on frontend

Postby Geraint » Wed Feb 27, 2013 10:20 am

that sounds as though the installation of the map layout didn't work properly

What version of Joomla/JEvents do you have and what version of the map layout are you installing?

Then please check the content of the folder components/com_jevents/views/map/month/tmpl/? What is there?
------------
JEvents club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits.

Join the JEvents club today!
User avatar
Geraint
Posts: 30507
Joined: Fri Feb 15, 2008 6:14 pm

Previous

Return to JEvents 3.0 (Free Access)

Who is online

Users browsing this forum: No registered users

Main Menu

User Menu

Hosted By


Who is online

In total there are 0 users online :: 0 registered and 0 hidden (based on users active over the past 5 minutes)
Most users ever online was 94 on Tue Sep 01, 2009 12:33 am

Users browsing this forum: No registered users

Login Form