# Google Maps integration

From version 2.6.0 we've added support for Google Maps with a new helper function and shortcode. You can achieve the same result implementing this yourselves, but the new function will make it easier.

This function is only available when showing individual job posts on your wordpress page.

First, go to the **Individual job post page** section inside the **settings** page in RecMan Jobs. Here you'll see a **Google Maps API Key** field. You need to add your Google API key here (see below on how to obtain a Google API key).

After a valid key has been added, you can simply render the map with the helper function: `job_post_map();` or by using the shortcode `[job_post_map]`.

The map will render as an embedded iFrame. There are two *optional* parameters that can be set, which is `width` and `height`. For instance `job_post_map( $width, $height);`, or `[job_post_map width="200" height="400"]`. When using the helper function you only get the content, so you need to print it out with: `echo job_post_map();`

### How to obtain Google Maps API Key

In order for Google Maps Widget to work properly, Google requires everyone to have a valid API key. The key can be quickly and easily created from the Google’s API Console.

1. Open [Google Developers Console](https://console.developers.google.com/flows/enableapi?apiid=maps_backend,geocoding_backend,static_maps_backend,maps_embed_backend\&reusekey=true) from this link
2. From the dropdown list, choose “***Create a Project***“
3. Click the “***Continue***” button and wait for a few seconds
4. You will see “***Add credentials to your project***” title -> ***click the API key link***
5. Give it a name (for example “RecMan WP key”). You will want to restrict access to your API Key to avoid having it stolen and going over your quota.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bonsy.gitbook.io/bonsay-recman-wp/job-posts/google-maps-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
