How to make Divi map module Pin marker open by default

Jun 28, 2017Blog, Web design, WordPress

How to make Divi map module Pin open by default

Divi theme have a integrated Map module. The maps modules makes it easy to embed custom Google Maps anywhere on your page. You can even add unlimited pins to the map, and define a custom viewport starting location.

Right now this module don’t have a option to pop up map pin marker on load.  We must hope it will be implemented surely in one of next main updates. As a admin of more than twenty install’s of custom Divi websites I know that most of client’s definitely want Divi map pin marker  to be opened automatically on load of desired page in browser.

Update:

Divi Booster pluginOpen the Map Pin Details by Default

 


Deprecated method / Divi map module Pin marker open by default

The solution for this problem is just one line of code that need to be added in frontend-builder-scripts.js file.
You can do it this way:

Open file divi/include/builder/script/frontend-builder-scripts.js
find this:

google.maps.event.addListener(marker, 'click', function() {
                                if( infowindow_active ) {
                                    infowindow_active.close();
                                }
                                infowindow_active = infowindow;

                                infowindow.open( $this_map_container.data('map'), marker );
                            });
                        }
                    });
                }

and replace with this:

google.maps.event.addListener(marker, 'click', function() {
                                if( infowindow_active ) {
                                    infowindow_active.close();
                                }
                                infowindow_active = infowindow;

                                infowindow.open( $this_map_container.data('map'), marker );
                            });
                                infowindow.open( $this_map_container.data('map'), marker );
                        }
                    });
                }

now the map pin will be loaded open. Enjoy!

Download

Download and unpack the file, open your FTP program and upload frontend-builder-scripts.js to divi/include/builder/script/ in main Divi theme.


frontend-builder-scripts.zip

Theme Name: Divi
Version: 3.0.51 and bellow
Download

Just remember that this is core modification and you need to keep in mind when you update theme time to time.

Why is no good make core modification?

Source: google map Info window – WordPress Development Stack Exchange

Other solutions:

Map Extended Module | Monterey Premier’s Divi Plugin Marketplace – Divi Custom Map Extended Module is designed to work with any Divi Builder based site. you have 72 preload color map styles to choose from. You can add your own pin icon and set the icon/image width and height. You can also show the infoWindow on load as well as Font styling on title and content! You can have bounce animation on the marker pin too!

David

Graphic and website designer, currently maintaining web servers for existing clients and building websites for new clients. In my free time, I learn about Linux, SSH, and WP-CLI and I’m preparing this blog.

Related Posts

25+ Free Fonts for Your Next Design Project

25+ Free Fonts for Your Next Design Project

Looking for some fresh and creative fonts to spice up your design projects in 2023? You’re in luck! In this blog post, we’ve curated a list of 25 free fonts that you can download and use right away. These fonts are suitable for various purposes such as logos,...

Adobe Photoshop Shortcuts – Infographic

Adobe Photoshop Shortcuts – Infographic

Thanks to Amanda from the Consumer Base that she sent us an ultimate Adobe Photoshop shortcuts cheat sheet. If you are a beginner or want to brush up your knowledge on Adobe Photoshop shortcuts then you are at the right place. Have look at it and let us your thoughts...

20 WordPress Tutorial channels on Youtube

20 WordPress Tutorial channels on Youtube

This post will introduce you a useful list of the 20+ best currently active WordPress tutorial related channels on Youtube. These channels are mostly focused on Tutorials and Guides for Developers and Designers that want to learn all about WordPress. Check them out...

12 AI Tools for Graphic and Website Designers

12 AI Tools for Graphic and Website Designers

Artificial intelligence (AI) is transforming the way designers work, from ideation to execution. AI tools can help designers automate tedious tasks, generate new content, and enhance their creativity. In this blog post, I will introduce AI tools that you can use to...

How to Pair Fonts – Tips and Tools for Perfect Font Combinations

How to Pair Fonts – Tips and Tools for Perfect Font Combinations

Font pairing is the art of choosing two or more fonts that work well together and create a harmonious design. Font pairing can make or break your website, logo, poster, or any other project that involves typography. But how do you pair fonts like a pro? In this...

The Ultimate Guide to Color Palettes

The Ultimate Guide to Color Palettes

Color palettes are collections of colors that work well together and create a harmonious visual effect. They are essential for any design and art project, as they help to convey the mood, message, and style of your work. But how do you choose the right color palette...

Show/Hide Comments (4 comments)
L

4 Comments

  1. Dan

    Hey David, thanks for the article!

    In case you’re interested, I (finally) came up with a way of doing this without needing to edit the core files. Basically, you can access the map object and then add another identical (overlaid) set of markers to the ones Divi adds, but set them to have the infobox open. Details here, if you’re interested:

    https://divibooster.com/open-divi-map-module-pin-details-by-default/

    Cheers!
    Dan

    Reply
    • David

      Hi Dan, thank you for the info. I’m all ready using your divibooster plugin, so it’s a great news. Keep up the good work.

      Reply
  2. Davide

    Hey David, I’ve tried to follow your tutorial but it didn’t work :(

    Reply
    • David

      I’m sorry about that, but remember this will work only for Divi Version: 3.0.51 and bellow. If you are using the last versions of Divi, this will not work. Check out divibooster plugin, it will solve this problem for you easily.

      Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Social followers

Articles

Visits

Pin It on Pinterest

Shares