@maryboki,
Using the shortcode attribute address_fields=”street,city,lat,lng” should display the coordinates. However, it will display the coords as part of the address field, since at the moment, the shortcode is not meant to display the coords.
Instead, you can use the below script as a work-around:
function gmw_cl_display_coordinates( $output, $args, $user_position ) {
// Abort if coords are missing.
if ( empty( $user_position['lat'] ) || empty( $user_position['lng'] ) ) {
return $output;
}
$output .= '<div class="gmw-cl-element gmw-cl-coords-wrapper">';
$output .= '<lat>' . esc_attr( $user_position['lat'] ) . '</lat><lng>' . esc_attr( $user_position['lng'] ) . '</lng>';
$output .= '</div>';
return $output;
}
add_filter( 'gmw_current_location_address', 'gmw_cl_display_coordinates', 50, 3 );
I hope this helps.