# Google Maps

In order to use the [Contact Info widget](https://docs.stylemixthemes.com/companion-theme-documentation/companion-widgets/contact-info) and [Google Maps Widget](https://elementor.com/help/google-maps-widget/), you must first create an API key. You also need a project with a billing account and the Maps Embed API enabled. Once completed, navigate to *Elementor > Settings > Integrations* and enter the key:

![](https://1186712708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1Jo7DkgxZUy8C30NAXD%2Fuploads%2FN9up3Dhk2fi43FX9c95q%2FCompanion%20-%20Maps%20API%20add.png?alt=media\&token=cc7fb474-fe4f-4b07-946e-18f5c861117b)

&#x20;To learn more, see this article in Google [Set up Cloud Console](https://developers.google.com/maps/documentation/embed/get-api-key).

### Start a new Project <a href="#start-new-project" id="start-new-project"></a>

From the Google Cloud Platform, create a New Project

![](https://1186712708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1Jo7DkgxZUy8C30NAXD%2Fuploads%2Fgv46FcWAbDnsLqylwQ0I%2FCompanion%20-%20GC%20new%20project.png?alt=media\&token=f8cc0917-e602-4eb7-bcfc-a69b929b70b3)

1. Name your project using a unique name (note: this cannot be changed later)
2. Fill out your Organization's name
3. Enter the location of your project

### Billing Information <a href="#billing-information" id="billing-information"></a>

We will now need to set up billing information for your project. You may do this from the *Left Panel > Billing*

![](https://1186712708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1Jo7DkgxZUy8C30NAXD%2Fuploads%2FLafPUrFuvQcIqPrVU1BI%2FCompanion%20-%20GC%20billing.png?alt=media\&token=ac8f8bc1-40d2-43aa-be63-00f26f7bb988)

#### Billing Step One <a href="#billing-step-one" id="billing-step-one"></a>

![](https://1186712708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1Jo7DkgxZUy8C30NAXD%2Fuploads%2FQEkz8ourRSmRg69glXM8%2FCompanion%20-%20GC%20billing%201.png?alt=media\&token=75669225-c6f6-494e-80d7-06779c4960ca)

1. Select a Country that applies to your project
2. Agree to Terms of Service
3. Click Continue

#### Billing Step Two <a href="#billing-step-two" id="billing-step-two"></a>

In the second ste&#x70;*,* you need to verify your Contact informatio&#x6E;*:*

![](https://1186712708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1Jo7DkgxZUy8C30NAXD%2Fuploads%2FvTNu6ptlIgpxgeLox8lc%2FCompanion%20-%20GC%20billing%202.png?alt=media\&token=d8d71531-2ab7-480c-a573-e513886c1e12)

After receiving the verification code confirm it:

![](https://1186712708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1Jo7DkgxZUy8C30NAXD%2Fuploads%2F8E3556numyAlIs29zaMp%2FCompanion%20-%20GC%20billing%202%20vertify.png?alt=media\&token=875a2751-ea41-449d-9ea9-3f30f39723fc)

#### Billing Step Three <a href="#billing-step-two" id="billing-step-two"></a>

![](https://1186712708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1Jo7DkgxZUy8C30NAXD%2Fuploads%2FMzproFW2KcrawsnwObBg%2FCompanion%20-%20GC%20billing%203.png?alt=media\&token=961c0ed2-a688-46cf-854f-cb6630096a9c)

1. Select an Account type
2. Enter a Business Name
3. Select a Payment Method
4. Enter your Payment information as chosen above (example: credit card)

![](https://1186712708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1Jo7DkgxZUy8C30NAXD%2Fuploads%2FZt9aqWWAelUgGkeKj8GM%2FCompanion%20-%20GC%20billing%20payment%20methods.png?alt=media\&token=170c62f4-793f-4da0-8fff-28278565cf67)

Click the **Start My Free Trial** button, and you can return the project dashboard. Your billing information is now complete for this project.

### Creating Credentials <a href="#creating-credentials" id="creating-credentials"></a>

From the *APIs and Services > Credentials Tab*, click the + Create Credentials link and select the API key:

![](https://1186712708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1Jo7DkgxZUy8C30NAXD%2Fuploads%2FdZwiCHzeORo90rt89xA0%2FCompanion%20-%20GC%20Api%20add.png?alt=media\&token=68f29567-6071-42d1-a756-9acc825f9aa9)

You will now get an API key. For your protection, it is best to restrict this key from being used elsewhere:

![](https://1186712708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1Jo7DkgxZUy8C30NAXD%2Fuploads%2FmY5ncFb0D9Vt5jrdHX7h%2FCompanion%20-%20GC%20Api%20key%20ready.png?alt=media\&token=cf1fe8b6-ed14-4d88-af2e-50d783509bcf)

### Adding Applications <a href="#adding-applications" id="adding-applications"></a>

We can now associate applications to be used with your key. From the APIs and Services dashboard click library

![](https://1186712708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1Jo7DkgxZUy8C30NAXD%2Fuploads%2Ff5X1yI8Dvfs139IBW6Jz%2FCompanion%20-%20GC%20library.png?alt=media\&token=7c82983a-1867-4076-8cc8-6b3095ec6d66)

#### Adding Maps Embed API <a href="#adding-maps-embed-api" id="adding-maps-embed-api"></a>

In the search box type in Maps. You will need the Maps Embed API for the Elementor Widget. Select this in the list below and Enable.

![](https://1186712708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1Jo7DkgxZUy8C30NAXD%2Fuploads%2F6d7dMz3Xo9ECuWyQ980F%2FCompanion%20-%20GC%20Maps%20API.png?alt=media\&token=5a3c3b0e-2645-4610-826f-d5239261134f)

Click the Enable Maps Embed API Button

![](https://1186712708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1Jo7DkgxZUy8C30NAXD%2Fuploads%2F4LlCWPDOKlEJLlQ4YG8g%2FCompanion%20-%20GC%20Maps%20API%20enable.png?alt=media\&token=be312810-36ee-4aab-8dc5-2a38bc2b2ff2)

Then search for Maps JavaScript API:

![](https://1186712708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1Jo7DkgxZUy8C30NAXD%2Fuploads%2FattDfdJBBPIMxZC3Eb7t%2FCompanion%20-%20GC%20Maps%20JS%20API.png?alt=media\&token=fc4e2f8a-8783-4ec0-b764-096c1256b90b)

Click the Enable Maps JavaScript API Button:

![](https://1186712708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1Jo7DkgxZUy8C30NAXD%2Fuploads%2FaxqSgrqAFXt3vo1WMbl6%2FCompanion%20-%20GC%20Maps%20JS%20API%20enable.png?alt=media\&token=f6c4086e-44ea-460d-b972-33d7508c4bee)

This will now show in your list of available APIs and start collecting data

![](https://1186712708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1Jo7DkgxZUy8C30NAXD%2Fuploads%2FPRTDyQltb3B5p1XFgQkv%2FCompanion%20-%20GC%20All%20api.png?alt=media\&token=d4d69c77-b843-4503-b27f-ce78aac04362)

### Add Your API Key to Elementor <a href="#add-your-api-key-to-elementor" id="add-your-api-key-to-elementor"></a>

You may now navigate to *Elementor > Settings > Integrations* and place the key in order to use the Maps Widget.&#x20;

![](https://1186712708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1Jo7DkgxZUy8C30NAXD%2Fuploads%2FN9up3Dhk2fi43FX9c95q%2FCompanion%20-%20Maps%20API%20add.png?alt=media\&token=cc7fb474-fe4f-4b07-946e-18f5c861117b)

Now we can test the obtained Google Maps API by inserting the [Contact Info widget](https://docs.stylemixthemes.com/companion-theme-documentation/companion-widgets/contact-info) and [Google Maps Widget](https://elementor.com/help/google-maps-widget/)s into the page.

### Contact Info Widget

![](https://1186712708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1Jo7DkgxZUy8C30NAXD%2Fuploads%2Fu7FLnTIUiTsprs5kqCgJ%2FCompanion%20-%20contact%20info%20added.png?alt=media\&token=100b8217-e759-4171-92df-db1c43167539)

{% hint style="info" %}
A detailed description of the widget can be found [here](https://docs.stylemixthemes.com/companion-theme-documentation/companion-widgets/contact-info).
{% endhint %}

### Google Maps Widget

![](https://1186712708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1Jo7DkgxZUy8C30NAXD%2Fuploads%2F9kVmPcxYS71SNi7QdTp6%2FCompanion%20-%20google%20maps%20API.png?alt=media\&token=2d13f79f-e651-47d6-838d-e7b61d842c27)

{% hint style="info" %}
A detailed description of the widget can be found [here](https://elementor.com/help/google-maps-widget/).
{% endhint %}

### Google Maps Styles

When maps are embedded using the [Contact Info Widget](https://docs.stylemixthemes.com/companion-theme-documentation/companion-widgets/contact-info), Google has its own default styles for the maps:

<figure><img src="https://1186712708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1Jo7DkgxZUy8C30NAXD%2Fuploads%2FMtBVzcpQqqbQVKqW6AOa%2FCompanion%20-%20default%20google%20maps%20style.png?alt=media&#x26;token=8c6f7f58-7e59-44a6-9fb4-12315abdcc7b" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
Custom styles for Google Maps can be created with the help of the [Snazzy Maps service](https://snazzymaps.com/) so that the appearance of the map matches the styles of the site.
{% endhint %}

To do that, let's visit the [official website of the service](https://snazzymaps.com/) and popular ready map styles will be offered.

<figure><img src="https://1186712708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1Jo7DkgxZUy8C30NAXD%2Fuploads%2Ffte2XDclseKHFoQ6p4yb%2FCompanion%20-%20Snazzy%20popular.png?alt=media&#x26;token=c87f872c-20b3-4e21-9b11-5112b6f27f9c" alt=""><figcaption></figcaption></figure>

By selecting one of the popular styles we can customize it to match our website styles or use it without changes:

<figure><img src="https://1186712708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1Jo7DkgxZUy8C30NAXD%2Fuploads%2FvB8E2Uuv6zXr46cVd3QI%2FCompanion%20-%20Snazzy%20popular%20select.png?alt=media&#x26;token=68fd5130-e5ee-40c4-87e1-da49344edf30" alt=""><figcaption></figcaption></figure>

After selecting the map style, a single page with several options will appear:

<figure><img src="https://1186712708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1Jo7DkgxZUy8C30NAXD%2Fuploads%2FzuvsTQYAcmsC3chHqyTj%2FCompanion%20-%20Snazzy%20popular%20single.png?alt=media&#x26;token=0bc7a6c8-41cb-4b8b-a58f-3a5490a5f841" alt=""><figcaption></figcaption></figure>

There we can copy the ready Map style by clicking "Expand code" to use in our [Contact Info Widget](https://docs.stylemixthemes.com/companion-theme-documentation/companion-widgets/contact-info) or customize it by clicking the brush button "<img src="https://1186712708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1Jo7DkgxZUy8C30NAXD%2Fuploads%2Fn5DMes0sOjf4PuotRRnu%2FCompanion%20-%20Snazzy%20brush%20icon.png?alt=media&#x26;token=dfee1d69-f0df-4f64-b62f-0cdaba9da100" alt="" data-size="line">". Before copying we will make some changes:

<figure><img src="https://1186712708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1Jo7DkgxZUy8C30NAXD%2Fuploads%2FRulSe2brQo0w2xx4Tr60%2FCompanion%20-%20Snazzy%20edit%20colors.png?alt=media&#x26;token=8f8c70c5-38b5-44db-b03e-29f5f8c1631b" alt=""><figcaption></figcaption></figure>

Map layers are arranged hierarchically and allow you to customize elements individually. After making changes it is necessary to copy the JavaScript Style Array code to use in the [Contact Info Widget](https://docs.stylemixthemes.com/companion-theme-documentation/companion-widgets/contact-info) style settings.

<figure><img src="https://1186712708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1Jo7DkgxZUy8C30NAXD%2Fuploads%2FVNZo4e1hpBrEx10TrbaH%2FCompanion%20-%20Snazzy%20copy%20JS.png?alt=media&#x26;token=d0dbb3a3-e705-40a0-862f-9076f888c98e" alt=""><figcaption></figcaption></figure>

Instead of editing the ready styles, you can begin from the scratch through **Create a Style** menu.

<figure><img src="https://1186712708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1Jo7DkgxZUy8C30NAXD%2Fuploads%2FcPPJNkjRklaVZOdmLnKh%2FCompanion%20-%20Snazzy%20new.png?alt=media&#x26;token=cf4856fa-1999-4f2c-a327-2686f8de8d63" alt=""><figcaption></figcaption></figure>

On the opened window you can customize the map layers by choosing hierarchically arranged elements. The layers where settings are applied will be marked with a green dot "<img src="https://1186712708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1Jo7DkgxZUy8C30NAXD%2Fuploads%2FTYpP4iSIRfHLmMq6UTFN%2FCompanion%20-%20Snazzy%20dot.png?alt=media&#x26;token=f409a4e9-c3f2-4036-8709-7bea8d630d32" alt="" data-size="line">":

<figure><img src="https://1186712708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1Jo7DkgxZUy8C30NAXD%2Fuploads%2F4CMzWM61zSdivzlGdvLn%2FCompanion%20-%20Snazzy%20edit.png?alt=media&#x26;token=332bc42d-2d99-4c96-82aa-875411e5975c" alt=""><figcaption></figcaption></figure>

After making changes it is necessary to copy the JavaScript Style Array code to use in the [Contact Info Widget](https://docs.stylemixthemes.com/companion-theme-documentation/companion-widgets/contact-info) style settings.

<figure><img src="https://1186712708-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe1Jo7DkgxZUy8C30NAXD%2Fuploads%2FuO7lIaELysWDeCu9dQin%2FCompanion%20-%20Snazzy%20save.png?alt=media&#x26;token=5823d1bf-8be8-4a4f-b9ac-5d2240607e26" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
You can share the Custom Map style in the community by [creating an account](https://snazzymaps.com/account/register) on Snazzy Maps.
{% endhint %}
