<?php
/**
 * @var $pid
 */

if ( wpj_get_option( 'wpjobster_location' ) == 'yes'
	&& wpj_get_option( 'wpjobster_location_display_map' ) == 'yes'
	&& get_post_meta( $pid, 'location_input', true ) ) {

	if ( wpj_get_option( 'wpjobster_location_display_map_user_choice' ) != "yes"
		|| ( wpj_get_option( 'wpjobster_location_display_map_user_choice' ) == "yes" && get_post_meta( $pid, "display_map", true ) == "yes" ) ) { ?>

		<div id="job_map" data-address="<?php echo get_post_meta( $pid, 'location_input', true ); ?>"></div>

	<?php } else echo '<style>.job-map-row-wrapper{display:none;}</style>'; // for page builder

} else echo '<style>.job-map-row-wrapper{display:none;}</style>'; // for page builder