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 yaw
number The yaw or heading in radians.
pitch
number The pitch.
roll
number 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 control
bu.control.Control The control of the control definition.
actions
Array.<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 resolution
number Minimum resolution for the feature type to be visible.
featureType
string Feature type.
-
GlobalizationEventType
-
Type of events for a
bu.Globalization
singleton.LANGUAGECHANGED: 'change:language'
Type:
- string
- Source:
- bu/enums.js
-
GlobalizationProperty
-
Properties of a
bu.language.Globalization
that 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.LayoutView
with a name.Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description name
string | undefined The name of the layout.
views
Array.<bu.LayoutView> | undefined The array of views of the layout.
-
LayoutView
-
Each of the views that compose a
bu.Layout
column 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 column
number The column for the view. First column is zero.
viewer
bu.Viewer The viewer for the view.
controls
Array.<bu.ControlDefinition> | undefined An optional array of
bu.ControlDefinition
that will be attached to the viewer.syncOptions
Array.<bu.SyncProperties> | undefined An optional array of
bu.SyncProperties
with 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 name
string | undefined Name of the project.
init_date
string | undefined Initial date.
end_date
string | undefined End date.
code
string | undefined Code of the project.
xcp
number | undefined X coordinate of center of the project in EPSG:4978 (ECEF coordinate system).
ycp
number | undefined Y coordinate of center of the project in EPSG:4978 (ECEF coordinate system).
zcp
number | undefined Z coordinate of center of the project in EPSG:4978 (ECEF coordinate system).
layer
string | undefined Name of the BlomURBEX layer.
tileset
string | 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 id
string | undefined Image ID.
positionx
number | undefined Coordinate X pixel of the last point that was requested to FindOblique service.
positiony
number | undefined Coordinate Y pixel of the last point that was requested to FindOblique service.
actual
boolean | undefined Actual.
id_dtm
string | undefined ID of DTM.
imagename
string | undefined Image name.
imagepath
string | undefined Image path.
imageext
string | undefined Image file extension.
shotlevel
string | undefined Shot level.
shottype
string | undefined Shot type.
shotorient
string | undefined Shot orientation.
shotdate
string | undefined Shot date.
gsd
number | undefined GSD.
imagerows
number | undefined Height in pixels of the image.
imagecols
number | undefined Width in pixels of the image.
ulx
number | undefined Upper left longitude.
uly
number | undefined Upper left latitude.
urx
number | undefined Upper right longitude.
ury
number | undefined Upper right latitude.
llx
number | undefined Lower left longitude.
lly
number | undefined Lower left latitude.
lrx
number | undefined Lower right longitude.
lry
number | undefined Lower right latitude.
flags
number | undefined Flags.
cameralat
number | undefined Latitude of the camera.
cameralon
number | undefined Longitude of the camera.
bearing
number | undefined Bearing.
roll
number | undefined Roll.
declin
number | undefined Declination.
alt
number | undefined Altitude.
elevation
number | undefined Elevation.
fpx
number | undefined FPx.
fpy
number | undefined FPy.
focallen
number | undefined Focal length.
k1
number | undefined K1.
k2
number | undefined K2.
k3
number | undefined K3.
ppx
number | undefined PPx.
ppy
number | undefined PPy.
camera
string | undefined Camera.
a1
number | undefined a1.
a2
number | undefined a2.
a3
number | undefined a3.
b1
number | undefined b1.
b2
number | undefined b2.
b3
number | undefined b3.
c1
number | undefined c1.
c2
number | undefined c2.
c3
number | undefined c3.
ai1
number | undefined ai1.
ai2
number | undefined ai2.
ai3
number | undefined ai3.
bi1
number | undefined bi1.
bi2
number | undefined bi2.
bi3
number | undefined bi3.
ci1
number | undefined ci1.
ci2
number | undefined ci2.
ci3
number | undefined ci3.
midpoint_x
number | undefined Midpoint longitude of the image.
midpoint_y
number | undefined Midpoint latitude of the image.
int00
number | undefined int00.
int01
number | undefined int01.
int10
number | undefined int10.
int11
number | undefined int11.
int20
number | undefined int20.
int21
number | undefined int21.
ext0
number | undefined ext0.
ext1
number | undefined ext1.
ext2
number | undefined ext2.
ext3
number | undefined ext3.
ext4
number | undefined ext4.
ext5
number | undefined ext5.
ext6
number | undefined ext6.
ext7
number | undefined ext7.
ext8
number | 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 id
string | undefined Image ID.
xcp
number | undefined Image longitude.
ycp
number | undefined Image latitude.
source_name
string | undefined Image source name.
shotDate
string | undefined Shot date.
direction_yaw
number | undefined Direction yaw.
tile_size
number | undefined Size of tiles.
zoom_levels
number | undefined Zoom levels.
min_zoom_level_size
number | undefined Number of tiles in first zoom level.
id_set
number | undefined ID of the set this image belong to.
dtmName
string | undefined Name of DTM.
dsmName
string | undefined Name of DSM.
omega
number | undefined Omega.
phi
number | undefined Phi.
kappa
number | undefined Kappa.
ext0
number | undefined Transformation param ext0.
ext1
number | undefined Transformation param ext1.
ext2
number | undefined Transformation param ext2.
ext3
number | undefined Transformation param ext3.
ext4
number | undefined Transformation param ext4.
ext5
number | undefined Transformation param ext5.
ext6
number | undefined Transformation param ext6.
ext7
number | undefined Transformation param ext7.
ext8
number | undefined Transformation param ext8.
local_xcp
number | undefined Coordinate X in local projection.
local_ycp
number | undefined Coordinate Y in local projection.
local_zcp
number | undefined Coordinate Z in local projection.
equi_img_width
number | undefined Width in pixels of the image.
column_center
number | undefined Center pixel of the image.
row_center
number | undefined CEnter row pixel of the image.
pixel_angle
number | undefined Angle per pixel or angular resolution.
srid
number | undefined SRID code of the local projection.
camera_height
number | undefined Camera height from ground.
hotspots
Array.<bu.street.Hotspot> | undefined An optional array of
bu.street.Hotspot
with 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 centerOverlay
ol.Overlay Center.
fovOverlay
ol.Overlay FOV angle.
position
bu.Coordinate Position of the lower left corner.
rotation
number Rotation.
scale
number Scale.
visible
boolean 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.2dPoint
that are tracked.X : 'x' Y : 'y'
Type:
- string
- Source:
- bu/enums.js
-
Point3D
-
Properties of a
bu.3dPoint
that 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 type
string Can be 'name' and 'link' as in GeoJSON.
properties
Object 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.Viewer
inside abu.LayoutView
. If a property is undefined then equals false.Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description syncedViewIndex
number The index of the synced viewer.
syncCenter
boolean | undefined The synced viewer will match its center with this viewer.
syncRotation
boolean | undefined The synced viewer will match its rotation with this viewer.
syncResolution
boolean | undefined The synced viewer (never a street viewer) will match its resolution with this viewer.
syncResolutionOnRange
boolean | 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.
syncFOV
boolean | undefined The synced viewer (never a street viewer) will show an overlay with the FOV of this viewer (always a street viewer).
syncOnPanoramaEvent
boolean | 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.
syncSelectedPanorama
boolean | 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 layoutId
string Layout ID.
maxAge
number Number of milliseconds for the cache data to live.
obliqueLayers
string | undefined A string with the priority in the search for oblique images.
lidarLayers
string | undefined A string with the priority in the search for LiDAR images.
geocodingProvider
string Name of the default geocoding provider.
geocodingProviders
Array.<string> | undefined Array with the list of the geocoding provider names.
routingProvider
string Name of the default routing provider.
routingProviders
Array.<string> | undefined Array with the list of routing provider names.
mapProvider
string Name of the default map overlay provider.
mapProviders
Array.<string> | undefined Array with the list of map overlay providers.
poiProvider
string | undefined Name of the default POI (points of interest) provider.
poiProviders
Array.<string> | undefined Array with the list of POIs providers names.
userToken
string User token of the user.
x
number 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.
y
number 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.
client
string Client name of the user.
login
string Login name of the user.
expDate
number Expiration date of the user.
-
UserLayer
-
User data from its own profile.
Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description name
string Name of the userlayer
description
string Userlayer description.
daterange
Array.<string> Date range for the userlayer.
layer
string A string with the layer name.
extent
ol.geom.Polygon Geometry of the layer in WKT format.
srid
string 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 type
bu.ViewerInfoType The type of information of the viewer.
metadata
string | undefined If type = METADATA then the name of metadata.
label
string | undefined Label to show before the information. Default is empty.
defaultValue
string | undefined A default string to show in case current value is null.
visible
boolean | undefined If show or not this information.
linkedToPrevious
boolean | undefined If this info will be shown only if previous is shown. Default is false.
formatFunction
function | 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 metadata
Type:
- string
- Source:
- bu/enums.js
-
ViewerOptions
-
Options for
bu.Viewer
.Type:
- Object
- Source:
- bu/typedefs.js
Properties:
Name Type Description target
Element | string | undefined The DOM target element where this viewer will be appended.
-
ViewerProperty
-
Properties of a
bu.Viewer
that 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 activated
Type:
- 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.Viewer
can 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 layout
bu.Layout | undefined The initial layout for the workspace.
controls
Array.<bu.ControlDefinition> | undefined An array of control definitions that will be added to the workspace, not attached to any viewer.
target
Element | string | undefined The DOM target element where this workspace will be appended.
-
WorkspaceProperty
-
Properties of a
bu.Workspace
that are tracked.TARGET: 'target' // Div element where we load the workspace LAYOUT: 'layout' // Layout of workspace SIZE: 'size' // Size of workspace
Type:
- string
- Source:
- bu/enums.js