Skip to content

Commit

Permalink
Merge pull request openlayers#3859 from llambanna/patch-2
Browse files Browse the repository at this point in the history
Add in crossOrigin option
  • Loading branch information
bartvde committed Jul 6, 2015
2 parents 38fa805 + 1d3f8b5 commit a62bbd6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
20 changes: 19 additions & 1 deletion externs/olx.js
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,7 @@ olx.ProjectionOptions.prototype.global;
*/
olx.ProjectionOptions.prototype.worldExtent;


/**
* Function to determine resolution at a point. The function is called with a
* `{number}` view resolution and an `{ol.Coordinate}` as arguments, and returns
Expand Down Expand Up @@ -912,6 +913,7 @@ olx.control.AttributionOptions.prototype.tipLabel;
*/
olx.control.AttributionOptions.prototype.label;


/**
* Text label to use for the expanded attributions button. Default is `»`.
* Instead of text, also a Node (e.g. a `span` element) can be used.
Expand Down Expand Up @@ -2829,6 +2831,7 @@ olx.interaction.SelectOptions.prototype.removeCondition;
*/
olx.interaction.SelectOptions.prototype.toggleCondition;


/**
* A boolean that determines if the default behaviour should select only
* single features or all (overlapping) features at the clicked map
Expand All @@ -2838,6 +2841,7 @@ olx.interaction.SelectOptions.prototype.toggleCondition;
*/
olx.interaction.SelectOptions.prototype.multi;


/**
* A function that takes an {@link ol.Feature} and an {@link ol.layer.Layer} and
* returns `true` if the feature may be selected or `false` otherwise.
Expand Down Expand Up @@ -4195,7 +4199,6 @@ olx.source.ImageMapGuideOptions.prototype.ratio;
olx.source.ImageMapGuideOptions.prototype.resolutions;



/**
* Optional function to load an image given a URL.
* @type {ol.TileLoadFunctionType|undefined}
Expand Down Expand Up @@ -4754,6 +4757,7 @@ olx.source.ImageStaticOptions.prototype.url;

/**
* @typedef {{attributions: (Array.<ol.Attribution>|undefined),
* crossOrigin: (null|string|undefined),
* params: (Object.<string, *>|undefined),
* logo: (string|olx.LogoOptions|undefined),
* tileGrid: (ol.tilegrid.TileGrid|undefined),
Expand All @@ -4766,6 +4770,7 @@ olx.source.ImageStaticOptions.prototype.url;
*/
olx.source.TileArcGISRestOptions;


/**
* Attributions.
* @type {Array.<ol.Attribution>|undefined}
Expand All @@ -4774,6 +4779,18 @@ olx.source.TileArcGISRestOptions;
olx.source.TileArcGISRestOptions.prototype.attributions;


/**
* The `crossOrigin` attribute for loaded images. Note that you must provide a
* `crossOrigin` value if you are using the WebGL renderer or if you want to
* access pixel data with the Canvas renderer. See
* {@link https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image}
* for more detail.
* @type {null|string|undefined}
* @api
*/
olx.source.TileArcGISRestOptions.prototype.crossOrigin;


/**
* ArcGIS Rest parameters. This field is optional. Service defaults will be
* used for any fields not specified. `FORMAT` is `PNG32` by default. `F` is `IMAGE` by
Expand Down Expand Up @@ -4807,6 +4824,7 @@ olx.source.TileArcGISRestOptions.prototype.logo;
*/
olx.source.TileArcGISRestOptions.prototype.tileGrid;


/**
* Projection.
* @type {ol.proj.ProjectionLike}
Expand Down
1 change: 1 addition & 0 deletions src/ol/source/tilearcgisrestsource.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ ol.source.TileArcGISRest = function(opt_options) {

goog.base(this, {
attributions: options.attributions,
crossOrigin: options.crossOrigin,
logo: options.logo,
projection: options.projection,
tileGrid: options.tileGrid,
Expand Down

0 comments on commit a62bbd6

Please sign in to comment.