Wait a minute... This content is very very old. We no longer sell or support this theme version. New Topics
Version 9
Harold Hemberger
0 points
Beginner
I think I found the code that controls the search zoom – If it is would anyone be able to tell me which part to change for a zoom of about 12. my PHP is not that good
This is from the wp-content / themes / DT42 / framework / class / class_white_label_themes.php file
/* =============================================================================
GOOGLE MAP DISPLAY FUNCTION FOR SEARCH RESULTS PAGE
========================================================================== */
function wlt_google_maps_display($atts, $content = null){
global $wpdb, $post, $CORE;
extract( shortcode_atts( array(‘tab’ => false ), $atts ) );
//3. IF ITS NOT EMPTY, LETS CHECK THE VALUE IS NOT EMPTY
$default_zoom = $GLOBALS[‘CORE_THEME’][‘google_zoom’];
if($default_zoom == “”){ $default_zoom = 7; }
$map_long = get_post_meta($post->ID,’map-log’,true);
I think I found the code that controls the search zoom – If it is would anyone be able to tell me which part to change for a zoom of about 12. my PHP is not that good
This is from the wp-content / themes / DT42 / framework / class / class_white_label_themes.php file
/* =============================================================================
GOOGLE MAP DISPLAY FUNCTION FOR SEARCH RESULTS PAGE
========================================================================== */
function wlt_google_maps_display($atts, $content = null){
global $wpdb, $post, $CORE;
extract( shortcode_atts( array(‘tab’ => false ), $atts ) );
//3. IF ITS NOT EMPTY, LETS CHECK THE VALUE IS NOT EMPTY
$default_zoom = $GLOBALS[‘CORE_THEME’][‘google_zoom’];
if($default_zoom == “”){ $default_zoom = 7; }
$map_long = get_post_meta($post->ID,’map-log’,true);
if($map_long == “”){ return; }
if( get_post_meta($post->ID,’showgooglemap’,true) != “yes” && !defined(‘WLT_DEMOMODE’) ){ return; }
$STRING = ‘<script src=”https://maps.googleapis.com/maps/api/js?sensor=false” type=”text/javascript”></script>’;
$STRING .= “<div id=’wlt_google_maps_div’ style=’width:100%;height:250px;’></div>”;
if(esc_attr($tab) == false){
$STRING .= ‘<script type=”text/javascript”>
function initialize() {
var myLatlng = new google.maps.LatLng(‘.get_post_meta($post->ID,’map-lat’,true).’,’.get_post_meta($post->ID,’map-log’,true).’);
var myOptions = { zoom: ‘.$default_zoom.’, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP}
map = new google.maps.Map(document.getElementById(“wlt_google_maps_div”), myOptions);
var image = new google.maps.MarkerImage(\”.get_template_directory_uri().’/framework/img/map/icon.png\’);
var shadow = new google.maps.MarkerImage(\”.get_template_directory_uri().’/framework/img/map/shadow.png\’);
var marker = new google.maps.Marker({
position: myLatlng,
map: map,
shadow: shadow,
icon: image
});
}
Members Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login Now