360° Exterior Viewer

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

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.

Data Attribute
Type
Example Value
Description

id

string

carpose-exterior-viewer

Required to initalize the component

data-id

int

46649

Internal ID of the Carpose

data-offer-number

string

carpose-de

External ID of an provider like Netconnection or CarZilla

JavaScript Events

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

Event
Description

carpose-exterior-viewer-loaded

Event is thrown if the viewer was loaded successfully

carpose-exterior-viewer-failed

Event is thrown if the viewer has thrown an exception while loading. E.g. no images found or car ad itself not found

Example

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

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

CodePen

Last updated