Files
openlayers/src/objectliterals.jsdoc
Éric Lemoine 04344ed184 Merge pull request #762 from elemoine/controls
Add addControl and removeControl methods to the map
2013-06-21 00:53:12 -07:00

609 lines
24 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* @typedef {Object} ol.DeviceOrientationOptions
* @property {boolean|undefined} tracking Tracking.
*/
/**
* @typedef {Object} ol.GeolocationOptions
* @property {boolean|undefined} tracking Tracking.
* @property {GeolocationPositionOptions|undefined} trackingOptions Tracking options.
* @property {ol.ProjectionLike} projection Projection.
*/
/**
* @typedef {Object} ol.GetFeatureInfoOptions
* @property {ol.Pixel} pixel Pixel coordinate relative to the map viewport.
* @property {Array.<ol.layer.Layer>|undefined} layers Layers to restrict the
* query to. All map layers will be queried if not provided.
* @property {function(Array.<string|undefined>)} success Callback for
* successful queries. The passed argument is the resulting feature
* information for each layer, with array indices being the same as in the
* passed `layers` array or in the layer collection as returned from
* `ol.Map#getLayers()` if no `layers` were provided.
* @property {function(Object)|undefined} error Callback for unsuccessful
* queries. Note that queries with no matching features trigger the success
* callback, not the error callback.
*/
/**
* @typedef {Object} ol.GetFeaturesOptions
* @property {ol.Pixel} pixel Pixel coordinate relative to the map viewport.
* @property {Array.<ol.layer.Layer>|undefined} layers Layers to restrict the
* query to. All layers will be queried if not provided.
* @property {function(Array.<Array.<ol.Feature|undefined>>)} success Callback
* for successful queries. The passed argument is the resulting features for
* each layer, with array indices being the same as in the passed `layers`
* array or in the layer collection as returned from `ol.Map#getLayers()` if
* no layers were provided.
* @property {function(Object)|undefined} error Callback for unsuccessful
* queries. Note that queries with no matching features trigger the success
* callback, not the error callback.
*/
/**
* Object literal with config options for the map.
* @typedef {Object} ol.MapOptions
* @property {ol.Collection|Array.<ol.control.Control>|undefined} controls
* Controls initially added to the map.
* @property {ol.Collection|undefined} interactions Interactions.
* @property {Array.<ol.layer.Layer>|ol.Collection|undefined} layers Layers.
* @property {ol.RendererHint|undefined} renderer Renderer.
* @property {Array.<ol.RendererHint>|undefined} renderers Renderers.
* @property {Element|string|undefined} target The container for the map.
* @property {ol.IView|undefined} view The map's view. Currently
* {@link ol.View2D} is available as view.
*/
/**
* Object literal with config options for the overlay.
* @typedef {Object} ol.OverlayOptions
* @property {Element|undefined} element The overlay element.
* @property {ol.Map|undefined} map The map to overlay onto.
* @property {ol.Coordinate|undefined} position The overlay position in map
* projection.
* @property {ol.OverlayPositioning|undefined} positioning Positioning.
*/
/**
* Object literal with config options for the Proj4js projection.
* @typedef {Object} ol.Proj4jsProjectionOptions
* @property {string} code The SRS identifier code, e.g. 'EPSG:31256'.
* @property {ol.Extent|undefined} extent The validity extent for the SRS.
* @property {boolean|undefined} global Whether the projection is valid for the
* whole globe. Default is false.
*/
/**
* Object literal with config options for the projection.
* @typedef {Object} ol.ProjectionOptions
* @property {string} code The SRS identifier code, e.g. 'EPSG:4326'.
* @property {ol.ProjectionUnits} units Units.
* @property {ol.Extent|undefined} extent The validity extent for the SRS.
* @property {string|undefined} axisOrientation The axis orientation as
* specified in Proj4. The default is 'enu'.
* @property {boolean|undefined} global Whether the projection is valid for the
* whole globe. Default is false.
*/
/**
* Object literal with config options for the view.
* @typedef {Object} ol.View2DOptions
* @property {ol.Coordinate|undefined} center The view center in map projection.
* @property {number|undefined} maxResolution The maximum resolution in map
* units per pixel.
* @property {number|undefined} maxZoom The maximum zoom level for this view.
* Zoom level 0 uses the `maxResolution`; subsequent zoom levels are
* calculated by dividing the previous resolution by `zoomFactor`.
* @property {ol.ProjectionLike} projection The map projection.
* @property {number|undefined} resolution The initial resolution for the view.
* @property {Array.<number>|undefined} resolutions The resolutions for this
* view. If configured, this is equivalent to specifying `maxResolution` and
* `maxZoom`.
* @property {number|undefined} rotation Initial rotation of the view.
* @property {number|undefined} zoom Initial zoom level of the view.
* @property {number|undefined} zoomFactor Factor to calculate resolutions for
* zoom levels. Default is 2.
*/
/**
* @typedef {Object} ol.animation.BounceOptions
* @property {number} resolution Resolution.
* @property {number|undefined} start Start.
* @property {number|undefined} duration Duration.
* @property {function(number):number|undefined} easing Easing function.
*/
/**
* @typedef {Object} ol.animation.PanOptions
* @property {ol.Coordinate} source Source.
* @property {number|undefined} start Start.
* @property {number|undefined} duration Duration.
* @property {function(number):number|undefined} easing Easing function.
*/
/**
* @typedef {Object} ol.animation.RotateOptions
* @property {number} rotation Rotation.
* @property {number|undefined} start Start.
* @property {number|undefined} duration Duration.
* @property {function(number):number|undefined} easing Easing function.
*/
/**
* @typedef {Object} ol.animation.ZoomOptions
* @property {number} resolution number Resolution.
* @property {number|undefined} start Start.
* @property {number|undefined} duration Duration.
* @property {function(number):number|undefined} easing Easing function.
*/
/**
* @typedef {Object} ol.control.AttributionOptions
* @property {string|undefined} className Class name.
* @property {ol.Map|undefined} map Map.
* @property {Element|undefined} target Target.
*/
/**
* @typedef {Object} ol.control.ControlOptions
* @property {Element|undefined} element Element.
* @property {ol.Map|undefined} map Map.
* @property {Element|undefined} target Target.
*/
/**
* @typedef {Object} ol.control.DefaultsOptions
* @property {boolean|undefined} attribution Attribution.
* @property {ol.control.AttributionOptions|undefined} attributionOptions
* Attribution options.
* @property {boolean|undefined} logo Logo.
* @property {ol.control.LogoOptions|undefined} logoOptions Logo options.
* @property {boolean|undefined} zoom Zoom.
* @property {ol.control.ZoomOptions|undefined} zoomOptions Zoom options.
*/
/**
* @typedef {Object} ol.control.FullScreenOptions
* @property {string|undefined} className Class name.
* @property {boolean|undefined} keys Full keyboard access.
* @property {ol.Map|undefined} map Map.
* @property {Element|undefined} target Target.
*/
/**
* @typedef {Object} ol.control.LogoOptions
* @property {string|undefined} className Class name.
* @property {ol.Map|undefined} map Map.
* @property {Element|undefined} target Target.
*/
/**
* @typedef {Object} ol.control.MousePositionOptions
* @property {string|undefined} className Class name.
* @property {ol.CoordinateFormatType|undefined} coordinateFormat Coordinate
* format.
* @property {ol.Map|undefined} map Map.
* @property {ol.ProjectionLike} projection Projection.
* @property {Element|undefined} target Target.
* @property {string|undefined} undefinedHTML Markup for undefined coordinates.
*/
/**
* @typedef {Object} ol.control.ScaleLineOptions
* @property {string|undefined} className Class name.
* @property {ol.Map|undefined} map Map.
* @property {number|undefined} minWidth Minimum width in pixels.
* @property {Element|undefined} target Target.
* @property {ol.control.ScaleLineUnits|undefined} units Units.
*/
/**
* @typedef {Object} ol.control.ZoomOptions
* @property {string|undefined} className Class name.
* @property {number|undefined} delta Delta.
* @property {ol.Map|undefined} map Map.
* @property {Element|undefined} target Target.
*/
/**
* @typedef {Object} ol.control.ZoomSliderOptions
* @property {string|undefined} className Class name.
* @property {ol.Map|undefined} map Map.
* @property {number|undefined} maxResolution Maximum resolution.
* @property {number|undefined} minResolution Minimum resolution.
*/
/**
* @typedef {Object} ol.interaction.DoubleClickZoomOptions
* @property {number|undefined} delta The zoom delta applied on each double
* click.
*/
/**
* @typedef {Object} ol.interaction.DragPanOptions
* @property {ol.Kinetic|undefined} kinetic Kinetic.
* @property {ol.interaction.ConditionType|undefined} condition Conditon.
*/
/**
* @typedef {Object} ol.interaction.DragRotateOptions
* @property {ol.interaction.ConditionType|undefined} condition Condition.
*/
/**
* @typedef {Object} ol.interaction.DragRotateAndZoomOptions
* @property {ol.interaction.ConditionType|undefined} condition Condition.
*/
/**
* @typedef {Object} ol.interaction.DragZoomOptions
* @property {ol.interaction.ConditionType|undefined} condition Condition.
*/
/**
* Interactions for the map. Default is true for all options.
* @typedef {Object} ol.interaction.DefaultsOptions
* @property {boolean|undefined} altShiftDragRotate Whether Alt-Shift-drag
* rotate is desired.
* @property {boolean|undefined} doubleClickZoom Whether double click zoom is
* desired.
* @property {boolean|undefined} dragPan Whether drag-pan is desired.
* @property {boolean|undefined} keyboard Whether keyboard interaction is
* desired.
* @property {boolean|undefined} mouseWheelZoom Whether mousewheel zoom is
* desired.
* @property {boolean|undefined} shiftDragZoom Whether Shift-drag zoom is
* desired.
* @property {boolean|undefined} touchPan Whether touch pan is
* desired.
* @property {boolean|undefined} touchRotate Whether touch rotate is desired.
* @property {boolean|undefined} touchZoom Whether touch zoom is desired.
* @property {number|undefined} zoomDelta Zoom delta.
*/
/**
* @typedef {Object} ol.interaction.KeyboardPanOptions
* @property {ol.interaction.ConditionType|undefined} condition Condition.
* @property {number|undefined} pixelDelta Pixel delta
*/
/**
* @typedef {Object} ol.interaction.KeyboardZoomOptions
* @property {ol.interaction.ConditionType|undefined} condition Condition.
* @property {number|undefined} delta Delta.
*/
/**
* @typedef {Object} ol.interaction.TouchPanOptions
* @property {ol.Kinetic|undefined} kinetic Kinetic.
*/
/**
* @typedef {Object} ol.interaction.TouchRotateOptions
* @property {number|undefined} threshold Minimal angle to start a rotation.
*/
/**
* @typedef {Object} ol.layer.LayerOptions
* @property {number|undefined} brightness Brightness.
* @property {number|undefined} contrast Contrast.
* @property {number|undefined} hue Hue.
* @property {number|undefined} opacity Opacity. 0-1. Default is 1.
* @property {number|undefined} saturation Saturation.
* @property {ol.source.Source} source Source for this layer.
* @property {boolean|undefined} visible Visibility. Default is true (visible).
*/
/**
* @typedef {Object} ol.layer.TileLayerOptions
* @property {number|undefined} brightness Brightness.
* @property {number|undefined} contrast Contrast.
* @property {number|undefined} hue Hue.
* @property {number|undefined} opacity Opacity. 0-1. Default is 1.
* @property {number|undefined} preload Preload.
* @property {number|undefined} saturation Saturation.
* @property {ol.source.Source} source Source for this layer.
* @property {boolean|undefined} visible Visibility. Default is true (visible).
*/
/**
* @typedef {Object} ol.layer.VectorLayerOptions
* @property {function(Array.<ol.Feature>):string|
* undefined} getTransformFeatureInfo Function to render an array of
* features into feature info markup. If not provided, a comma separated
* list of the unique ids of the resulting features will be returned.
* @property {number|undefined} opacity Opacity. 0-1. Default is 1.
* @property {ol.source.Source} source Source for this layer.
* @property {ol.style.Style|undefined} style Style.
* @property {boolean|undefined} visible Visibility. Default is true (visible).
*/
/**
* @typedef {Object} ol.parser.KMLOptions
* @property {number|undefined} dimension Create geometries with `dimension`
* dimensions. Default is 3.
* @property {boolean|undefined} extractAttributes Should we extract attributes
* from the KML? Default is `true´.
* @property {boolean|undefined} extractStyles Should we extract styles from the
* KML? Default is `false`.
* @property {number|undefined} maxDepth Maximum depth to follow network links.
* Default is 0, which means we don't follow network links at all.
* @property {Array.<string>|undefined} trackAttributes Track attributes to
* parse.
*/
/**
* @typedef {Object} ol.parser.GMLOptions
* @property {string|undefined} axisOrientation The axis orientation as
* specified in Proj4. The default is 'enu'.
* @property {boolean|undefined} curve Write gml:Curve instead of
* gml:LineString elements. This also affects the elements in multi-part
* geometries. Default is `false´. This only applies to GML version 3.
* @property {boolean|undefined} extractAttributes Should we extract attributes
* from the GML? Default is `true´.
* @property {string|undefined} featureNS The feature namespace. If not set it
* will be automatically configured from the GML.
* @property {Array.<string>|string|undefined} featureType The local
* (without prefix) feature typeName(s).
* @property {string|undefined} geometryName Name of geometry element.
* Defaults to `geometry´. If null, it will be set on <read> when the
* first geometry is parsed.
* @property {boolean|undefined} multiCurve Write gml:MultiCurve instead of
* gml:MultiLineString. Since the latter is deprecated in GML 3, the
* default is `true´. This only applies to GML version 3.
* @property {boolean|undefined} multiSurface Write gml:multiSurface instead
* of gml:MultiPolygon. Since the latter is deprecated in GML 3, the
* default is `true´. This only applies to GML version 3.
* @property {string|undefined} schemaLocation Optional schemaLocation to use
* when writing out the GML, this will override the default provided.
* @property {string|undefined} srsName URI for spatial reference system.
* This is optional for single part geometries and mandatory for
* collections and multis. If set, the srsName attribute will be written
* for all geometries. Default is null.
* @property {boolean|undefined} surface Write gml:Surface instead of
* gml:Polygon elements. This also affects the elements in multi-part
* geometries. Default is `false´. This only applies to GML version 3.
*/
/**
* @typedef {Object} ol.parser.GPXOptions
* @property {string|undefined} creator The creator attribute to be added to
* the written GPX files. Defaults to `OpenLayers´.
* @property {string|undefined} defaultDesc Default description for the
* waypoints/tracks in the case where the feature has no 'description'
* attribute. Default is 'No description available'.
* @property {boolean|undefined} extractAttributes Should we extract attributes
* from the GPX? Default is `true´.
* @property {boolean|undefined} extractWaypoints Extract waypoints from GPX.
* Default is `true´.
* @property {boolean|undefined} extractTracks Extract tracks from GPX.
* Default is `true´.
* @property {boolean|undefined} extractRoutes Extract routes from GPX.
* Default is `true´.
*/
/**
* @typedef {Object} ol.parser.GPXWriteOptions
* @property {Array.<ol.Feature>|ol.Feature} features The features to write
* out.
* @property {Object|undefined} metadata Metadata key/value pair with keys:
* name, desc and author.
*/
/**
* @typedef {Object} ol.source.BingMapsOptions
* @property {string|undefined} culture Culture.
* @property {string} key Bing Maps API key. Get yours at
* http://bingmapsportal.com/.
* @property {string} style Style.
*/
/**
* @typedef {Object} ol.source.DebugTileSourceOptions
* @property {ol.Extent|undefined} extent Extent.
* @property {ol.ProjectionLike} projection Projection.
* @property {ol.tilegrid.TileGrid|undefined} tileGrid Tile grid.
*/
/**
* @typedef {Object} ol.source.OSMOptions
* @property {ol.Attribution|undefined} attribution Attribution.
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
* @property {number|undefined} maxZoom Max zoom.
* @property {string|undefined} url URL.
*/
/**
* @typedef {Object} ol.source.SingleImageWMSOptions
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
* @property {null|string|undefined} crossOrigin crossOrigin setting for image
* requests.
* @property {ol.Extent|undefined} extent Extent.
* @property {Object.<string,*>} params WMS request parameters. At least a
* `LAYERS` param is required. `STYLES` is '' by default. `VERSION` is
* '1.3.0' by default. `WIDTH`, `HEIGHT`, `BBOX` and `CRS` (`SRS` for WMS
* version < 1.3.0) will be set dynamically.
* @property {ol.ProjectionLike} projection Projection.
* @property {number|undefined} ratio Ratio. 1 means image requests are the size
* of the map viewport, 2 means twice the size of the map viewport, and so
* on.
* @property {Array.<number>|undefined} resolutions Resolutions. If specified,
* requests will be made for these resolutions only.
* @property {string|undefined} url WMS service url.
*/
/**
* @typedef {Object} ol.source.SourceOptions
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
* @property {ol.Extent|undefined} extent Extent.
* @property {string|undefined} logo Logo.
* @property {ol.ProjectionLike} projection Projection.
*/
/**
* @typedef {Object} ol.source.StamenOptions
* @property {string} layer Layer.
* @property {number|undefined} minZoom Minimum zoom.
* @property {number|undefined} maxZoom Maximum zoom.
* @property {boolean|undefined} opaque Whether the layer is opaque.
* @property {string|undefined} url Url.
*/
/**
* @typedef {Object} ol.source.StaticImageOptions
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
* @property {null|string|undefined} crossOrigin crossOrigin setting for image
* requests.
* @property {ol.Extent|undefined} extent Extent.
* @property {ol.Extent|undefined} imageExtent Extent of the image.
* @property {ol.Size|undefined} imageSize Size of the image.
* @property {ol.ProjectionLike} projection Projection.
* @property {string|undefined} url Url.
*/
/**
* @typedef {Object} ol.source.TileJSONOptions
* @property {null|string|undefined} crossOrigin crossOriin setting for image
* requests.
* @property {string} url Url.
*/
/**
* @typedef {Object} ol.source.TiledWMSOptions
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
* @property {Object.<string,*>} params WMS request parameters. At least a
* `LAYERS` param is required. `STYLES` is '' by default. `VERSION` is
* '1.3.0' by default. `WIDTH`, `HEIGHT`, `BBOX` and `CRS` (`SRS` for WMS
* version < 1.3.0) will be set dynamically.
* @property {null|string|undefined} crossOrigin crossOrigin setting for image
* requests.
* @property {ol.Extent|undefined} extent Extent.
* @property {ol.tilegrid.TileGrid|undefined} tileGrid Tile grid.
* @property {number|undefined} maxZoom Maximum zoom.
* @property {ol.ProjectionLike} projection Projection.
* @property {string|undefined} url WMS service url.
* @property {Array.<string>|undefined} urls WMS service urls. Use this instead
* of `url` when the WMS supports multiple urls for GetMap requests.
*/
/**
* @typedef {Object} ol.source.VectorSource2Options
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
* @property {ol.Extent|undefined} extent Extent.
* @property {Array.<ol.geom2.LineStringCollection>|undefined}
* lineStringCollections Line string collections.
* @property {Array.<ol.geom2.PointCollection>|undefined} pointCollections
* Point collections.
* @property {ol.ProjectionLike} projection Projection.
*/
/**
* @typedef {Object} ol.source.WMTSOptions
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
* @property {string|null|undefined} crossOrigin crossOrigin setting for image
* requeests.
* @property {ol.Extent|undefined} extent Extent.
* @property {ol.tilegrid.WMTS} tileGrid Tile grid.
* @property {ol.ProjectionLike} projection Projection.
* @property {ol.source.WMTSRequestEncoding|undefined} requestEncoding Request
* encoding.
* @property {string} layer Layer.
* @property {string} style Style.
* @property {string|undefined} format Format.
* @property {string} matrixSet Matrix set.
* @property {Object|undefined} dimensions Dimensions.
* @property {string|undefined} url Url.
* @property {number|undefined} maxZoom Maximum zoom.
* @property {Array.<string>|undefined} urls Urls.
*/
/**
* @typedef {Object} ol.style.IconOptions
* @property {string|ol.Expression} url Icon image url.
* @property {number|ol.Expression|undefined} width Width of the icon in pixels.
* Default is the width of the icon image.
* @property {number|ol.Expression|undefined} height Height of the icon in
* pixels. Default is the height of the icon image.
* @property {number|ol.Expression|undefined} opacity Icon opacity (0-1).
* @property {number|ol.Expression|undefined} rotation Rotation in degrees
* (0-360).
*/
/**
* @typedef {Object} ol.style.LineOptions
* @property {string|ol.Expression|undefined} strokeColor Stroke color as hex
* color code.
* @property {number|ol.Expression|undefined} strokeWidth Stroke width in
* pixels.
* @property {number|ol.Expression|undefined} opacity Opacity (0-1).
*/
/**
* @typedef {Object} ol.style.PolygonOptions
* @property {string|ol.Expression|undefined} fillColor Fill color as hex color
* code.
* @property {string|ol.Expression|undefined} strokeColor Stroke color as hex
* color code.
* @property {number|ol.Expression|undefined} strokeWidth Stroke width in
* pixels.
* @property {number|ol.Expression|undefined} opacity Opacity (0-1).
*/
/**
* @typedef {Object} ol.style.RuleOptions
* @property {ol.filter.Filter|undefined} filter Filter.
* @property {Array.<ol.style.Symbolizer>|undefined} symbolizers Symbolizers.
*/
/**
* @typedef {Object} ol.style.ShapeOptions
* @property {ol.style.ShapeType|undefined} type Type.
* @property {number|ol.Expression|undefined} size Size in pixels.
* @property {string|ol.Expression|undefined} fillColor Fill color as hex color
* code.
* @property {string|ol.Expression|undefined} strokeColor Stroke color as hex
* color code.
* @property {number|ol.Expression|undefined} strokeWidth Stroke width in
* pixels.
* @property {number|ol.Expression|undefined} opacity Opacity (0-1).
*/
/**
* @typedef {Object} ol.style.StyleOptions
* @property {Array.<ol.style.Rule>} rules Rules.
*/
/**
* @typedef {Object} ol.style.TextOptions
* @property {string|ol.Expression|undefined} color Color.
* @property {string|ol.Expression|undefined} fontFamily Font family.
* @property {number|ol.Expression|undefined} fontSize Font size in pixels.
* @property {string|ol.Expression} text Text for the label.
* @property {number|ol.Expression|undefined} opacity Opacity (0-1).
*/
/**
* @typedef {Object} ol.tilegrid.TileGridOptions
* @property {number|undefined} minZoom Minimum zoom.
* @property {ol.Coordinate|undefined} origin Origin.
* @property {Array.<ol.Coordinate>|undefined} origins Origins.
* @property {!Array.<number>} resolutions Resolutions.
* @property {ol.Size|undefined} tileSize Tile size.
* @property {Array.<ol.Size>|undefined} tileSizes Tile sizes.
*/
/**
* @typedef {Object} ol.tilegrid.WMTSOptions
* @property {ol.Coordinate|undefined} origin Origin.
* @property {Array.<ol.Coordinate>|undefined} origins Origins.
* @property {!Array.<number>} resolutions Resolutions.
* @property {!Array.<string>} matrixIds matrix IDs.
* @property {ol.Size|undefined} tileSize Tile size.
* @property {Array.<ol.Size>|undefined} tileSizes Tile sizes.
*/
/**
* @typedef {Object} ol.tilegrid.XYZOptions
* @property {number} maxZoom Maximum zoom.
*/