You need to sign in to do that
Don't have an account?
Test Dev 81
Get value from Javascrpt object
Hi Everyone,
I am getting trouble getting values from JS object in my VF page
I want to extract values lat and lng from these variables
when i do geocode_1.lat i am getting function(){return d} in debug console
I am getting trouble getting values from JS object in my VF page
function airMapInit(geocode_1,geoCode_2) { console.log('Geocode_1'+JSON.stringify(geocode_1)); console.log('Geocode_1'+geocode_1.lat); } ///////////////////////////////////////////////////////// LOGs... Geocode_1{"lat":28.6139391,"lng":77.2090212} Geocode_1function(){return d}
I want to extract values lat and lng from these variables
when i do geocode_1.lat i am getting function(){return d} in debug console
>> https://www.thephani.com/how-to-save-current-location-using-visualforce-pages/
I see that you are trying to get the location in visualforce page and I was able to find an implementation in the above link can you try checking the above link once?
Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.
Thanks.
actually, I want draw a line between geocodes bypassing city name or address
but first, I have to get geocodes
i am getting JSON data from the Google API but I am not able to extract lat and lng from the response