Map orientation
To display objects on a map you can enter the latitude and longitude for the map center in the View
tab of a model. The display of maps is enabled by collecting map tiles from the OpenStreetMap server. The tiles are 256x256 images that are mapped as textures on a 3D plane.
Model
Create a new model and open the View
tab. Under latitude
and longitude
enter the coordinates of the center of the map, in this case the area around the Greenwich Observatory in London.
We can now place object on the map. First, let's display a coordinate system by entering a topic map.coordinates.axis
with a geometry
subtopic that draws an axis of 100 x 100 x 100 meters. The size of the axis match the map scale.
map.coordinates.axis.geometry=axis(100,100,100)
The x-axis is aligned with the direction of the meridians so that a positive x-translation moves an object to the south. The y-axis is aligned with the parallels so that a positive y-translation moves an object to the west. For example, to draw a cylinder 200 meters southwards of the map center you enter the following:
map.coordinates.cylinder.translation=200,0,0
map.coordinates.cylinder.geometry=color(0xFF0000);cylinder(10,100)