# Google Map Widget

**General Setting**

User can change following things in Google Map widget:

* Name for widget which will be used data reference. For Example, if widget name is 'Map', then data of widget is referenced as Map.data
* Show title - User can show/hide widget title
* Title Color
* Background Color

![Configure Google Map Widget](/files/kBLZXGJq3RQhNk6a6dGJ)

**Widget Setting**

In Widget Setting option, user can change following parameters:

* Key - key parameter of JSON Object which will define location details for Google Map widget.
* Marker Color&#x20;
* Marker Type - Following marker types are available to show location on Map.
  1. CIRCLE
  2. BACKWARD CLOSED ARROW
  3. FORWARD CLOSED ARROW
  4. BACKWARD OPEN ARROW
  5. FORWARD OPEN ARROW

![Configure Google Map Widget](/files/dfNRd8hmQT2uDWmXxJQD)

#### Source <a href="#source" id="source"></a>

User can select a source mode as MQTT or Action.

**Using MQTT**

Here, to update location on Google Map user can publish JSON object on given **testData** MQTT topic. No need to provide \<account\_id> while providing the MQTT topic. The JSON object will be as below.

```
//Example 

{
"locationKey": {"lat": 15.78, "lng": 78.12}
}

// Here, 'locationKey' is key defined for Google Map widget.
```

![Configure Google Map Widget](/files/1348ihj88nqG3OuM2xhB)

**Using Action**

Here, to update the Google Map widget, output of the action should contain JSON object as given in above example. User can also update the widget either onLoad or periodically by providing refresh interval.

![Configure Google Map Widget](/files/F2s6WXOIgVnjUnUo4ahh)

#### Event Handling

Google Map widget does not support any event.

#### Example <a href="#example" id="example"></a>

If we configure Google map Widget as below:

1. key - mapKey
2. Marker type - circle
3. Marker color - red

and set source type for widget as MQTT and topic configured is 'data'. And if we publish following JSON Object over 'data' topic then Google Map Widget will look as shown in image.

```
// Data over configured MQTT Topic

{
    "mapKey": {"lat": 15.78, "lng": 78.12}
}
```

![Google Map Widget Example](/files/y72VlB9C6TnDMJZMPUYm)


---

# 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://docs.thingsup.io/widgets/google-map-widget.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.
