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
- Use Map control in section
- 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
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.