Google Maps API


I’ve been looking around the forums for an answer regarding my question but have only found a part of the answer.

Regarding google Maps API. I’m working on a project that utilizes a lot of the map functionality like markers, clusters, popups, dynamic search and so forth. Now in my preview, I understand that I have to have a full functional map with no “For development purposes only” error. However, in my downloadable file, do I also have to keep my API Key (which has billing enabled) for users to use? Or it’s fine to allow them to enter their own key?

I understand that in a WordPress theme, you should have an option field to replace the key, but what about HTML templates, should i leave the key empty in the map src or I must provide my own key as well?

Looking forward for someone with more experience’s reply! :slight_smile:

From what I know from the themes and templates I bought on ThemeForest, you are right, for WP themes you will have to create an editable field in the theme options panel, where the users will put their own key.

For HTML templates, you will use your API key for the live demo, but only there, not in the files that the users will download (Google advice is to not give your key to others).

Instead, in the files for download, you can use at the end of Google Maps API url, key= (leaving empty the value, this way the map will be displayed with a stamp “for development purposes only”)…

like this: script type=‘text/javascript’ src=‘

and you will write in the included documentation the specific steps for users for how to get a Google Maps key.

I hope it helps a bit :slight_smile:

1 Like

Actually helps a lot, and that answer can’t get any more accurate thanks :slight_smile:

Marked as a solution if someone else was wondering the same thing.

1 Like