Question
Pega
IN
Last activity: 17 Apr 2019 1:41 EDT
Where do i find pyRecordHistory.pxResults after enabling the Geo Location Tracking and configuring the Google API Key
I Have enabled the Geo Location Tracking and configured the Google API Key. And i'm able to tack my location using the Address Map in my section correctly. I came to know that the Longitude Latitude will be stored into the pyRecordHistory.pxResults page in clipboard page.
But i'm unable to find the pyRecordHistory.pxResults in clipboard page.
***Edited by Moderator Marissa to update platform capability tags; moved from Pega Academy to Pega Support Community****
Hey Avinash,
Are you on a version prior to 7.3.1.? This seems to be a bug that was fixed in Pega 7.3.1 onwards.
You may perform the below to have it resolved.
Include the below code in a section and use it in the Harness
<script>
function showLocation(position) {
var latitude = position.coords.latitude;
var longitude = position.coords.longitude;
alert("Latitude : " + latitude + " Longitude: " + longitude);
}
function errorHandler(err) {
if(err.code == 1) {
alert("Error: Access is denied!");
}
else if( err.code == 2) {
alert("Error: Position is unavailable!");
}
}
if(navigator.geolocation){
// timeout at 60000 milliseconds (60 seconds)
var options = {timeout:60000};
navigator.geolocation.getCurrentPosition(showLocation, errorHandler, options);
}
else{
alert("Sorry, browser does not support geolocation!");
}
</script>
Hey Avinash,
Are you on a version prior to 7.3.1.? This seems to be a bug that was fixed in Pega 7.3.1 onwards.
You may perform the below to have it resolved.
Include the below code in a section and use it in the Harness
<script>
function showLocation(position) {
var latitude = position.coords.latitude;
var longitude = position.coords.longitude;
alert("Latitude : " + latitude + " Longitude: " + longitude);
}
function errorHandler(err) {
if(err.code == 1) {
alert("Error: Access is denied!");
}
else if( err.code == 2) {
alert("Error: Position is unavailable!");
}
}
if(navigator.geolocation){
// timeout at 60000 milliseconds (60 seconds)
var options = {timeout:60000};
navigator.geolocation.getCurrentPosition(showLocation, errorHandler, options);
}
else{
alert("Sorry, browser does not support geolocation!");
}
</script>
Reference article: https://community.pega.com/support/support-articles/latitudelongitude-values-are-not-posted-clipboard
Thank you,
Shreshta