Hi:

Thanks for the great work on this module. I installed the latest development release, but haven't been able to get the map functionality to work properly. I've gotten a google maps api code via the link provided and added it my listing settings. However, when I create a listing and input address, etc., I can see the collapsible fieldset but no map is displayed. The AJAX version acts the same.... tries to load but ends up blank w/ no error thrown. Checking my source, it looks like the only thing lacking from google's code example to mine is the < body onload="load()" onunload="GUnload()" >, which isn't in my source code. Adding it manually to page.tpl.php didn't solve the problem. The javascript looks roughly the same, though.

Here's the whittled-down source code I end up with for a listing's page display:

< script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAMxPEff_I79pUv4exgMDioBSxQ7j6HxsABgzrKWtHwLbBi0XJpBRvlXODsi-Oes-Eo7XravqOoYwR9A" type="text/javascript" charset="utf-8"></ script>

< script type="text/javascript">$(document).ready(function(){
      		if (GBrowserIsCompatible()) {
        		var map = new GMap2(document.getElementById("map_canvas"));
        		var center = new GLatLng(, );
        		map.setCenter(center, 12);
				map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
				var marker = new GMarker(center);
				map.addOverlay(marker);
      		}	
		})< /script>
	< fieldset class='collapsible'>
		< legend>Map< /legend>
		< div class="form-item">
			< center>
    		< div id="map_canvas" style="width: 400px; height: 300px">< /div>< /center>< /div>< /fieldset>

Any assistance would be appreciated. Thanks.

Comments

vegeneric’s picture

also - my company is going to be working on an mls importing script based on mls feeds available here in north carolina. we may be able to provide the code when it's finished in the hopes of bolstering an mls import add-on for this module.

vlooivlerke’s picture

Priority: Normal » Critical

I have the same problem, by the way, great module!
Should I install Gmap.module and the location.module to set the maps and markers when the listing node is created?
I have used these modules before and they work very well when you assign them to a content type.
You can also create your own markers, say a for sale maker and a to rent marker.
I also had a look at your demo and the map feature is not working there too.

Thanks
Paul

kenuck’s picture

Assigned: Unassigned » kenuck

Hi ,
Can you provide a link to your demo site? You must have a valid address in the listing for the google maps to work properly.
cheers

vegeneric’s picture

Thanks for having a look....

vlooivlerke’s picture

The valid address "does it work in South Africa?". Lets say you live on a farm and would like to place a marker on the farm house, then a valid address will not work. I did add the province data to the database but it does not register South Africa on google maps. How about the location module to interact with your google maps, so that markers can be manually placed.
Thanks Paul

ardelio’s picture

Same problem here, JS error because of empty values in var center = new GLatLng(, );
for both, valid addresses and manually inputed Lat/Lon on the Google Map tab.
Great module, thanks.

kenuck’s picture

Status: Active » Fixed

I've just fixed the bug. Should be working now. I've just made the CVS commit.

cheers

vegeneric’s picture

Thanks for the help; will dl the new cvs and test it out tonight!

ardelio’s picture

Status: Fixed » Active

1) the manual update works now, thanks
2) the mapping from address still doesn't work in my case for an address that is correctly resolved by google.com/maps: Titova, Sarajevo, Bosnia and Herzegovina. I get the same error as in #6.

Thanks

Project: » Lost & found issues

This issue’s project has disappeared. Most likely, it was a sandbox project, which can be deleted by its maintainer. See the Lost & found issues project page for more details. (The missing project ID was 199796)