Class: ol.Map

ol.Map

new Map

Parameters:
Name Type Description
container Element Container.
mapOptionsLiteral ol.MapOptionsLiteral Map options literal.
Source:
  • map.js, line 75

Extends

Members

changed

Inherited From:
Source:
  • object.js, line 147

<protected> logger :goog.debug.Logger

Source:
  • map.js, line 84

setValues

Inherited From:
Source:
  • object.js, line 239

Methods

bindTo

Parameters:
Name Type Description
key string Key.
target ol.Object Target.
targetKey string= (Optional) Target key.
noNotify boolean= (Optional) No notify.
Inherited From:
Source:
  • object.js, line 126

canRotate

Source:
  • map.js, line 236
Returns:
Can rotate.
Type
boolean

fitExtent

Parameters:
Name Type Description
extent ol.Extent Extent.
Source:
  • map.js, line 244

fitUserExtent

Parameters:
Name Type Description
userExtent ol.Extent Extent in user projection.
Source:
  • map.js, line 260

freezeRendering

Freeze rendering.
Source:
  • map.js, line 268

get

Parameters:
Name Type Description
key string Key.
Inherited From:
Source:
  • object.js, line 154
Returns:
Value.
Type
*

getBackgroundColor

Source:
  • map.js, line 276
Returns:
Background color.
Type
ol.Color | undefined

getCenter

Source:
  • map.js, line 289
Returns:
Center.
Type
ol.Coordinate | undefined

getContainer

Source:
  • map.js, line 301
Returns:
Container.
Type
Element

getControls

Source:
  • map.js, line 309
Returns:
Controls.
Type
ol.Collection

getCoordinateFromPixel

Parameters:
Name Type Description
pixel ol.Pixel Pixel.
Source:
  • map.js, line 318
Returns:
Coordinate.
Type
ol.Coordinate

getExtent

Source:
  • map.js, line 326
Returns:
Extent.
Type
ol.Extent | undefined

getInteractions

Source:
  • map.js, line 345
Returns:
Interactions.
Type
ol.Collection

getLayers

Source:
  • map.js, line 357
Returns:
Layers.
Type
ol.Collection

getOverlayContainer

Source:
  • map.js, line 516
Returns:
The map's overlay container. Elements added to this container won't let mousedown and touchstart events through to the map, so clicks and gestures on an overlay don't trigger any MapBrowserEvent.
Type
Element

getPixelFromCoordinate

Parameters:
Name Type Description
coordinate ol.Coordinate Coordinate.
Source:
  • map.js, line 366
Returns:
Pixel.
Type
ol.Pixel | undefined

getProjection

Source:
  • map.js, line 378
Returns:
Projection.
Type
ol.Projection | undefined

getResolution

Source:
  • map.js, line 390
Returns:
Resolution.
Type
number | undefined

getResolutionForExtent

Parameters:
Name Type Description
extent ol.Extent Extent.
Source:
  • map.js, line 403
Returns:
Resolution.
Type
number | undefined

getRotatedExtent

Source:
  • map.js, line 418
Returns:
Rotated extent.
Type
ol.Extent

getRotation

Source:
  • map.js, line 443
Returns:
Rotation.
Type
number | undefined

getSize

Source:
  • map.js, line 455
Returns:
Size.
Type
ol.Size | undefined

getUserCenter

Source:
  • map.js, line 467
Returns:
Center in user projection.
Type
ol.Coordinate | undefined

getUserExtent

Source:
  • map.js, line 480
Returns:
Extent in user projection.
Type
ol.Extent | undefined

getUserProjection

Source:
  • map.js, line 493
Returns:
Projection.
Type
ol.Projection | undefined

getViewport

Source:
  • map.js, line 506
Returns:
Viewport.
Type
Element

handleBrowserEvent

Parameters:
Name Type Description
browserEvent goog.events.BrowserEvent Browser event.
type string= (Optional) Type.
Source:
  • map.js, line 525

<protected> handleBrowserWindowResize

Source:
  • map.js, line 587

handleMapBrowserEvent

Parameters:
Name Type Description
mapBrowserEvent ol.MapBrowserEvent The event to handle.
Source:
  • map.js, line 555

<protected> handleProjectionChanged

Source:
  • map.js, line 571

<protected> handleUserProjectionChanged

Source:
  • map.js, line 579

isAnimating

Source:
  • map.js, line 597
Returns:
Is animating.
Type
boolean

isDef

Source:
  • map.js, line 605
Returns:
Is defined.
Type
boolean

notify

Parameters:
Name Type Description
key string Key.
Inherited From:
Source:
  • object.js, line 175

onAnimationFrame

Source:
  • map.js, line 615

render

Render.
Source:
  • map.js, line 645

rotate

Parameters:
Name Type Description
rotation number | undefined Rotation.
delta number Delta.
Source:
  • map.js, line 684

set

Parameters:
Name Type Description
key string Key.
value * Value.
Inherited From:
Source:
  • object.js, line 202

setBackgroundColor

Parameters:
Name Type Description
backgroundColor ol.Color Background color.
Source:
  • map.js, line 693

setCenter

Parameters:
Name Type Description
center ol.Coordinate | undefined Center.
Source:
  • map.js, line 705

setInteractions

Parameters:
Name Type Description
interactions ol.Collection Interactions.
Source:
  • map.js, line 717

setLayers

Parameters:
Name Type Description
layers ol.Collection Layers.
Source:
  • map.js, line 729

setOptions

Parameters:
Name Type Description
options Object.<string, *> Options.
Inherited From:
Source:
  • object.js, line 224

setProjection

Parameters:
Name Type Description
projection ol.Projection Projection.
Source:
  • map.js, line 741

setResolution

Parameters:
Name Type Description
resolution number | undefined Resolution.
Source:
  • map.js, line 753

setRotation

Parameters:
Name Type Description
rotation number | undefined Rotation.
Source:
  • map.js, line 765

setSize

Parameters:
Name Type Description
size ol.Size Size.
Source:
  • map.js, line 777

setUserCenter

Parameters:
Name Type Description
userCenter ol.Coordinate Center in user projection.
Source:
  • map.js, line 789

setUserProjection

Parameters:
Name Type Description
userProjection ol.Projection User projection.
Source:
  • map.js, line 801

startAnimating

Start animating.
Source:
  • map.js, line 813

stopAnimating

Stop animating.
Source:
  • map.js, line 826

unbind

Parameters:
Name Type Description
key string Key.
Inherited From:
Source:
  • object.js, line 245

unbindAll

Removes all bindings.
Inherited From:
Source:
  • object.js, line 262

unfreezeRendering

Unfreeze rendering.
Source:
  • map.js, line 840

withFrozenRendering

Parameters:
Name Type Description
f function(this: T) Function.
obj T= (Optional) Object.
Source:
  • map.js, line 855

zoom

Parameters:
Name Type Description
delta number Delta from previous zoom level.
anchor ol.Coordinate= (Optional) Anchor coordinate.
Source:
  • map.js, line 892

zoomToResolution

Parameters:
Name Type Description
resolution number | undefined Resolution to go to.
anchor ol.Coordinate= (Optional) Anchor coordinate.
Source:
  • map.js, line 902