Layar Developer Documentation

Back to layar.com

positioning 3D model

Since version 2.2, it is possible to position a 3D model on the map directly within Layar3D model converter. A new tab called "Placement" is added to the converter. The two main features it provides are:

Place the 3D model on the map

In order to quickly find and place the 3D model at the right location, you can:

If you want to adjust the position on the map, you can also put the mouse on top of the cross sign attached to the model and move it around when the mouse handler becomes a "hand". 

Adjust the 3D model appearance

If you intent to save the position details, please check the "Save placement details" button. The following four characters can be used to adjust the appearance of the 3D model.

This will help you have a direct impression on how the model will look like in the real world.

Write the placement details into JSON file

Select "File -> Save as" or "File -> Save", a new JSON file is created for this 3d model (when "Save placement details" button is checked). An example of the JSON file is:

{ "transform": {"scale":0.2,"angle":45},

  "lon":4885612,

  "object": {"full":"rijksmuseum.l3d","size":711.32080078125},

  "lat":52360218

}

NOTE: The save JSON file is using API v5.0.

Use the placement details in your own layer CMS

The file format of the JSON placement details follows the data format of the POI response. This makes it easy to implement an import feature for your CMS.

You could also choose to add the additional JSON parameters in the saved placement file and have your POI webservice use the different JSON fragments in the POI response. Whenever you edit the 3D model/placement file using the model converter, all additional JSON parameters will be preserved.