@react-gis/openlayerslayer

graticule-layer

Functions

GraticuleLayer()

function GraticuleLayer(props: GraticuleLayerProps): null;

Defined in: packages/openlayers/src/layer/graticule-layer.tsx:11

Parameters

ParameterType
propsGraticuleLayerProps

Returns

null

Interfaces

GraticuleLayerProps

Defined in: packages/openlayers/src/layer/graticule-layer.tsx:9

Extends

Properties

PropertyTypeDescriptionInherited from
className?stringA CSS class name to set to the layer element.LayerOptions.className
extent?ExtentThe bounding extent for layer rendering. The layer will not be rendered outside of this extent.LayerOptions.extent
intervals?number[]Intervals (in degrees) for the graticule. Example to limit graticules to 30 and 10 degrees intervals: [30, 10]LayerOptions.intervals
latLabelFormatter?(arg0: number) => stringLabel formatter for latitudes. This function is called with the latitude as argument, and should return a formatted string representing the latitude. By default, labels are formatted as degrees, minutes, seconds and hemisphere.LayerOptions.latLabelFormatter
latLabelPosition?numberLatitude label position in fractions (0..1) of view extent. 0 means at the left of the viewport, 1 means at the right.LayerOptions.latLabelPosition
latLabelStyle?TextLatitude label text style. If not provided, the following style will be used: new Text({ font: '12px Calibri,sans-serif', textAlign: 'end', fill: new Fill({ color: 'rgba(0,0,0,1)' }), stroke: Stroke({ color: 'rgba(255,255,255,1)', width: 3 }) }); Note that the default's textAlign configuration will not work well for latLabelPosition configurations that position labels close to the left of the viewport.LayerOptions.latLabelStyle
lonLabelFormatter?(arg0: number) => stringLabel formatter for longitudes. This function is called with the longitude as argument, and should return a formatted string representing the longitude. By default, labels are formatted as degrees, minutes, seconds and hemisphere.LayerOptions.lonLabelFormatter
lonLabelPosition?numberLongitude label position in fractions (0..1) of view extent. 0 means at the bottom of the viewport, 1 means at the top.LayerOptions.lonLabelPosition
lonLabelStyle?TextLongitude label text style. If not provided, the following style will be used: new Text({ font: '12px Calibri,sans-serif', textBaseline: 'bottom', fill: new Fill({ color: 'rgba(0,0,0,1)' }), stroke: new Stroke({ color: 'rgba(255,255,255,1)', width: 3 }) }); Note that the default's textBaseline configuration will not work well for lonLabelPosition configurations that position labels close to the top of the viewport.LayerOptions.lonLabelStyle
maxLines?numberThe maximum number of meridians and parallels from the center of the map. The default value of 100 means that at most 200 meridians and 200 parallels will be displayed. The default value is appropriate for conformal projections like Spherical Mercator. If you increase the value, more lines will be drawn and the drawing performance will decrease.LayerOptions.maxLines
maxResolution?numberThe maximum resolution (exclusive) below which this layer will be visible.LayerOptions.maxResolution
maxZoom?numberThe maximum view zoom level (inclusive) at which this layer will be visible.LayerOptions.maxZoom
minResolution?numberThe minimum resolution (inclusive) at which this layer will be visible.LayerOptions.minResolution
minZoom?numberThe minimum view zoom level (exclusive) above which this layer will be visible.LayerOptions.minZoom
namestring-LayerOptions.name
opacity?numberOpacity (0, 1).LayerOptions.opacity
properties?{ [x: string]: any; }Arbitrary observable properties. Can be accessed with #get() and #set().LayerOptions.properties
showLabels?booleanRender a label with the respective latitude/longitude for each graticule line.LayerOptions.showLabels
strokeStyle?StrokeThe stroke style to use for drawing the graticule. If not provided, the following stroke will be used: new Stroke({ color: 'rgba(0, 0, 0, 0.2)' // a not fully opaque black });LayerOptions.strokeStyle
targetSize?numberThe target size of the graticule cells, in pixels.LayerOptions.targetSize
visible?booleanVisibility.LayerOptions.visible
wrapX?booleanWhether to repeat the graticule horizontally.LayerOptions.wrapX
zIndex?numberThe z-index for layer rendering. At rendering time, the layers will be ordered, first by Z-index and then by position. When undefined, a zIndex of 0 is assumed for layers that are added to the map's layers collection, or Infinity when the layer's setMap() method was used.LayerOptions.zIndex