hipster forever-young

typedef RView : { center: Coordinate , zoom: number }

Center and zoom level

Properties
Property Type Description
center Coordinate
zoom number
Properties
Property Type Description
center Coordinate

Center of the map

zoom number

Zoom level, 0 is the whole world, 28 is maximum resolution


class RMap

Main map component

All other components, except RStyle should be part of an RMap

Parameters
Parameter Type Description
props Readonly < RMapProps >
Properties
Property Type Description
initial RView

The initial view parameters - {center, zoom}, reset only on full component reload

view [ RView , ( view: RView ) => void ]

External view state with React semantics

className string

CSS class

width number | string

Width when not using CSS

height number | string

Height when not using CSS

noDefaultControls boolean

Do not include any default controls

default false
noDefaultInteractions boolean

Do not include any default interactions

default false
projection string

View projection

default 'ESPG:3857'
onClick ( this: RMap , e: MapBrowserEvent < UIEvent > ) => boolean | void

Called immediately on click

onSingleClick ( this: RMap , e: MapBrowserEvent < UIEvent > ) => boolean | void

Called on single click when the double click timer has expired

onDblClick ( this: RMap , e: MapBrowserEvent < UIEvent > ) => boolean | void

Called on double click

onMoveStart ( this: RMap , e: MapBrowserEvent < UIEvent > ) => boolean | void

Called when the user starts panning the map

onMoveEnd ( this: RMap , e: MapBrowserEvent < UIEvent > ) => boolean | void

Called when the user stops panning the map

onPointerDrag ( this: RMap , e: MapBrowserEvent < UIEvent > ) => boolean | void

Called on every pointer move when dragging, e.preventDefault() can be used to stop OpenLayers from also panning the map

onPointerMove ( this: RMap , e: MapBrowserEvent < UIEvent > ) => boolean | void

Called on every pointer movement, use with care

onPostRender ( this: RMap , e: MapEvent ) => boolean | void

Called after a layer has been rendered

onPreCompose ( this: RMap , e: RenderEvent ) => boolean | void

Called before layers are composed

onPostCompose ( this: RMap , e: RenderEvent ) => boolean | void

Called after layers are composed

onRenderComplete ( this: RMap , e: RenderEvent ) => boolean | void

Called after completely rendering the map

onChange ( this: RMap , e: BaseEvent ) => void

Called on every change

properties Record < string , any >

A set of properties that can be accessed later by .get()/.getProperties()

extent Extent

Extent of the map, cannot be dynamically modified

default world
minResolution number

Minimum resolution, cannot be dynamically modified

maxResolution number

Maximum resolution, cannot be dynamically modified

minZoom number

Minimum zoom level

maxZoom number

Maximum zoom level