soflyy / oxygen-bugs-and-features

Bug Reports & Feature Requests for Oxygen
https://oxygenbuilder.com/
315 stars 30 forks source link

Allow automatic zoom level in Google Maps (WORKAROUND INCLUDED) #1069

Open yankiara opened 4 years ago

yankiara commented 4 years ago

Describe the feature you'd like to see included in Oxygen. Add a zoom setting in Google Maps element so that we can choose automatic zoom. This should be default.

I use this snippet as a workaround:

(function($) {
  $(window).on('load', function() {
    $(".oxy-map iframe").each(function() {
      var src = $(this).attr('src');
      $(this).attr('src', src.replace('&z=14', ''));
    });
 });  
})(jQuery);

What are the use cases for this feature? Real estate website: automatically display different zoomed maps for towns, areas, neighbourghoods, etc.

KarzanTT commented 4 years ago

+1