Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Google Maps API problem + solution

Home / Forums / Virtue Theme / Google Maps API problem + solution

This topic is: Resolved
[Resolved]
Posted in: Virtue Theme
October 18, 2016 at 9:42 am

I ran into some trouble in trying to get the Virtue Google Maps widget to work properly on a new website I’m working on (link), but managed to solve the problem and figured the solution was worth mentioning here.

The problem was that, even after generating a Google Maps API and using it in the Theme Options, the widget still refused to show the proper location. I tried various ways to input adresses, and various addresses in different countries (complete adresses, just a country name, coordinates etc.), but the map would always center on the La Couciére street in France, for no apparent reason, without putting any markers down. Chrome’s console showed an “Invalid Key” error, despite showing the correct API key as being used.

The solution I found was to enable the Google Maps Geocoding API as well, in addition to enabling the Google Maps JavaScript API (which is still the key used in Misc Options). As a potential bonus, I am now able to use coordinates for the marker location, which I’m not sure is possible without the Geocoding API–but I can’t confirm this since the widget wasn’t working without it in the first place 😉

Since the steps in the Retrieving Google Maps documentation don’t mention adding any other APIs, perhaps it could be a useful addition/comment to make?

  • The forum ‘Virtue Theme’ is closed to new topics and replies.