Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Latitude,Longitude values are not posted to clipboard

SA-42086

Summary



When Map control is used in section with "Show Current Location" enabled, the pyLatitude and pyLongitude values of pxRequestor page are not posted to clipboard.


Error Messages



Not Applicable


Steps to Reproduce

  1. Use Map control in section
  2. Select "Show Current Location" option in the Map control


Root Cause



No logic in pzpega_ui_addressmap js file to set the position values to pyLatitude and pyLongitude properties in clipboard for which bug is raised.

Resolution



Follow the below local change:

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>

Published August 9, 2017 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice