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:
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