# 360° Exterior Viewer

{% code lineNumbers="true" %}

```html
<div id="carpose-exterior-viewer" data-offer-number="carpose-de"></div>
```

{% endcode %}

## HTML Attributes

The HTML snippet requires the `id` filled with the value `carpose-exterior-viewer` to initialize the component. For the mapping between the car ad on your website and Carpose its mandatory to provide at least the `data-id` or `data-offer-number` field.

<table data-full-width="false"><thead><tr><th width="192">Data Attribute</th><th width="105">Type</th><th width="209">Example Value</th><th>Description</th></tr></thead><tbody><tr><td>id</td><td><code>string</code></td><td>carpose-exterior-viewer</td><td>Required to initalize the component</td></tr><tr><td>data-id</td><td><code>int</code></td><td>46649</td><td>Internal ID of the Carpose </td></tr><tr><td>data-offer-number</td><td><code>string</code></td><td>carpose-de</td><td>External ID of an provider like Netconnection or CarZilla</td></tr></tbody></table>

## JavaScript Events

The component fires certain events for certain conditions to hook into the process.

<table><thead><tr><th width="302">Event</th><th>Description</th></tr></thead><tbody><tr><td>carpose-exterior-viewer-loaded</td><td>Event is thrown if the viewer was loaded successfully</td></tr><tr><td>carpose-exterior-viewer-failed</td><td>Event is thrown if the viewer has thrown an exception while loading. E.g. no images found or car ad itself not found</td></tr></tbody></table>

### Example

{% code lineNumbers="true" %}

```javascript
var viewer = document.getElementById('carpose-exterior-viewer');

viewer.addEventListener('carpose-exterior-viewer-loaded', function f() {
    // do whatever you want
});
```

{% endcode %}

## CodePen

{% embed url="<https://codepen.io/carpose-de/pen/jOJJqEm>" %}


---

# 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.carpose.de/angular-integration-deprecated/360-exterior-viewer.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.
