function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rajesh SriramuluRajesh Sriramulu 

Hi Regarding Google Map

Hi one and All,

 

 

I have a project on google map and i need  some material and link and code which related to google in Apex and Vf page so that i have to implements in my project plz send ASAP.

 

  Thanks in aDVANCE.

 

Regards,

Rajesh.

Chamil MadusankaChamil Madusanka

Refer following links

 

http://forceguru.blogspot.com/2012/01/integrating-google-maps-in-salesforce.html

 

http://www.techsahre.blogspot.com/2011/04/sfgmap-salesforce-google-map-jquery.html

 

http://www.techsahre.blogspot.com/2011/09/heat-map-using-google-map-in-salesforce.html

 

If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.

Navatar_DbSupNavatar_DbSup

Hi,


Try the below code as referenece:

<apex:page standardController="Account">
<script src="http://maps.google.com/maps?file=api">
</script>

<script>
var map = null;
var geaocoder = null;
var address = "{!account.BillingStreet},{!account.BillingCity},{!account.BillingPostalCode},{!account.BillingCountry}";

function initialize()
{
if(GBrowserIsCompatible())
{
map=new GMap2(document.getElementById("MyMap"));
map.addControl(new GMapTypeControl());
map.addControl(new GLargeMapControl3D());

geocoder=new GClientGeocoder();
geocoder.getLatLng(address,
function(point)
{
if(!point)
{
documnet.getElementById("MyMap").innerHTML = address +"not found";
}
else
{
map.setCenter(point,13);
var marker = new GMarker(point);
map.addOverlay(marker);
marker.bindInfoWindowHtml("Account Name: <b><i>{!account.Name}</b></i><br/>Address: "+address);

}
}
);
}
}
</script>

<div id="MyMap" style="width:100%;height:400px">
<script>
initialize();
</script>
</div>


</apex:page>

 

For more details about google ApI please go through the link below:
https://developers.google.com/maps/documentation/webservices/

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.