> For the complete documentation index, see [llms.txt](https://dev.pointr.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev.pointr.tech/v9/features/indoor-location-blue-dot/show-a-blue-dot/mapwidget-joystick.md).

# MapWidget Joystick

There are two ways to simulate a user position:

* [Simulating a Beacon](https://dev.pointr.tech/v9/features/indoor-location-blue-dot/show-a-blue-dot.md)
* [MapWidget Joystick](https://dev.pointr.tech/v9/features/indoor-location-blue-dot/show-a-blue-dot/mapwidget-joystick.md#mapwidget-joystick)

This guide explains how to simulate a user position using the MapWidget Joystick in the Mobile SDK for debugging or testing when you are not on the actual site.

***

## MapWidget Joystick <a href="#mapwidget-joystick" id="mapwidget-joystick"></a>

MapWidget Joystick is a custom UI element available within the Pointr Mobile SDK  to let you test wayfinding and general site navigation features without physically being on site.&#x20;

{% hint style="warning" %}
Please note that the MapWidget Joystick is available only if you are using Pointr's MapWidget.&#x20;
{% endhint %}

**To enable the joystick, set the `isJoystickEnabled` field to true;**

{% tabs %}
{% tab title="iOS" %}

```swift
let configuration = PTRMapWidgetConfiguration()
configuration.isJoystickEnabled = true
let mapWidget = PTRMapWidgetViewController(configuration: configuration)
```

<figure><img src="https://content.gitbook.com/content/jgeYeKrK9Emf57ofXXap/blobs/5aJjO1GTb2cSnlVW3CDa/msdktesting-2.png" alt="MapWidget Joystick UI in iOS"><figcaption><p>MapWidget Joystick UI in iOS</p></figcaption></figure>

Once enabled, MapWidget Joystick appears at the bottom of the map interface as shown above. Use the joystick to move the user dot around the map and press the buttons to navigate the space.

### Button functions&#x20;

<table><thead><tr><th width="97.7265625" align="center">Button</th><th width="313.53515625">Function</th><th>Notes</th></tr></thead><tbody><tr><td align="center"><kbd>UP</kbd></td><td>Moves the indoor position up one floor. (e.g. Level 3 to Level 4)</td><td></td></tr><tr><td align="center"><kbd>DW</kbd></td><td>Moves the indoor position down one floor. (e.g. Level 3 to Level 2)</td><td></td></tr><tr><td align="center"><kbd>RL</kbd></td><td>Rotates the blue dot's orientation to the left.</td><td></td></tr><tr><td align="center"><kbd>RR</kbd></td><td>Rotates the blue dot's orientation to the right.</td><td></td></tr><tr><td align="center"><kbd>CB</kbd></td><td>Opens a dialog to move the blue dot to a different building.</td><td>The IND button can also be used to switch buildings.</td></tr><tr><td align="center"><kbd>RE</kbd></td><td>Resets the blue dot's orientation</td><td></td></tr><tr><td align="center"><kbd>GPS</kbd></td><td>Simulates outdoor position. The outdoor blue dot appears in the center of the map when pressed.</td><td>To change the outdoor position, simply drag the map or switch level and click on the button again.</td></tr><tr><td align="center"><kbd>IND</kbd></td><td>Simulates indoor position. The indoor blue dot appears in the center of the map when pressed.</td><td>To change the indoor position, simply drag the map or switch level and click on the button again.</td></tr></tbody></table>
{% endtab %}

{% tab title="Android" %}

```kotlin
mapWidgetFragment.mapFragment!!.isJoystickEnabled = true
???
pointrMapWidget = PTRMapWidgetFragment.newInstance(ptrMapWidgetConfiguration).show(supportFragmentManager, R.id.fragment_container)
pointrMapWidget.getMapFragment()!!.setJoystickEnabled(true)
```

<figure><img src="https://content.gitbook.com/content/jgeYeKrK9Emf57ofXXap/blobs/itZvRUlnm4c8ItFyl7h1/msdktesting-1.png" alt=""><figcaption><p>MapWidget Joystick UI in Android</p></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/jgeYeKrK9Emf57ofXXap/blobs/JUfGR7usRqqlQY8QdG7X/android-joystick-indoor-position.gif" alt="" width="329"><figcaption></figcaption></figure>

Once enabled, MapWidget Joystick appears at the bottom of the map interface as shown above. Use the joystick to move the user dot around the map and press the buttons to navigate the space.

### Button functions

<table><thead><tr><th width="93.4453125" align="center">Button</th><th width="310.03515625">Function</th><th>Notes</th></tr></thead><tbody><tr><td align="center"><kbd>L</kbd></td><td>Opens a dialog to select a level within the current building.</td><td></td></tr><tr><td align="center"><kbd>B</kbd></td><td>Opens a dialog to select a different building.</td><td></td></tr><tr><td align="center"><kbd>S</kbd></td><td>Opens a dialog to select a different site.</td><td></td></tr><tr><td align="center"><kbd>GPS</kbd></td><td>Simulates outdoor position. The outdoor blue dot appears in the center of the map when pressed.</td><td>To change the outdoor position, simply drag the map or switch level and click on the button again.</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

{% hint style="info" %}
You can easily switch between indoor and outdoor positions using the joystick. This is especially useful when testing scenarios like entering or exiting a building and site-wide wayfinding.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://dev.pointr.tech/v9/features/indoor-location-blue-dot/show-a-blue-dot/mapwidget-joystick.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
