Fudge

  1. Home
  2. Docs
  3. Fudge
  4. Frequently Asked Questions
  5. The Google Map is too zoomed in on my location. How can I change That?

The Google Map is too zoomed in on my location. How can I change That?

Please make sure to back up all files and database before making any change. Also note that altering Google Map may impact future updates of the service from Google.

1) Copy footer.php from parent theme to child theme.

2) Open footer.php in the child theme. Look for

jQuery('#explore .container').gmap('addMarker', {
'position': '<!--?php echo get_post_meta(get_the_ID(), 'lat', true); ?-->,<!--?php echo get_post_meta(get_the_ID(), 'lng', true); ?-->',
'bounds': true,
'icon' : new google.maps.MarkerImage('<!--?php echo get_stylesheet_directory_uri(); ?-->/images/schemes/<!--?php echo!empty($options['color_palette']) ? $options['color_palette'] : 'default'; ?-->/icon-map-pointer.png')
}).click(function() {
jQuery('#explore .container').gmap('openInfoWindow', {'content': '<!--?php echo $address; ?-->'}, this);
});

Add

jQuery('#explore .container').gmap('option', 'zoom', 13);

So that it looks like

 
jQuery('#explore .container').gmap('addMarker', {
'position': '<!--?php echo get_post_meta(get_the_ID(), 'lat', true); ?-->,<!--?php echo get_post_meta(get_the_ID(), 'lng', true); ?-->',
'bounds': true,
'icon' : new google.maps.MarkerImage('<!--?php echo get_stylesheet_directory_uri(); ?-->/images/schemes/<!--?php echo!empty($options['color_palette']) ? $options['color_palette'] : 'default'; ?-->/icon-map-pointer.png')
}).click(function() {
jQuery('#explore .container').gmap('openInfoWindow', {'content': '<!--?php echo $address; ?-->'}, this);
});
jQuery('#explore .container').gmap('option', 'zoom', 13);

 

Was this article helpful to you? Yes No 6