Home arrow Forum
Home
About
Demo
Forum
FAQ
Live Sites
Feedback

Login





Lost Password?
No account yet? Register
Stay Tuned!
 
Who's Online
We have 2 guests and 4 members online

powered_by Joomla
ME Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Work-around: Google maps not showing (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Work-around: Google maps not showing
#3241
dyhex (User)
Expert Boarder
Posts: 145
graphgraph
User Offline Click here to see the profile of this user
Gender: Male
Work-around: Google maps not showing 1 Year, 2 Months ago Karma: 4  
Hi all!

Well, I spent some time on the google maps API script and found a solution until a dev has looked into it.

Here is a small guide:

Make sure allow_url_fopen is working on you server. So file_get_contents(URL) has to work too!!. Check you joomla system info in the back-end for that.

1. Put you site off-line coz the changes will cause errors displayed in the front end.

2. Download the original API script here and save it on the local harddrive.

3. rename the script to GMapAPI.class.php.

4. Backup the original GMapAPI.class.php in the /components/cam_estateagent/includes/ dir.

5. Upload the new script. The map should be shown in the front-end right now.

6. Check the map settings in the EA back-end (500px x 250px) ot (100% x 100%)

7.Backup estateagent.php in the /components/cam_estateagent dir.

8.Edit estateagent.php and find the following code:
Code:

if($ea_gmap){ require($mosConfig_absolute_path."/components/com_estateagent/includes/GMapAPI.class.php"«»); $address = "$obj->street $obj->town $obj->state $obj->country $obj->pcode"; $gmap = new GoogleMapAPI('map'); $gmap->setAPIKey($ea_gmap_key); $gmap->setWidth($ea_gmap_width); $gmap->setHeight($ea_gmap_height); $gmap->setMapType($ea_gmap_type); // string $address the map address to mark (street/city/state/zip) $gmap->addMarkerByAddress($address,"GMap Test","GMap Description"«»);
Change it to:
Code:

if($ea_gmap){ require($mosConfig_absolute_path."/components/com_estateagent/includes/GMapAPI.class.php"«»); $address = "$obj->street $obj->town $obj->state $obj->country $obj->pcode"; $gmap = new GoogleMapAPI('map'); $gmap->setAPIKey($ea_gmap_key); $gmap->setWidth($ea_gmap_width); $gmap->setHeight($ea_gmap_height); $gmap->setMapType($ea_gmap_type); // string $address the map address to mark (street/city/state/zip) $gmap->addMarkerByAddress($address, "<strong>Enter text here</strong><br>Some text here too"«»); $gmap->setCenterCoords($lat,$lon);
So the map and the marker should be shown now. Maybe the map is not doing an auto center? Well, I found a semi solution to this. 9. Set you site online. 10. Open an object and show the source code in you browser. At the top of the page the is the google script. Check the latitude and longitude of the marker. 11. Enter these in the
Code:

$gmap->setCenterCoords($lat,$lon)
function in the estateagent.php. So i should look like some thing like this:
Code:

$gmap->setCenterCoords(6.801666,52)
We are nearly done Open the GMapAPI.class.php and find the code:
Code:

var $zoom = 16;
You should change it something like 3 or 5. To open the info-bubble when mouseover the marker find the code:
Code:

var $window_trigger =
and enter either click or mouseover. So a demo is on my site here //Dyhex<br><br>Post edited by: dyhex01, at: 2007/07/29 23:49
 
Report to moderator   Logged Logged  
 
Dont be afraid of the opposition: remember a kite rises against not with the wind!
  The administrator has disabled public write access.
      Topics Author Date
    thread link
Work-around: Google maps not showing
dyhex01 2007/04/11 18:47
    thread link
thread linkthread link Re:Work-around: Google maps not showing
admin 2007/04/12 01:37
    thread link
thread linkthread linkthread link Re:Work-around: Google maps not showing
theconsul 2007/04/17 15:43
    thread link
thread linkthread linkthread linkthread link Re:Work-around: Google maps not showing
theconsul 2007/04/17 16:26
    thread link
thread linkthread linkthread linkthread linkthread link Re:Work-around: Google maps not showing
webpro 2007/04/18 11:30
    thread link
thread linkthread linkthread linkthread linkthread linkthread link Re:Work-around: Google maps not showing
dyhex01 2007/04/18 17:07
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread link Re:Work-around: Google maps not showing
theconsul 2007/04/18 17:50
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread linkthread link Re:Work-around: Google maps not showing
dyhex01 2007/04/18 19:23
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread link Re:Work-around: Google maps not showing
theconsul 2007/04/19 08:34
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread link Re:Work-around: Google maps not showing
admin 2007/04/20 01:18
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread link Re:Work-around: Google maps not showing
admin 2007/04/20 01:22
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread link Re:Work-around: Google maps not showing
theconsul 2007/04/20 09:36
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread link Re:Work-around: Google maps not showing
theconsul 2007/04/20 09:48
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread link Re:Work-around: Google maps not showing
dyhex01 2007/04/20 10:07
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread link Re:Work-around: Google maps not showing
everyman 2007/10/01 18:52
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread link Re:Work-around: Google maps not showing
Ikkes 2007/10/04 12:01
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread link Re:Work-around: Google maps not showing
roman_i 2007/08/16 13:45
    thread link
thread linkthread link Re:Work-around: Google maps not showing
gone3uo6 2007/06/11 15:26
    thread link
thread linkthread linkthread link Re:Work-around: Google maps not showing
zingaralho 2007/07/05 12:14
    thread link
thread linkthread linkthread linkthread link Re:Work-around: Google maps not showing
dyhex01 2007/07/05 16:24
    thread link
thread linkthread linkthread linkthread linkthread link Re:Work-around: Google maps not showing
sfg 2007/07/26 09:57
    thread link
thread linkthread link Re:Work-around: Google maps not showing
jmbernier 2007/10/22 20:47
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop