You need to sign in to do that
Don't have an account?
Utriv
populate geocode (latitude and longitude)
I have embed a google maps in one of my custom objects. Based on the customer's address, the map is being displayed on the page. But how can I generate geocode (latitude and longitude) for the address? Any suggestions please.
Thank you in advance!
Here is some Javascript I used in a VF page to generate a map. Part of it was getting the lat long from an address (From the account Record)
latlong example result is: (42.0338837, -87.6719253)
Thank you Starz26... But I am not able to display even a map now...I copied and paste your code to vf page but the page displays your code not the map or geocode...please help..
I did not include any <script> </script> tags.
You will need to take what is there and implement into what you already have.
Would it be possible to turn something like this into a trigger that could populate the lat / lon fields? I am fairly new to apex / vf...
Any help is greatly appreciated!
-Justin
Hi,
I tried using this code in my visualforce page but I couldn't get it to work.
Could you please add the full visualforce code and Apex Controller (if there is on) so that I could get a better understanding of how this code fits into the page.
Thanks,
The code I posted has elements specific to the application I was using it for.
As an example, the variable addy and i being passed into the function were defined by me for my needs.
You will need to modify this code to fit your needs. How you call the code is up to your implementation. You could do it in a jquery .ready() function or the click of a button for example
Hi,
I took the code you gave me and tried to use it in my own visualforce page. However I still get a blank page. Is there something wrong with the way I am coding this?
In place of the ADDRESS word I have my own address.
Visualforce Page Code:
Thanks,
Simple,
you need to set the height and width of your div. Also, I forgot to pass the map opject to the placemarker function.
Also, ensure you have the google address in your remote site settings.
Hi,
Thanks that worked great.
Thanks,
I have an address on my case like: Address_street__c&Address_City__c&Address_PostalCode__c
And I would like to get Address_Geolocalisation__c from Google
with a formula like: http://maps.googleapis.com/maps/api/geocode/json?address &
Is it possible ?
Thanks