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 members online

powered_by Joomla
Duplicate entry \'0\' for key 1 SQL=INSERT INTO jos_fb_whoisonline (`userid` , `time`, `what`, `task`, `do`, `func`,`link`, `userip`, `user`) \n VALUES (\'0\', \'1222817556\', \'Re:Work-around: Google maps not showing\',\'\',\'\',\'view\',\'/index.php?option=com_fireboard&Itemid=42&func=view&catid=9&id=3324\', \'38.103.63.59\', \'0\')
ME Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Work-around: Google maps not showing (0 viewing) 
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Work-around: Google maps not showing
#3241
dyhex (User)
Expert Boarder
Posts: 146
graphgraph
User Offline Click here to see the profile of this user
Gender: Male
Work-around: Google maps not showing 1 Year, 5 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.
#3251
admin (Admin)
Admin
Posts: 562
graph
User Online Now Click here to see the profile of this user
Gender: Male MisterEstate Location: South Germany
Re:Work-around: Google maps not showing 1 Year, 5 Months ago Karma: 32  
hi,

thanks for your contribution. I will adopt it into the next release.
 
Report to moderator   Logged Logged  
 
kindly regards / beste Gruesse

Admin
  The administrator has disabled public write access.
#3303
theconsul (User)
Fresh Boarder
Posts: 15
graphgraph
User Offline Click here to see the profile of this user
Re:Work-around: Google maps not showing 1 Year, 5 Months ago Karma: 0  
ok a little summary

i have uploaded tha original api script

i uploaded it

adjusted it, so should be good

adjusted map settings

and modified estateagent.php

but i do not get the marker and the map brings me to africa

i just have a little prob with point 10

cannot find it in my source

so nearly there but not working yet

any suggestions?

many thx
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#3306
theconsul (User)
Fresh Boarder
Posts: 15
graphgraph
User Offline Click here to see the profile of this user
Re:Work-around: Google maps not showing 1 Year, 5 Months ago Karma: 0  
and no map in IE

site: http://www.diversum.be/component/option,com_estateagent/act,object/task,showEO/id,1/
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#3318
webpro (User)
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
Re:Work-around: Google maps not showing 1 Year, 5 Months ago Karma: 0  
Hi, I have the same problem, Africa in the map, instead of UK, not found code in source to get the long, lat and I also have a problem with Map24, it says &quot;Given parameters are incomplete!&quot; although I entered the street, and full port code.

Please help

Thanks
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#3323
dyhex (User)
Expert Boarder
Posts: 146
graphgraph
User Offline Click here to see the profile of this user
Gender: Male
Re:Work-around: Google maps not showing 1 Year, 5 Months ago Karma: 4  
Hi guys!

Well, the map is showing Africa because the

$gmap-&gt;setCenterCoords($lat,$lon);

in estateagent.php is giving out lat=0 and lon=0 wich is infact the equator.

Try to set it to something that fits for you country.

Edit the code:

$gmap-&gt;setCenterCoords($lat,$lon);

to:

$gmap-&gt;setCenterCoords(7,50);

Play around a bit until it fits you area...

About the marker not showing up. I'm not sure but maybe geocding is not available in you area or it has something to do the address-data is handed over the the api- script. This is done in:

$address = &quot;$obj-&gt;street $obj-&gt;town $obj-&gt;state $obj-&gt;country $obj-&gt;pcode&quot;;

code of estateagent.php

Try to edit it to:

$address = &quot;$obj-&gt;country $obj-&gt;pcode&quot;;

Hope it helps

Cheers

//dyhex
 
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.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop