Geoportal Extension for Itowns API Reference

Class: Buildings

itowns.control.Buildings

Control to display buildings on the map

new Buildings(buildingsOptions)

Itowns/Controls/Buildings.js, line 32
Name Type Description
buildingsOptions Object

control options

Name Type Default Description
MNT Boolean true optional

Adds and displays the MNT

buildingsOnGround Boolean false optional

Display the buildings at their elevation or on the ground

defaultVisibility Boolean true optional

Visibility of the Buildings Layer at the initialisation

minZoom Integer 15 optional

minimum level of zoom the buildings are displayed. 15 by default. Lower is the value, lower are the performances.

Example
var buildings = new itowns.control.Buildings ({
     MNT : false,
     buildingsOnGround : false,
     target : “controlDiv”
})

Extends

Methods

inherited getElement(){HTMLElement}

Itowns/Controls/Widget.js, line 55

Return the widget's container element.

Returns:
container element.

inherited getGlobe(){Object}

Itowns/Controls/Widget.js, line 115

Get the globe associated with the widget. Undefined if the widget is not added to a globe.

inherited getOptions(){Object}

Itowns/Controls/Widget.js, line 135

Get the options associated with the widget.

inherited getPosition(){String}

Itowns/Controls/Widget.js, line 105

Return the widget's element position.

Returns:
element position.

inherited getTarget(){HTMLElement}

Itowns/Controls/Widget.js, line 85

Return the widget's target div.

Returns:
target div.

setGlobe(globe)

Itowns/Controls/Buildings.js, line 82

Bind globe to control

Name Type Description
globe GlobeViewExtended

the globe

inherited setTarget(target, position)

Itowns/Controls/Widget.js, line 66

Associates the widget to a specified target div.

Name Type Description
target HTMLElement | String

widget target div html element or target div id.

position String

html position attribute.