This is the core namespace of the API, containing basic foundation definitions
used through the rest of modules. The main clases are the Workspace,
that represent a group of viewers related, and the Viewer,
the base class for all the viewers.
This namespace contains also other util classes, as the collection classes that
add common collection functionality (LruMap,
Map, Set, WorkPool,
WorkQueue, and WorkTask).
- Source:
- bu/bu.jsdoc
Classes
- LoadingEvent
- LruMap
- LruSet
- Map
- PanoramaEvent
- PanoramaOverlays
- Set
- Viewer
- ViewerClickEvent
- ViewerMoveEvent
- WorkPool
- WorkQueue
- Workspace
- WorkTask
Namespaces
- action
- control
- format
- functions
- geocoding
- interaction
- layer
- math
- oblique
- ortho
- source
- street
- street
- threed
- time
- time
- util
Members
-
<static> Globalization :bu.language.Globalization
-
A singleton instance of
bu.language.Globalization.Type:
- Source:
- bu/globalization.js
-
<static> Hammer :bu.interaction.HammerGestures
-
A singleton instance of
bu.interaction.HammerGestures.Type:
- Source:
- bu/interaction/hammergestures.js
-
<static> SourceProxy :bu.source.Proxy
-
A singleton instance of
bu.source.Proxy.Type:
- Source:
- bu/source/sourceproxy.js
Type Definitions
-
BaselayerType
-
Type of the baselayer, one of 'ortho' for ortographic images or 'oblique' for a ortorectified mosaic of oblique images.
ORTHO: 'ortho' OBLIQUE: 'oblique'Type:
- string
- Source:
- bu/enums.js
-
BlomURBEXBaseLayer
-
BlomURBEX WMTS baselayer names. This names match WMTS GetCapabilities names and must not change or some actions will not work properly. The layer with ortho images is expected to have some properties that seamless oblique layers do not have.
ORTHO: 'BlomURBEX:ORTHO' NORTH: 'BlomURBEX:NORTH' SOUTH: 'BlomURBEX:SOUTH' EAST: 'BlomURBEX:EAST' WEST: 'BlomURBEX:WEST'Type:
- string
- Source:
- bu/enums.js
-
BlomURBEXBaseLayerType
-
Type of the baselayer, one of 'ortho' for ortographic images or 'oblique' for a ortorectified mosaic of oblique images.
ORTHO: 'ortho' OBLIQUE: 'oblique'Type:
- string
- Source:
- bu/enums.js
-
CameraOrientation
-
The angles that define the orientation of a camera. The values do not specify a given origin of angles, but usually yaw means angle with the local north and increasing eastward, pitch angle from the local east-north plane (with positive values above the plane), and roll angle about the local east axis.
Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description yawnumber The yaw or heading in radians.
pitchnumber The pitch.
rollnumber The roll.
-
ClickButton
-
Mouse button type.
RIGHT: 'right' MIDDLE: 'middle' LEFT: 'left' OTHER: 'other'Type:
- string
- Source:
- bu/enums.js
-
ClickType
-
Types of clicks with a mouse.
CLICK: 'click' DBLCLICK: 'dblclick'Type:
- string
- Source:
- bu/enums.js
-
ControlDefinition
-
The minimum setup for a control, composed of one control and an array of actions.
Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description controlbu.control.Control The control of the control definition.
actionsArray.<bu.action.Action> The actions of the control definition.
-
Coordinate
-
An array of any number of numbers representing an xy, xyz or zyzm coordinate. Example:
[16, 48],[20.50, 47.60, 1225.0],[15, 60.5, 150.6, 12].First number is always interpreted as X coordinate or longitude, second as Y or latitude, third, if exists, as Z, and fourth, if exists, as M. Fifth and following numbers are ignored because usually they do not have meaning in geographic apps.
The reference system is not provided in it, and must be known or stored in and appropiate class object.
Type:
- Array.<number>
- Source:
- bu/typedefs.js
-
Extent
-
An array of numbers representing an extent in 2D:
[minx, miny, maxx, maxy].minx and maxx values represent X or longitude coordinates.
miny and maxy values represent Y or latitude coordinates.
The reference system is not provided in it, and must be known or stored in and appropiate class object.
Type:
- Array.<number>
- Source:
- bu/typedefs.js
-
FeatureTypeResolution
-
An object defining a minimum resolution for the visibility of a given feature type name. The feature will be visible only if map resolution is above the resolution property.
Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description resolutionnumber Minimum resolution for the feature type to be visible.
featureTypestring Feature type.
-
GlobalizationEventType
-
Type of events for a
bu.Globalizationsingleton.LANGUAGECHANGED: 'change:language'Type:
- string
- Source:
- bu/enums.js
-
GlobalizationProperty
-
Properties of a
bu.language.Globalizationthat are tracked.LANGUAGE: 'language'Type:
- string
- Source:
- bu/enums.js
-
Languages
-
Languages codes.
EN: 'en', // English EN_GB: 'en-GB', // English (GB) ES: 'es', // Spanish ES_ES: 'es-ES' //Spanish (ES)Type:
- string
- Source:
- bu/enums.js
-
Layout
-
A collection of
bu.LayoutViewwith a name.Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description namestring | undefined The name of the layout.
viewsArray.<bu.LayoutView> | undefined The array of views of the layout.
-
LayoutView
-
Each of the views that compose a
bu.Layoutcolumn is the column in which the view lays. If two views must be in the same column then the value is the same.Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description columnnumber The column for the view. First column is zero.
viewerbu.Viewer The viewer for the view.
controlsArray.<bu.ControlDefinition> | undefined An optional array of
bu.ControlDefinitionthat will be attached to the viewer.syncOptionsArray.<bu.SyncProperties> | undefined An optional array of
bu.SyncPropertieswith the syncing properties of the current viewer with respect to other viewers. -
LiDARProjectMetadata
-
BlomURBEX LiDAR project metadata.
Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description namestring | undefined Name of the project.
init_datestring | undefined Initial date.
end_datestring | undefined End date.
codestring | undefined Code of the project.
xcpnumber | undefined X coordinate of center of the project in EPSG:4978 (ECEF coordinate system).
ycpnumber | undefined Y coordinate of center of the project in EPSG:4978 (ECEF coordinate system).
zcpnumber | undefined Z coordinate of center of the project in EPSG:4978 (ECEF coordinate system).
layerstring | undefined Name of the BlomURBEX layer.
tilesetstring | undefined Path to the JSON tileset.
-
LiDARProjectsFeatureTypeNames
-
Typenames of feature classes in a LiDAR projects WFS layer.
PROJECT: 'lidarproject' // This feature type name corresponds in BlomURBEX WFS services to polygons. BLOCK: 'lidarblock' // This feature type name corresponds in BlomURBEX WFS services to polygons.Type:
- string
- Source:
- bu/enums.js
-
ObliqueMetadata
-
Oblique image metadata for oblique viewers.
Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description idstring | undefined Image ID.
positionxnumber | undefined Coordinate X pixel of the last point that was requested to FindOblique service.
positionynumber | undefined Coordinate Y pixel of the last point that was requested to FindOblique service.
actualboolean | undefined Actual.
id_dtmstring | undefined ID of DTM.
imagenamestring | undefined Image name.
imagepathstring | undefined Image path.
imageextstring | undefined Image file extension.
shotlevelstring | undefined Shot level.
shottypestring | undefined Shot type.
shotorientstring | undefined Shot orientation.
shotdatestring | undefined Shot date.
gsdnumber | undefined GSD.
imagerowsnumber | undefined Height in pixels of the image.
imagecolsnumber | undefined Width in pixels of the image.
ulxnumber | undefined Upper left longitude.
ulynumber | undefined Upper left latitude.
urxnumber | undefined Upper right longitude.
urynumber | undefined Upper right latitude.
llxnumber | undefined Lower left longitude.
llynumber | undefined Lower left latitude.
lrxnumber | undefined Lower right longitude.
lrynumber | undefined Lower right latitude.
flagsnumber | undefined Flags.
cameralatnumber | undefined Latitude of the camera.
cameralonnumber | undefined Longitude of the camera.
bearingnumber | undefined Bearing.
rollnumber | undefined Roll.
declinnumber | undefined Declination.
altnumber | undefined Altitude.
elevationnumber | undefined Elevation.
fpxnumber | undefined FPx.
fpynumber | undefined FPy.
focallennumber | undefined Focal length.
k1number | undefined K1.
k2number | undefined K2.
k3number | undefined K3.
ppxnumber | undefined PPx.
ppynumber | undefined PPy.
camerastring | undefined Camera.
a1number | undefined a1.
a2number | undefined a2.
a3number | undefined a3.
b1number | undefined b1.
b2number | undefined b2.
b3number | undefined b3.
c1number | undefined c1.
c2number | undefined c2.
c3number | undefined c3.
ai1number | undefined ai1.
ai2number | undefined ai2.
ai3number | undefined ai3.
bi1number | undefined bi1.
bi2number | undefined bi2.
bi3number | undefined bi3.
ci1number | undefined ci1.
ci2number | undefined ci2.
ci3number | undefined ci3.
midpoint_xnumber | undefined Midpoint longitude of the image.
midpoint_ynumber | undefined Midpoint latitude of the image.
int00number | undefined int00.
int01number | undefined int01.
int10number | undefined int10.
int11number | undefined int11.
int20number | undefined int20.
int21number | undefined int21.
ext0number | undefined ext0.
ext1number | undefined ext1.
ext2number | undefined ext2.
ext3number | undefined ext3.
ext4number | undefined ext4.
ext5number | undefined ext5.
ext6number | undefined ext6.
ext7number | undefined ext7.
ext8number | undefined ext8.
-
Orientation
-
Orientation of the baselayer, one of 'ortho', 'north', 'south', 'east' or 'west'. ortho value has no meaning in oblique or panorama views.
ORTHO: 'ortho' NORTH: 'north' SOUTH: 'south' EAST: 'east' WEST: 'west'Type:
- string
- Source:
- bu/enums.js
-
PanoramaMetadata
-
Panorame image metadata for a street viewer.
Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description idstring | undefined Image ID.
xcpnumber | undefined Image longitude.
ycpnumber | undefined Image latitude.
source_namestring | undefined Image source name.
shotDatestring | undefined Shot date.
direction_yawnumber | undefined Direction yaw.
tile_sizenumber | undefined Size of tiles.
zoom_levelsnumber | undefined Zoom levels.
min_zoom_level_sizenumber | undefined Number of tiles in first zoom level.
id_setnumber | undefined ID of the set this image belong to.
dtmNamestring | undefined Name of DTM.
dsmNamestring | undefined Name of DSM.
omeganumber | undefined Omega.
phinumber | undefined Phi.
kappanumber | undefined Kappa.
ext0number | undefined Transformation param ext0.
ext1number | undefined Transformation param ext1.
ext2number | undefined Transformation param ext2.
ext3number | undefined Transformation param ext3.
ext4number | undefined Transformation param ext4.
ext5number | undefined Transformation param ext5.
ext6number | undefined Transformation param ext6.
ext7number | undefined Transformation param ext7.
ext8number | undefined Transformation param ext8.
local_xcpnumber | undefined Coordinate X in local projection.
local_ycpnumber | undefined Coordinate Y in local projection.
local_zcpnumber | undefined Coordinate Z in local projection.
equi_img_widthnumber | undefined Width in pixels of the image.
column_centernumber | undefined Center pixel of the image.
row_centernumber | undefined CEnter row pixel of the image.
pixel_anglenumber | undefined Angle per pixel or angular resolution.
sridnumber | undefined SRID code of the local projection.
camera_heightnumber | undefined Camera height from ground.
hotspotsArray.<bu.street.Hotspot> | undefined An optional array of
bu.street.Hotspotwith the hot spots in the image. -
PanoramaOverlay
-
Object that stores info to overlay a Panorama position and rotation.
Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description centerOverlayol.Overlay Center.
fovOverlayol.Overlay FOV angle.
positionbu.Coordinate Position of the lower left corner.
rotationnumber Rotation.
scalenumber Scale.
visibleboolean If visible or not.
-
PanoramasFeatureTypeNames
-
Typenames of feature classes in a Panoramas WFS layer.
PANORAMAS_POINTS: 'panorama' // This feature type name corresponds in BlomURBEX WFS services to points. PANORAMAS_LINES: 'street_line' // This feature type name corresponds in BlomURBEX WFS services to lines. PANORAMAS_POLYGONS: 'street_project' // This feature type name corresponds in BlomURBEX WFS services to polygons.Type:
- string
- Source:
- bu/enums.js
-
Point2D
-
Properties of a
bu.2dPointthat are tracked.X : 'x' Y : 'y'Type:
- string
- Source:
- bu/enums.js
-
Point3D
-
Properties of a
bu.3dPointthat are tracked.X : 'x' Y : 'y' Z : 'z'Type:
- string
- Source:
- bu/enums.js
-
ProjectionInfo
-
Projection info following GeoJSON specs. This object matches the crs member.
http://wiki.geojson.org/GeoJSON_draft_version_6
Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description typestring Can be 'name' and 'link' as in GeoJSON.
propertiesObject If type is name then an object {name: (string)}. If type is link then an object {href: (string), type: (string)} or an object {content: (string), type: (string)}. For content the value can be any PROJ4, OGCWKT or ESRIWKT string directly in the object instead of a href. For type inside properties values should be: 'proj4', 'ogcwkt', 'esriwkt'.
-
Size
-
An array of numbers representing a size:
[width, height].Type:
- Array.<number>
- Source:
- bu/typedefs.js
-
SyncProperties
-
Syncing properties for a
bu.Viewerinside abu.LayoutView. If a property is undefined then equals false.Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description syncedViewIndexnumber The index of the synced viewer.
syncCenterboolean | undefined The synced viewer will match its center with this viewer.
syncRotationboolean | undefined The synced viewer will match its rotation with this viewer.
syncResolutionboolean | undefined The synced viewer (never a street viewer) will match its resolution with this viewer.
syncResolutionOnRangeboolean | undefined This option only works for ortho and oblique viewers as a replacement previous property. This flag signals that ortho viewer only will sync its resolution when is inside the range of min and max resolutions of the oblique viewer.
syncFOVboolean | undefined The synced viewer (never a street viewer) will show an overlay with the FOV of this viewer (always a street viewer).
syncOnPanoramaEventboolean | undefined The synced viewer (always a street viewer) will try to open a new panorama when this viewer (never a street viewer) clicks on a panorama feature.
syncSelectedPanoramaboolean | undefined The synced viewer (never a street viewer) will show the selected panorama of this viewer (always a street viewer) if the panorama layer is available.
-
SyncType
-
Types of synchronizations.
CENTER: 'center' ROTATION: 'rotation' RESOLUTION: 'resolution' RESOLUTIONONRANGE: 'resolutiononrange' FOV: 'fov' ONPANORAMAEVENT: 'onpanoramaevent' SELECTEDPANORAMA: 'selectedpanorama'Type:
- string
- Source:
- bu/enums.js
-
TimerEventType
-
Types of events for a timer.
TIMEOUT: 'timeout' // Triggered when a Timer has entered timeout.Type:
- string
- Source:
- bu/enums.js
-
UserData
-
User data from its own profile.
Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description layoutIdstring Layout ID.
maxAgenumber Number of milliseconds for the cache data to live.
obliqueLayersstring | undefined A string with the priority in the search for oblique images.
lidarLayersstring | undefined A string with the priority in the search for LiDAR images.
geocodingProviderstring Name of the default geocoding provider.
geocodingProvidersArray.<string> | undefined Array with the list of the geocoding provider names.
routingProviderstring Name of the default routing provider.
routingProvidersArray.<string> | undefined Array with the list of routing provider names.
mapProviderstring Name of the default map overlay provider.
mapProvidersArray.<string> | undefined Array with the list of map overlay providers.
poiProviderstring | undefined Name of the default POI (points of interest) provider.
poiProvidersArray.<string> | undefined Array with the list of POIs providers names.
userTokenstring User token of the user.
xnumber Default x coordinate for the user. Be aware that this coordinates are always stored in the server in Spherical Mercator projection (EPSG: 3857), so there is a need to reproject this coordinate using ol.proj.toLonLat.
ynumber Default y coordinate for the user. Be aware that this coordinates are always stored in the server in Spherical Mercator projection (EPSG: 3857), so there is a need to reproject this coordinate using ol.proj.toLonLat.
clientstring Client name of the user.
loginstring Login name of the user.
expDatenumber Expiration date of the user.
-
UserLayer
-
User data from its own profile.
Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description namestring Name of the userlayer
descriptionstring Userlayer description.
daterangeArray.<string> Date range for the userlayer.
layerstring A string with the layer name.
extentol.geom.Polygon Geometry of the layer in WKT format.
sridstring A string with the EPSG code.
-
ViewerEventType
-
Types of events for a
bu.Viewer.TARGETCHANGED: 'change:target' // Triggered when a viewer changes its target. SIZECHANGED: 'change:size' // Triggered when a viewer changes its size. TIMECHANGED: 'change:time' // Triggered when a viewer changes its time. DEBUGMODECHANGED: 'change:debugmode' // Triggered when a viewer changes its // debug mode. DEBUGGRIDCHANGED: 'change:debuggrid' // Triggered when a viewer changes its // debug grid visibility POSTRENDER: 'postrender' // Triggered when the last rendering has ended. MOVESTART: 'movestart //Triggered when a viewer starts a change in any property // that modifies its current view MOVEEND: 'moveend' // Triggered when a viewer finalizes the change in any // property that modifies its current view. METADATALOADED: 'metadataloaded' // Triggered when a viewer recives metadata // for a content shown in the viewer. STARTPROCCESSING: 'startproccessing' // Triggered when a viewer starts a long operation // that requires a message to be shown. ENDPROCCESSING: 'endproccessing' // Triggered when a viewer ends a long operation that // requires a message to be hidden. ATTRIBUTIONSCHANGED: 'attributionschanged' // Triggered when attributions change // in a viewer. Usually a viewer can change its attributions so some many times // that the better event type to check for changes is POSTRENDER event. A street // viewer, on the opposite, changes attributions very few times, so this event is // prefered. SINGLECLICK: 'singleclick' // A true single click with no dragging and no double // click. Note that this event is delayed by 250 ms to ensure that it is not a // double click.Type:
- string
- Source:
- bu/enums.js
-
ViewerInfoOption
-
An option for visualizing information of a viewer.
Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description typebu.ViewerInfoType The type of information of the viewer.
metadatastring | undefined If type = METADATA then the name of metadata.
labelstring | undefined Label to show before the information. Default is empty.
defaultValuestring | undefined A default string to show in case current value is null.
visibleboolean | undefined If show or not this information.
linkedToPreviousboolean | undefined If this info will be shown only if previous is shown. Default is false.
formatFunctionfunction | undefined Any function that receives some params and return a string for a final formatting of the info.
-
ViewerInfoType
-
Types of information we can visualize of any viewer.
SEPARATOR: 'separator' MOUSEPOSITION: 'mouseposition' CENTER: 'center' ZOOM: 'zoom' RESOLUTION: 'resolution' ROTATION: 'rotation' PROJECTION: 'projection' FOV: 'fov' YAW: 'yaw' PITCH: 'pitch' ROLL: 'roll' METADATA: 'metadata' // This includes ImageID and any other kind of metadataType:
- string
- Source:
- bu/enums.js
-
ViewerOptions
-
Options for
bu.Viewer.Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description targetElement | string | undefined The DOM target element where this viewer will be appended.
-
ViewerProperty
-
Properties of a
bu.Viewerthat are tracked.TARGET: 'target' // Div element where viewer is loaded SIZE: 'size' // Size of the div where viewer is loaded TIME: 'time' // Time range for BlomURBEX services DEBUGMODE: 'debugmode' // If use a debug mode with the viewer or not DEBUGGRID: 'debuggrid' // If show a debug grid when debug mode is activatedType:
- string
- Source:
- bu/enums.js
-
ViewerState
-
States of a
bu.Viewer.IDLE: 'idle' // The viewer is in the idle or normal state INTERACTING: 'interacting' // The user is interacting with the viewer ANIMATING: 'animating' // An animation is on progress REQUESTING: 'requesting' // For viewers that load discrete images, as oblique // or street viewers, when they are requesting info for loading the next image. LOADING: 'loading' // For viewers that load discrete images, as oblique or street viewers, // when they are loading anew image.Type:
- string
- Source:
- bu/enums.js
-
ViewType
-
Types of views that a
bu.Viewercan contain.EMPTY: 'empty' ORTHO: 'ortho' STREET: 'street' VIEW3D: 'view3d' OBLIQUE: 'oblique' TABLE: 'table'Type:
- string
- Source:
- bu/enums.js
-
WorkspaceEventType
-
Types of events for a
bu.Workspace.TARGETCHANGED: 'change:target' LAYOUTCHANGED: 'change:layout' SIZECHANGED: 'change:size'Type:
- string
- Source:
- bu/enums.js
-
WorkspaceOptions
-
Options for
bu.Workspace.Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description layoutbu.Layout | undefined The initial layout for the workspace.
controlsArray.<bu.ControlDefinition> | undefined An array of control definitions that will be added to the workspace, not attached to any viewer.
targetElement | string | undefined The DOM target element where this workspace will be appended.
-
WorkspaceProperty
-
Properties of a
bu.Workspacethat are tracked.TARGET: 'target' // Div element where we load the workspace LAYOUT: 'layout' // Layout of workspace SIZE: 'size' // Size of workspaceType:
- string
- Source:
- bu/enums.js
Javascript API 7.x