Compare commits

...

25 Commits

Author SHA1 Message Date
Andreas Hocevar
1038b2abea Update package version to v3.16.0 2016-05-23 20:49:32 +02:00
Andreas Hocevar
e0cada9c5d Changelog for v3.16.0 2016-05-23 20:49:05 +02:00
Frédéric Junod
7196e18479 Merge pull request #5377 from fredj/jspdf.min.js
Fix link to jspdf.min.js in export-pdf example
2016-05-23 11:23:03 +02:00
Frederic Junod
e70ce9d624 Fix link to jspdf.min.js in export-pdf example 2016-05-23 10:57:19 +02:00
Frédéric Junod
0efb3994eb Merge pull request #5372 from openlayers/greenkeeper-jquery-2.2.4
Update jquery to version 2.2.4 🚀
2016-05-23 08:36:03 +02:00
greenkeeperio-bot
d666bb4a36 chore(package): update jquery to version 2.2.4
https://greenkeeper.io/
2016-05-20 11:32:25 -06:00
Tim Schaub
50408d7c1a Merge pull request #5364 from tschaub/less-flashy
Make it so things don't flash so much when you change the tile source URL.
2016-05-19 09:26:42 -06:00
Tim Schaub
d50082b860 Upgrade note regarding tile rendering 2016-05-19 09:17:23 -06:00
Tim Schaub
ac4653ada5 Tests for source.setKey() 2016-05-19 09:09:52 -06:00
Tim Schaub
feb6fe9dce Tests for setUrl() and setUrls() 2016-05-19 09:09:52 -06:00
Tim Schaub
b2b902e22f Less weird name 2016-05-19 09:09:52 -06:00
Tim Schaub
6f5965f6a5 Demonstrate how source.setUrl() works 2016-05-19 09:09:52 -06:00
Tim Schaub
9870e8c04c Allow XYZ source construction without options 2016-05-19 09:09:52 -06:00
Tim Schaub
5542f045d5 Less special handling for WMTS tiles 2016-05-19 09:09:52 -06:00
Tim Schaub
025c063251 Less special handling for WMS tiles 2016-05-19 09:09:52 -06:00
Tim Schaub
841c8a5747 Rename source.getKeyParams() to source.getKey() 2016-05-19 09:09:52 -06:00
Tim Schaub
81d5849207 Add a settable key for all tile sources
The source's key is used as the key for all tiles in the source.  For URL tile sources, the URL is the key.
2016-05-19 09:09:52 -06:00
Andreas Hocevar
bbd1af6056 Merge pull request #5368 from probins/wfs
Move WFS typedefs to typedefs.js
2016-05-19 14:52:54 +02:00
Frédéric Junod
e3f58b3e84 Merge pull request #5369 from Turbo87/patch-2
format/igc: Remove duplicate regex exec() call
2016-05-19 14:48:08 +02:00
Tobias Bieniek
d52586d586 format/igc: Remove duplicate regex exec() call
HFDTE_RECORD_RE_.exec(line) has already been called above
2016-05-19 14:35:15 +02:00
Peter Robins
4044ae4cd0 Move WFS typedefs to typedefs.js
By renaming them so they're no longer in any subnamespaces, they no longer need to be in their own file.
2016-05-19 08:48:43 +00:00
Andreas Hocevar
be2fc808be Merge pull request #5363 from probins/camels
Convert all typedefs to CamelCase
2016-05-19 09:12:38 +02:00
Frédéric Junod
d08cca5a0c Merge pull request #5362 from openlayers/greenkeeper-vector-tile-1.2.1
Update vector-tile to version 1.2.1 🚀
2016-05-19 08:31:37 +02:00
Peter Robins
2117f2e3b1 Convert all typedefs to CamelCase 2016-05-18 19:44:45 +00:00
greenkeeperio-bot
1345d049b1 chore(package): update vector-tile to version 1.2.1
https://greenkeeper.io/
2016-05-18 12:58:43 -06:00
40 changed files with 724 additions and 432 deletions

View File

@@ -1,8 +1,17 @@
## Upgrade notes
### v3.16.0
#### Rendering change for tile sources
Previously, if you called `source.setUrl()` on a tile source, all currently rendered tiles would be cleared before new tiles were loaded and rendered. This clearing of the map is undesirable if you are trying to smoothly update the tiles used by a source. This behavior has now changed, and calling `source.setUrl()` (or `source.setUrls()`) will *not* clear currently rendered tiles before loading and rendering new tiles. Instead, previously rendered tiles remain rendered until new tiles have loaded and can replace them. If you want to achieve the old behavior (render a blank map before loading new tiles), you can call `source.refresh()` or you can replace the old source with a new one (using `layer.setSource()`).
#### Move of typedefs out of code and into separate file
This change should not affect the great majority of application developers, but it's possible there are edge cases when compiling application code together with the library which cause compiler errors or warnings. In this case, please raise a GitHub issue. `goog.require`s for typedefs should not be necessary.
Users compiling their code with the library should note that the following API `@typedef`s have been renamed; your code may need changing if you use these:
* `ol.format.WFS.FeatureCollectionMetadata` to `ol.WFSFeatureCollectionMetadata`
* `ol.format.WFS.TransactionResponse` to `ol.WFSTransactionResponse`
#### Removal of `opaque` option for `ol.source.VectorTile`

148
changelog/v3.16.0.md Normal file
View File

@@ -0,0 +1,148 @@
# v3.16.0
## Summary
The v3.16.0 release includes features and fixes from 95 pull requests since the v3.15.1 release. New features and improvements include:
* Add `ol.source.ImageArcGISRest` for ArcGIS REST image layer support (#3880)
* New `finishCondition` option for `ol.interaction.Draw` to control which action should finish a geometry when drawing (#5261)
* New filter API for `ol.format.WFS#writeGetFeature` for WFS queries with OGC filters (#5252)
* New `renderMode` option for `ol.layer.VectorTile` to balance between rendering performance and rendering quality (#5177)
* More flexibility for configuring attribution logos by allowing HTML elements (#5274)
* UTFGrid updates, now supporting Mapbox API v4 (#5329)
* New `condition` option for `ol.interaction.Modify` for better reliability when combining with other interactions (#5320)
In addition to these new features, the code base has been simplified and refactored in the process of removing the dependency on Closure Library and Compiler.
## Upgrade notes
#### Rendering change for tile sources
Previously, if you called `source.setUrl()` on a tile source, all currently rendered tiles would be cleared before new tiles were loaded and rendered. This clearing of the map is undesirable if you are trying to smoothly update the tiles used by a source. This behavior has now changed, and calling `source.setUrl()` (or `source.setUrls()`) will *not* clear currently rendered tiles before loading and rendering new tiles. Instead, previously rendered tiles remain rendered until new tiles have loaded and can replace them. If you want to achieve the old behavior (render a blank map before loading new tiles), you can call `source.refresh()` or you can replace the old source with a new one (using `layer.setSource()`).
#### Move of typedefs out of code and into separate file
This change should not affect the great majority of application developers, but it's possible there are edge cases when compiling application code together with the library which cause compiler errors or warnings. In this case, please raise a GitHub issue. `goog.require`s for typedefs should not be necessary.
Users compiling their code with the library should note that the following API `@typedef`s have been renamed; your code may need changing if you use these:
* `ol.format.WFS.FeatureCollectionMetadata` to `ol.WFSFeatureCollectionMetadata`
* `ol.format.WFS.TransactionResponse` to `ol.WFSTransactionResponse`
#### Removal of `opaque` option for `ol.source.VectorTile`
This option is no longer needed, so it was removed from the API.
#### XHR loading for `ol.source.TileUTFGrid`
The `ol.source.TileUTFGrid` now uses XMLHttpRequest to load UTFGrid tiles by default. This works out of the box with the v4 Mapbox API. To work with the v3 API, you must use the new `jsonp` option on the source. See the examples below for detail.
```js
// To work with the v4 API
var v4source = new ol.source.TileUTFGrid({
url: 'https://api.tiles.mapbox.com/v4/example.json?access_token=' + YOUR_KEY_HERE
});
// To work with the v3 API
var v3source = new ol.source.TileUTFGrid({
jsonp: true, // <--- this is required for v3
url: 'http://api.tiles.mapbox.com/v3/example.json'
});
```
## Full list of changes
* [#5377](https://github.com/openlayers/ol3/pull/5377) - Fix link to jspdf.min.js in export-pdf example ([@fredj](https://github.com/fredj))
* [#5372](https://github.com/openlayers/ol3/pull/5372) - Update jquery to version 2.2.4 🚀 ([@openlayers](https://github.com/openlayers))
* [#5364](https://github.com/openlayers/ol3/pull/5364) - Make it so things don't flash so much when you change the tile source URL. ([@tschaub](https://github.com/tschaub))
* [#5368](https://github.com/openlayers/ol3/pull/5368) - Move WFS typedefs to typedefs.js ([@probins](https://github.com/probins))
* [#5369](https://github.com/openlayers/ol3/pull/5369) - format/igc: Remove duplicate regex exec() call ([@Turbo87](https://github.com/Turbo87))
* [#5363](https://github.com/openlayers/ol3/pull/5363) - Convert all typedefs to CamelCase ([@probins](https://github.com/probins))
* [#5362](https://github.com/openlayers/ol3/pull/5362) - Update vector-tile to version 1.2.1 🚀 ([@openlayers](https://github.com/openlayers))
* [#5352](https://github.com/openlayers/ol3/pull/5352) - Add getResolutions() to ol.View ([@marlowp](https://github.com/marlowp))
* [#5359](https://github.com/openlayers/ol3/pull/5359) - Move upgrade notes to correct place ([@probins](https://github.com/probins))
* [#5343](https://github.com/openlayers/ol3/pull/5343) - Rename non-api sub-namespace typedefs ([@probins](https://github.com/probins))
* [#5361](https://github.com/openlayers/ol3/pull/5361) - Fix url to maki icons ([@fredj](https://github.com/fredj))
* [#5358](https://github.com/openlayers/ol3/pull/5358) - Handle multiple featureMember elements for different types (WFS format) ([@tsauerwein](https://github.com/tsauerwein))
* [#5355](https://github.com/openlayers/ol3/pull/5355) - Fix navigation-controls example description ([@fredj](https://github.com/fredj))
* [#5353](https://github.com/openlayers/ol3/pull/5353) - Add API definition to docs landing page ([@probins](https://github.com/probins))
* [#5356](https://github.com/openlayers/ol3/pull/5356) - Update rbush to version 1.4.3 🚀 ([@openlayers](https://github.com/openlayers))
* [#5354](https://github.com/openlayers/ol3/pull/5354) - Update eslint to version 2.10.2 🚀 ([@openlayers](https://github.com/openlayers))
* [#5347](https://github.com/openlayers/ol3/pull/5347) - Update eslint to version 2.10.1 🚀 ([@openlayers](https://github.com/openlayers))
* [#5344](https://github.com/openlayers/ol3/pull/5344) - Remove raster enum from test ([@probins](https://github.com/probins))
* [#5329](https://github.com/openlayers/ol3/pull/5329) - UTFGrid updates. ([@tschaub](https://github.com/tschaub))
* [#5335](https://github.com/openlayers/ol3/pull/5335) - Move typedefs to separate file ([@probins](https://github.com/probins))
* [#5332](https://github.com/openlayers/ol3/pull/5332) - Warn when viewing an outdated example, and offer a redirect to latest ([@ahocevar](https://github.com/ahocevar))
* [#5342](https://github.com/openlayers/ol3/pull/5342) - Fix incorrect source links ([@ahocevar](https://github.com/ahocevar))
* [#5339](https://github.com/openlayers/ol3/pull/5339) - Use a div instead of alert for version warning ([@ahocevar](https://github.com/ahocevar))
* [#5320](https://github.com/openlayers/ol3/pull/5320) - Add a 'condition' option to ol.interaction.Modify ([@fredj](https://github.com/fredj))
* [#5333](https://github.com/openlayers/ol3/pull/5333) - Improve code readability with better comments ([@openlayers](https://github.com/openlayers))
* [#5330](https://github.com/openlayers/ol3/pull/5330) - Fix source links, display version and warn about outdated docs ([@ahocevar](https://github.com/ahocevar))
* [#5324](https://github.com/openlayers/ol3/pull/5324) - Remove unneeded goog.provides/requires for typedefs ([@probins](https://github.com/probins))
* [#5328](https://github.com/openlayers/ol3/pull/5328) - Use Node 6 on Travis. ([@tschaub](https://github.com/tschaub))
* [#5313](https://github.com/openlayers/ol3/pull/5313) - Rastersource framestate extent ([@ahocevar](https://github.com/ahocevar))
* [#5326](https://github.com/openlayers/ol3/pull/5326) - Fix wording in tile-load-event example ([@tsauerwein](https://github.com/tsauerwein))
* [#5327](https://github.com/openlayers/ol3/pull/5327) - Update closure-util to version 1.13.1 🚀 ([@openlayers](https://github.com/openlayers))
* [#5289](https://github.com/openlayers/ol3/pull/5289) - Update fs-extra to version 0.30.0 🚀 ([@openlayers](https://github.com/openlayers))
* [#5319](https://github.com/openlayers/ol3/pull/5319) - Remove outdated fixme from framestate.js. ([@probins](https://github.com/probins))
* [#5274](https://github.com/openlayers/ol3/pull/5274) - Allow using elements in logo attribution options ([@samuellapointe](https://github.com/samuellapointe))
* [#5162](https://github.com/openlayers/ol3/pull/5162) - Improve docs/examples for loadingstrategy ([@probins](https://github.com/probins))
* [#5314](https://github.com/openlayers/ol3/pull/5314) - Update browserify to version 13.0.1 🚀 ([@openlayers](https://github.com/openlayers))
* [#5315](https://github.com/openlayers/ol3/pull/5315) - Remove unused ol.TileCoordTransformType ([@probins](https://github.com/probins))
* [#5310](https://github.com/openlayers/ol3/pull/5310) - Get raster sources working again. ([@tschaub](https://github.com/tschaub))
* [#5291](https://github.com/openlayers/ol3/pull/5291) - Allow once listeners to dispatch events of same type ([@ahocevar](https://github.com/ahocevar))
* [#5309](https://github.com/openlayers/ol3/pull/5309) - Update metalsmith-layouts to version 1.6.5 🚀 ([@openlayers](https://github.com/openlayers))
* [#5052](https://github.com/openlayers/ol3/pull/5052) - Update fs-extra to version 0.26.7 🚀 ([@openlayers](https://github.com/openlayers))
* [#5306](https://github.com/openlayers/ol3/pull/5306) - Make olx.view.FitOptions.padding optional ([@gberaudo](https://github.com/gberaudo))
* [#5302](https://github.com/openlayers/ol3/pull/5302) - Remove use of goog.partial ([@fredj](https://github.com/fredj))
* [#5304](https://github.com/openlayers/ol3/pull/5304) - Update sinon to version 1.17.4 🚀 ([@openlayers](https://github.com/openlayers))
* [#4644](https://github.com/openlayers/ol3/pull/4644) - Remove check-requires script ([@fredj](https://github.com/fredj))
* [#5298](https://github.com/openlayers/ol3/pull/5298) - Update eslint to version 2.9.0 🚀 ([@openlayers](https://github.com/openlayers))
* [#5296](https://github.com/openlayers/ol3/pull/5296) - Document handling of KML MultiGeometries ([@probins](https://github.com/probins))
* [#5293](https://github.com/openlayers/ol3/pull/5293) - Block removePoint while dragging ([@giohappy](https://github.com/giohappy))
* [#5285](https://github.com/openlayers/ol3/pull/5285) - Add more tests for the scaleline control ([@marcjansen](https://github.com/marcjansen))
* [#5287](https://github.com/openlayers/ol3/pull/5287) - Add and fix vectortile tests ([@ahocevar](https://github.com/ahocevar))
* [#5288](https://github.com/openlayers/ol3/pull/5288) - Expose removeVertex_ as removePoint ([@giohappy](https://github.com/giohappy))
* [#5286](https://github.com/openlayers/ol3/pull/5286) - Skip unnecessary render functions ([@ahocevar](https://github.com/ahocevar))
* [#5177](https://github.com/openlayers/ol3/pull/5177) - Add render options for vector tile layers ([@ahocevar](https://github.com/ahocevar))
* [#5278](https://github.com/openlayers/ol3/pull/5278) - Fix invalid generics type instantiation ([@fredj](https://github.com/fredj))
* [#5044](https://github.com/openlayers/ol3/pull/5044) - Snap interaction now handle feature without geometry properly ([@fblackburn](https://github.com/fblackburn))
* [#5277](https://github.com/openlayers/ol3/pull/5277) - Type cleanup ([@fredj](https://github.com/fredj))
* [#5275](https://github.com/openlayers/ol3/pull/5275) - Fix feature-layer association on replaced selections ([@ahocevar](https://github.com/ahocevar))
* [#5252](https://github.com/openlayers/ol3/pull/5252) - Add filter option to ol.format.WFS#writeGetFeature ([@tsauerwein](https://github.com/tsauerwein))
* [#5264](https://github.com/openlayers/ol3/pull/5264) - Fix for close draw polygon error ([@matjos](https://github.com/matjos))
* [#5267](https://github.com/openlayers/ol3/pull/5267) - Use ol.functions instead of goog.functions ([@ahocevar](https://github.com/ahocevar))
* [#5266](https://github.com/openlayers/ol3/pull/5266) - Document ol.colorlike ([@ahocevar](https://github.com/ahocevar))
* [#5261](https://github.com/openlayers/ol3/pull/5261) - add finishCondition to ol.interaction.Draw ([@giohappy](https://github.com/giohappy))
* [#5259](https://github.com/openlayers/ol3/pull/5259) - Include squash commit merges in changelog ([@ahocevar](https://github.com/ahocevar))
* [#5257](https://github.com/openlayers/ol3/pull/5257) - Add readFeatures and readProjection as MVT experimental API ([@bjornharrtell](https://github.com/bjornharrtell))
* [#3880](https://github.com/openlayers/ol3/pull/3880) - Add ol.source.ImageArcGISRest ([Anna Lambrechtsen](https://github.com/search?q=Anna Lambrechtsen&type=Users))
* [#5239](https://github.com/openlayers/ol3/pull/5239) - Update eslint to version 2.8.0 🚀 ([@openlayers](https://github.com/openlayers))
* [#5230](https://github.com/openlayers/ol3/pull/5230) - Reuse frame state arrays ([@fredj](https://github.com/fredj))
* [#5213](https://github.com/openlayers/ol3/pull/5213) - Remove unused ol.source.Source#setProjection function ([@fredj](https://github.com/fredj))
* [#5223](https://github.com/openlayers/ol3/pull/5223) - Create tmpSize_ before calling calculateTileRanges_ ([@fredj](https://github.com/fredj))
* [#5225](https://github.com/openlayers/ol3/pull/5225) - Remove unused ol.extent.transform2D function ([@fredj](https://github.com/fredj))
* [#5212](https://github.com/openlayers/ol3/pull/5212) - KML: fix GeometryCollection write ([@probins](https://github.com/probins))
* [#5228](https://github.com/openlayers/ol3/pull/5228) - Add 'layers' option to Translate interaction ([@adube](https://github.com/adube))
* [#5221](https://github.com/openlayers/ol3/pull/5221) - Update jquery, bootstrap and proj4js in examples ([@fredj](https://github.com/fredj))
* [#5227](https://github.com/openlayers/ol3/pull/5227) - Add a temporary ol.TileCoord in ol.renderer.canvas.TileLayer ([@fredj](https://github.com/fredj))
* [#5222](https://github.com/openlayers/ol3/pull/5222) - Remove unused private variables in ol.renderer.canvas.Map ([@fredj](https://github.com/fredj))
* [#5220](https://github.com/openlayers/ol3/pull/5220) - Externs cleanup ([@fredj](https://github.com/fredj))
* [#5224](https://github.com/openlayers/ol3/pull/5224) - Fix jsdoc tags indentation ([@fredj](https://github.com/fredj))
* [#5218](https://github.com/openlayers/ol3/pull/5218) - Add @api annotation to setConfig. ([@aisaacs](https://github.com/aisaacs))
* [#5215](https://github.com/openlayers/ol3/pull/5215) - Add an optional feature filter to getClosestFeatureToCoordinate ([@fredj](https://github.com/fredj))
* [#5132](https://github.com/openlayers/ol3/pull/5132) - Remove goog.string ([@nicholas-l](https://github.com/nicholas-l))
* [#5206](https://github.com/openlayers/ol3/pull/5206) - Minor correction of StyleFunction docs ([@probins](https://github.com/probins))
* [#4932](https://github.com/openlayers/ol3/pull/4932) - Remove undefined parameters to ol.format.WMSGetFeatureInfo#readFeatures_ ([@fredj](https://github.com/fredj))
* [#5207](https://github.com/openlayers/ol3/pull/5207) - Update clean-css to version 3.4.12 🚀 ([@openlayers](https://github.com/openlayers))
* [#5201](https://github.com/openlayers/ol3/pull/5201) - Small clarification for vector source loader docs ([@probins](https://github.com/probins))
* [#5200](https://github.com/openlayers/ol3/pull/5200) - Fix typo in rotate control for css classList ([@bartvde](https://github.com/bartvde))
* [#5178](https://github.com/openlayers/ol3/pull/5178) - Remove goog.global ([Nicholas Latham](https://github.com/search?q=Nicholas Latham&type=Users))
* [#5189](https://github.com/openlayers/ol3/pull/5189) - Add rendering tests to ensure correct circle and polygon rendering ([Andreas Hocevar](https://github.com/search?q=Andreas Hocevar&type=Users))
* [#5183](https://github.com/openlayers/ol3/pull/5183) - Update istanbul to version 0.4.3 🚀 ([@openlayers](https://github.com/openlayers))
* [#5187](https://github.com/openlayers/ol3/pull/5187) - Remove goog.functions.and from ol.interaction.Modify ([@fredj](https://github.com/fredj))
* [#5176](https://github.com/openlayers/ol3/pull/5176) - Update jquery to version 2.2.3 🚀 ([@openlayers](https://github.com/openlayers))
* [#5173](https://github.com/openlayers/ol3/pull/5173) - Use ol.dom.createCanvasContext2D ([@fredj](https://github.com/fredj))
* [#5171](https://github.com/openlayers/ol3/pull/5171) - Move olx.source.AttributionOption out of externs/olx.js ([@fredj](https://github.com/fredj))
* [#5170](https://github.com/openlayers/ol3/pull/5170) - Update eslint to version 2.7.0 🚀 ([@openlayers](https://github.com/openlayers))
* [#5167](https://github.com/openlayers/ol3/pull/5167) - Remove FastClick from mobile-full-screen example ([@fredj](https://github.com/fredj))
* [#5166](https://github.com/openlayers/ol3/pull/5166) - Remove jquery dependency from measure example ([@fredj](https://github.com/fredj))
* [#5164](https://github.com/openlayers/ol3/pull/5164) - Cartodb cleanup ([@fredj](https://github.com/fredj))

View File

@@ -6,7 +6,7 @@ docs: >
Example of exporting a map as a PDF using the <a href="https://github.com/MrRio/jsPDF" target="_blank">jsPDF</a> library.
tags: "export, pdf, openstreetmap"
resources:
- http://mrrio.github.io/jsPDF/dist/jspdf.min.js
- https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.2.61/jspdf.min.js
---
<div class="row-fluid">
<div class="span12">

View File

@@ -0,0 +1,12 @@
---
layout: example.html
title: Reusable Source
shortdesc: Updating a tile source by changing the URL.
docs: >
You can call <code>source.setUrl()</code> to update the URL for a tile source. Note that when you change the URL for a tile source, existing tiles will not be replaced until new tiles are loaded. If you are interested instead in clearing currently rendered tiles, you can call the <code>source.refresh()</code> method. Alternatively, you can use two separate sources if you want to remove rendered tiles and start over loading new tiles.
---
<div id="map" class="map"></div>
<button class="switcher" value="0">January</button>
<button class="switcher" value="1">January (with bathymetry)</button>
<button class="switcher" value="2">July</button>
<button class="switcher" value="3">July (with bathymetry)</button>

View File

@@ -0,0 +1,39 @@
goog.require('ol.Map');
goog.require('ol.View');
goog.require('ol.layer.Tile');
goog.require('ol.source.XYZ');
var urls = [
'https://{a-c}.tiles.mapbox.com/v3/mapbox.blue-marble-topo-jan/{z}/{x}/{y}.png',
'https://{a-c}.tiles.mapbox.com/v3/mapbox.blue-marble-topo-bathy-jan/{z}/{x}/{y}.png',
'https://{a-c}.tiles.mapbox.com/v3/mapbox.blue-marble-topo-jul/{z}/{x}/{y}.png',
'https://{a-c}.tiles.mapbox.com/v3/mapbox.blue-marble-topo-bathy-jul/{z}/{x}/{y}.png'
];
var source = new ol.source.XYZ();
var map = new ol.Map({
target: 'map',
layers: [
new ol.layer.Tile({
source: source
})
],
view: new ol.View({
center: [0, 0],
zoom: 2
})
});
function updateUrl(index) {
source.setUrl(urls[index]);
}
var buttons = document.getElementsByClassName('switcher');
for (var i = 0, ii = buttons.length; i < ii; ++i) {
var button = buttons[i];
button.addEventListener('click', updateUrl.bind(null, Number(button.value)));
}
updateUrl(0);

View File

@@ -1,6 +1,6 @@
{
"name": "openlayers",
"version": "3.15.1",
"version": "3.16.0",
"description": "Build tools and sources for developing OpenLayers based mapping applications",
"keywords": [
"map",
@@ -46,7 +46,7 @@
"pixelworks": "1.1.0",
"rbush": "1.4.3",
"temp": "0.8.3",
"vector-tile": "1.2.0",
"vector-tile": "1.2.1",
"walk": "2.3.9"
},
"devDependencies": {
@@ -58,7 +58,7 @@
"expect.js": "0.3.1",
"gaze": "^1.0.0",
"istanbul": "0.4.3",
"jquery": "2.2.3",
"jquery": "2.2.4",
"mocha": "2.4.5",
"mocha-phantomjs-core": "^1.3.0",
"mustache": "2.2.1",

View File

@@ -166,7 +166,7 @@ ol.format.GML2.prototype.outerBoundaryIsParser_ = function(node, objectStack) {
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.GML2.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = {
@@ -179,7 +179,7 @@ ol.format.GML2.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = {
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.GML2.prototype.FLAT_LINEAR_RINGS_PARSERS_ = {
@@ -192,7 +192,7 @@ ol.format.GML2.prototype.FLAT_LINEAR_RINGS_PARSERS_ = {
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.GML2.prototype.BOX_PARSERS_ = {
@@ -205,7 +205,7 @@ ol.format.GML2.prototype.BOX_PARSERS_ = {
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.GML2.prototype.GEOMETRY_PARSERS_ = {

View File

@@ -450,7 +450,7 @@ ol.format.GML3.prototype.readFlatPosList_ = function(node, objectStack) {
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.GML3.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = {
@@ -463,7 +463,7 @@ ol.format.GML3.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = {
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.GML3.prototype.FLAT_LINEAR_RINGS_PARSERS_ = {
@@ -476,7 +476,7 @@ ol.format.GML3.prototype.FLAT_LINEAR_RINGS_PARSERS_ = {
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.GML3.prototype.GEOMETRY_PARSERS_ = {
@@ -506,7 +506,7 @@ ol.format.GML3.prototype.GEOMETRY_PARSERS_ = {
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.GML3.prototype.MULTICURVE_PARSERS_ = {
@@ -521,7 +521,7 @@ ol.format.GML3.prototype.MULTICURVE_PARSERS_ = {
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.GML3.prototype.MULTISURFACE_PARSERS_ = {
@@ -536,7 +536,7 @@ ol.format.GML3.prototype.MULTISURFACE_PARSERS_ = {
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.GML3.prototype.CURVEMEMBER_PARSERS_ = {
@@ -550,7 +550,7 @@ ol.format.GML3.prototype.CURVEMEMBER_PARSERS_ = {
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.GML3.prototype.SURFACEMEMBER_PARSERS_ = {
@@ -563,7 +563,7 @@ ol.format.GML3.prototype.SURFACEMEMBER_PARSERS_ = {
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.GML3.prototype.SURFACE_PARSERS_ = {
@@ -575,7 +575,7 @@ ol.format.GML3.prototype.SURFACE_PARSERS_ = {
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.GML3.prototype.CURVE_PARSERS_ = {
@@ -587,7 +587,7 @@ ol.format.GML3.prototype.CURVE_PARSERS_ = {
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.GML3.prototype.ENVELOPE_PARSERS_ = {
@@ -602,7 +602,7 @@ ol.format.GML3.prototype.ENVELOPE_PARSERS_ = {
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.GML3.prototype.PATCHES_PARSERS_ = {
@@ -615,7 +615,7 @@ ol.format.GML3.prototype.PATCHES_PARSERS_ = {
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.GML3.prototype.SEGMENTS_PARSERS_ = {
@@ -712,7 +712,7 @@ ol.format.GML3.prototype.writePoint_ = function(node, geometry, objectStack) {
/**
* @type {Object.<string, Object.<string, ol.xmlSerializer>>}
* @type {Object.<string, Object.<string, ol.XmlSerializer>>}
* @private
*/
ol.format.GML3.ENVELOPE_SERIALIZERS_ = {
@@ -738,7 +738,7 @@ ol.format.GML3.prototype.writeEnvelope = function(node, extent, objectStack) {
}
var keys = ['lowerCorner', 'upperCorner'];
var values = [extent[0] + ' ' + extent[1], extent[2] + ' ' + extent[3]];
ol.xml.pushSerializeAndPop(/** @type {ol.xmlNodeStackItem} */
ol.xml.pushSerializeAndPop(/** @type {ol.XmlNodeStackItem} */
({node: node}), ol.format.GML3.ENVELOPE_SERIALIZERS_,
ol.xml.OBJECT_PROPERTY_NODE_FACTORY,
values,
@@ -1019,7 +1019,7 @@ ol.format.GML3.prototype.writeGeometryElement = function(node, geometry, objectS
value =
ol.format.Feature.transformWithOptions(geometry, true, context);
}
ol.xml.pushSerializeAndPop(/** @type {ol.xmlNodeStackItem} */
ol.xml.pushSerializeAndPop(/** @type {ol.XmlNodeStackItem} */
(item), ol.format.GML3.GEOMETRY_SERIALIZERS_,
this.GEOMETRY_NODE_FACTORY_, [value],
objectStack, undefined, this);
@@ -1066,7 +1066,7 @@ ol.format.GML3.prototype.writeFeatureElement = function(node, feature, objectSta
}
var item = ol.object.assign({}, context);
item.node = node;
ol.xml.pushSerializeAndPop(/** @type {ol.xmlNodeStackItem} */
ol.xml.pushSerializeAndPop(/** @type {ol.XmlNodeStackItem} */
(item), context.serializers,
ol.xml.makeSimpleNodeFactory(undefined, featureNS),
values,
@@ -1091,7 +1091,7 @@ ol.format.GML3.prototype.writeFeatureMembers_ = function(node, features, objectS
this.writeFeatureElement, this);
var item = ol.object.assign({}, context);
item.node = node;
ol.xml.pushSerializeAndPop(/** @type {ol.xmlNodeStackItem} */
ol.xml.pushSerializeAndPop(/** @type {ol.XmlNodeStackItem} */
(item),
serializers,
ol.xml.makeSimpleNodeFactory(featureType, featureNS), features,
@@ -1100,7 +1100,7 @@ ol.format.GML3.prototype.writeFeatureMembers_ = function(node, features, objectS
/**
* @type {Object.<string, Object.<string, ol.xmlSerializer>>}
* @type {Object.<string, Object.<string, ol.XmlSerializer>>}
* @private
*/
ol.format.GML3.SURFACEORPOLYGONMEMBER_SERIALIZERS_ = {
@@ -1114,7 +1114,7 @@ ol.format.GML3.SURFACEORPOLYGONMEMBER_SERIALIZERS_ = {
/**
* @type {Object.<string, Object.<string, ol.xmlSerializer>>}
* @type {Object.<string, Object.<string, ol.XmlSerializer>>}
* @private
*/
ol.format.GML3.POINTMEMBER_SERIALIZERS_ = {
@@ -1126,7 +1126,7 @@ ol.format.GML3.POINTMEMBER_SERIALIZERS_ = {
/**
* @type {Object.<string, Object.<string, ol.xmlSerializer>>}
* @type {Object.<string, Object.<string, ol.XmlSerializer>>}
* @private
*/
ol.format.GML3.LINESTRINGORCURVEMEMBER_SERIALIZERS_ = {
@@ -1140,7 +1140,7 @@ ol.format.GML3.LINESTRINGORCURVEMEMBER_SERIALIZERS_ = {
/**
* @type {Object.<string, Object.<string, ol.xmlSerializer>>}
* @type {Object.<string, Object.<string, ol.XmlSerializer>>}
* @private
*/
ol.format.GML3.RING_SERIALIZERS_ = {
@@ -1152,7 +1152,7 @@ ol.format.GML3.RING_SERIALIZERS_ = {
/**
* @type {Object.<string, Object.<string, ol.xmlSerializer>>}
* @type {Object.<string, Object.<string, ol.XmlSerializer>>}
* @private
*/
ol.format.GML3.GEOMETRY_SERIALIZERS_ = {

View File

@@ -507,7 +507,7 @@ ol.format.GMLBase.prototype.readFlatCoordinatesFromNode_ = function(node, object
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.GMLBase.prototype.MULTIPOINT_PARSERS_ = {
@@ -522,7 +522,7 @@ ol.format.GMLBase.prototype.MULTIPOINT_PARSERS_ = {
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.GMLBase.prototype.MULTILINESTRING_PARSERS_ = {
@@ -537,7 +537,7 @@ ol.format.GMLBase.prototype.MULTILINESTRING_PARSERS_ = {
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.GMLBase.prototype.MULTIPOLYGON_PARSERS_ = {
@@ -552,7 +552,7 @@ ol.format.GMLBase.prototype.MULTIPOLYGON_PARSERS_ = {
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.GMLBase.prototype.POINTMEMBER_PARSERS_ = {
@@ -565,7 +565,7 @@ ol.format.GMLBase.prototype.POINTMEMBER_PARSERS_ = {
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.GMLBase.prototype.LINESTRINGMEMBER_PARSERS_ = {
@@ -578,7 +578,7 @@ ol.format.GMLBase.prototype.LINESTRINGMEMBER_PARSERS_ = {
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.GMLBase.prototype.POLYGONMEMBER_PARSERS_ = {
@@ -591,7 +591,7 @@ ol.format.GMLBase.prototype.POLYGONMEMBER_PARSERS_ = {
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @protected
*/
ol.format.GMLBase.prototype.RING_PARSERS = {

View File

@@ -279,7 +279,7 @@ ol.format.GPX.FEATURE_READER_ = {
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.GPX.GPX_PARSERS_ = ol.xml.makeStructureNS(
@@ -292,7 +292,7 @@ ol.format.GPX.GPX_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.GPX.LINK_PARSERS_ = ol.xml.makeStructureNS(
@@ -306,7 +306,7 @@ ol.format.GPX.LINK_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.GPX.RTE_PARSERS_ = ol.xml.makeStructureNS(
@@ -326,7 +326,7 @@ ol.format.GPX.RTE_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.GPX.RTEPT_PARSERS_ = ol.xml.makeStructureNS(
@@ -338,7 +338,7 @@ ol.format.GPX.RTEPT_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.GPX.TRK_PARSERS_ = ol.xml.makeStructureNS(
@@ -358,7 +358,7 @@ ol.format.GPX.TRK_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.GPX.TRKSEG_PARSERS_ = ol.xml.makeStructureNS(
@@ -369,7 +369,7 @@ ol.format.GPX.TRKSEG_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.GPX.TRKPT_PARSERS_ = ol.xml.makeStructureNS(
@@ -381,7 +381,7 @@ ol.format.GPX.TRKPT_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.GPX.WPT_PARSERS_ = ol.xml.makeStructureNS(
@@ -526,7 +526,7 @@ ol.format.GPX.writeLink_ = function(node, value, objectStack) {
properties['linkText'],
properties['linkType']
];
ol.xml.pushSerializeAndPop(/** @type {ol.xmlNodeStackItem} */ ({node: node}),
ol.xml.pushSerializeAndPop(/** @type {ol.XmlNodeStackItem} */ ({node: node}),
ol.format.GPX.LINK_SERIALIZERS_, ol.xml.OBJECT_PROPERTY_NODE_FACTORY,
link, objectStack, ol.format.GPX.LINK_SEQUENCE_);
};
@@ -571,7 +571,7 @@ ol.format.GPX.writeWptType_ = function(node, coordinate, objectStack) {
}
var orderedKeys = ol.format.GPX.WPT_TYPE_SEQUENCE_[namespaceURI];
var values = ol.xml.makeSequence(properties, orderedKeys);
ol.xml.pushSerializeAndPop(/** @type {ol.xmlNodeStackItem} */
ol.xml.pushSerializeAndPop(/** @type {ol.XmlNodeStackItem} */
({node: node, 'properties': properties}),
ol.format.GPX.WPT_TYPE_SERIALIZERS_, ol.xml.OBJECT_PROPERTY_NODE_FACTORY,
values, objectStack, orderedKeys);
@@ -615,7 +615,7 @@ ol.format.GPX.writeRte_ = function(node, feature, objectStack) {
ol.format.GPX.writeTrk_ = function(node, feature, objectStack) {
var options = /** @type {olx.format.WriteOptions} */ (objectStack[0]);
var properties = feature.getProperties();
/** @type {ol.xmlNodeStackItem} */
/** @type {ol.XmlNodeStackItem} */
var context = {node: node, 'properties': properties};
var geometry = feature.getGeometry();
if (geometry) {
@@ -641,7 +641,7 @@ ol.format.GPX.writeTrk_ = function(node, feature, objectStack) {
* @private
*/
ol.format.GPX.writeTrkSeg_ = function(node, lineString, objectStack) {
/** @type {ol.xmlNodeStackItem} */
/** @type {ol.XmlNodeStackItem} */
var context = {node: node, 'geometryLayout': lineString.getLayout(),
'properties': {}};
ol.xml.pushSerializeAndPop(context,
@@ -682,7 +682,7 @@ ol.format.GPX.LINK_SEQUENCE_ = ['text', 'type'];
/**
* @type {Object.<string, Object.<string, ol.xmlSerializer>>}
* @type {Object.<string, Object.<string, ol.XmlSerializer>>}
* @private
*/
ol.format.GPX.LINK_SERIALIZERS_ = ol.xml.makeStructureNS(
@@ -705,7 +705,7 @@ ol.format.GPX.RTE_SEQUENCE_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlSerializer>>}
* @type {Object.<string, Object.<string, ol.XmlSerializer>>}
* @private
*/
ol.format.GPX.RTE_SERIALIZERS_ = ol.xml.makeStructureNS(
@@ -736,7 +736,7 @@ ol.format.GPX.TRK_SEQUENCE_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlSerializer>>}
* @type {Object.<string, Object.<string, ol.XmlSerializer>>}
* @private
*/
ol.format.GPX.TRK_SERIALIZERS_ = ol.xml.makeStructureNS(
@@ -764,7 +764,7 @@ ol.format.GPX.TRKSEG_NODE_FACTORY_ = ol.xml.makeSimpleNodeFactory('trkpt');
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlSerializer>>}
* @type {Object.<string, Object.<string, ol.XmlSerializer>>}
* @private
*/
ol.format.GPX.TRKSEG_SERIALIZERS_ = ol.xml.makeStructureNS(
@@ -787,7 +787,7 @@ ol.format.GPX.WPT_TYPE_SEQUENCE_ = ol.xml.makeStructureNS(
/**
* @type {Object.<string, Object.<string, ol.xmlSerializer>>}
* @type {Object.<string, Object.<string, ol.XmlSerializer>>}
* @private
*/
ol.format.GPX.WPT_TYPE_SERIALIZERS_ = ol.xml.makeStructureNS(
@@ -855,7 +855,7 @@ ol.format.GPX.GPX_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlSerializer>>}
* @type {Object.<string, Object.<string, ol.XmlSerializer>>}
* @private
*/
ol.format.GPX.GPX_SERIALIZERS_ = ol.xml.makeStructureNS(
@@ -895,7 +895,7 @@ ol.format.GPX.prototype.writeFeaturesNode = function(features, opt_options) {
//FIXME Serialize metadata
var gpx = ol.xml.createElementNS('http://www.topografix.com/GPX/1/1', 'gpx');
ol.xml.pushSerializeAndPop(/** @type {ol.xmlNodeStackItem} */
ol.xml.pushSerializeAndPop(/** @type {ol.XmlNodeStackItem} */
({node: gpx}), ol.format.GPX.GPX_SERIALIZERS_,
ol.format.GPX.GPX_NODE_FACTORY_, features, [opt_options]);
return gpx;

View File

@@ -172,7 +172,6 @@ ol.format.IGC.prototype.readFeatureFromText = function(text, opt_options) {
m = ol.format.IGC.H_RECORD_RE_.exec(line);
if (m) {
properties[m[1]] = m[2].trim();
m = ol.format.IGC.HFDTE_RECORD_RE_.exec(line);
}
}
}

View File

@@ -1401,7 +1401,7 @@ ol.format.KML.whenParser_ = function(node, objectStack) {
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.KML.DATA_PARSERS_ = ol.xml.makeStructureNS(
@@ -1412,7 +1412,7 @@ ol.format.KML.DATA_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.KML.EXTENDED_DATA_PARSERS_ = ol.xml.makeStructureNS(
@@ -1424,7 +1424,7 @@ ol.format.KML.EXTENDED_DATA_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.KML.EXTRUDE_AND_ALTITUDE_MODE_PARSERS_ = ol.xml.makeStructureNS(
@@ -1436,7 +1436,7 @@ ol.format.KML.EXTRUDE_AND_ALTITUDE_MODE_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.KML.FLAT_LINEAR_RING_PARSERS_ = ol.xml.makeStructureNS(
@@ -1447,7 +1447,7 @@ ol.format.KML.FLAT_LINEAR_RING_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.KML.FLAT_LINEAR_RINGS_PARSERS_ = ol.xml.makeStructureNS(
@@ -1459,7 +1459,7 @@ ol.format.KML.FLAT_LINEAR_RINGS_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.KML.GX_TRACK_PARSERS_ = ol.xml.makeStructureNS(
@@ -1473,7 +1473,7 @@ ol.format.KML.GX_TRACK_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.KML.GEOMETRY_FLAT_COORDINATES_PARSERS_ = ol.xml.makeStructureNS(
@@ -1484,7 +1484,7 @@ ol.format.KML.GEOMETRY_FLAT_COORDINATES_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.KML.ICON_PARSERS_ = ol.xml.makeStructureNS(
@@ -1501,7 +1501,7 @@ ol.format.KML.ICON_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.KML.ICON_STYLE_PARSERS_ = ol.xml.makeStructureNS(
@@ -1515,7 +1515,7 @@ ol.format.KML.ICON_STYLE_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.KML.INNER_BOUNDARY_IS_PARSERS_ = ol.xml.makeStructureNS(
@@ -1526,7 +1526,7 @@ ol.format.KML.INNER_BOUNDARY_IS_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.KML.LABEL_STYLE_PARSERS_ = ol.xml.makeStructureNS(
@@ -1538,7 +1538,7 @@ ol.format.KML.LABEL_STYLE_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.KML.LINE_STYLE_PARSERS_ = ol.xml.makeStructureNS(
@@ -1550,7 +1550,7 @@ ol.format.KML.LINE_STYLE_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.KML.MULTI_GEOMETRY_PARSERS_ = ol.xml.makeStructureNS(
@@ -1565,7 +1565,7 @@ ol.format.KML.MULTI_GEOMETRY_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.KML.GX_MULTITRACK_GEOMETRY_PARSERS_ = ol.xml.makeStructureNS(
@@ -1576,7 +1576,7 @@ ol.format.KML.GX_MULTITRACK_GEOMETRY_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.KML.NETWORK_LINK_PARSERS_ = ol.xml.makeStructureNS(
@@ -1594,7 +1594,7 @@ ol.format.KML.NETWORK_LINK_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.KML.LINK_PARSERS_ = ol.xml.makeStructureNS(
@@ -1605,7 +1605,7 @@ ol.format.KML.LINK_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.KML.OUTER_BOUNDARY_IS_PARSERS_ = ol.xml.makeStructureNS(
@@ -1616,7 +1616,7 @@ ol.format.KML.OUTER_BOUNDARY_IS_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.KML.PAIR_PARSERS_ = ol.xml.makeStructureNS(
@@ -1629,7 +1629,7 @@ ol.format.KML.PAIR_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.KML.PLACEMARK_PARSERS_ = ol.xml.makeStructureNS(
@@ -1666,7 +1666,7 @@ ol.format.KML.PLACEMARK_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.KML.POLY_STYLE_PARSERS_ = ol.xml.makeStructureNS(
@@ -1679,7 +1679,7 @@ ol.format.KML.POLY_STYLE_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.KML.SCHEMA_DATA_PARSERS_ = ol.xml.makeStructureNS(
@@ -1690,7 +1690,7 @@ ol.format.KML.SCHEMA_DATA_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.KML.STYLE_PARSERS_ = ol.xml.makeStructureNS(
@@ -1704,7 +1704,7 @@ ol.format.KML.STYLE_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.KML.STYLE_MAP_PARSERS_ = ol.xml.makeStructureNS(
@@ -2161,7 +2161,7 @@ ol.format.KML.writeCoordinatesTextNode_ = function(node, coordinates, objectStac
* @private
*/
ol.format.KML.writeDocument_ = function(node, features, objectStack) {
var /** @type {ol.xmlNodeStackItem} */ context = {node: node};
var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
ol.xml.pushSerializeAndPop(context, ol.format.KML.DOCUMENT_SERIALIZERS_,
ol.format.KML.DOCUMENT_NODE_FACTORY_, features, objectStack, undefined,
this);
@@ -2175,7 +2175,7 @@ ol.format.KML.writeDocument_ = function(node, features, objectStack) {
* @private
*/
ol.format.KML.writeIcon_ = function(node, icon, objectStack) {
var /** @type {ol.xmlNodeStackItem} */ context = {node: node};
var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
var parentNode = objectStack[objectStack.length - 1].node;
var orderedKeys = ol.format.KML.ICON_SEQUENCE_[parentNode.namespaceURI];
var values = ol.xml.makeSequence(icon, orderedKeys);
@@ -2197,7 +2197,7 @@ ol.format.KML.writeIcon_ = function(node, icon, objectStack) {
* @private
*/
ol.format.KML.writeIconStyle_ = function(node, style, objectStack) {
var /** @type {ol.xmlNodeStackItem} */ context = {node: node};
var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
var properties = {};
var src = style.getSrc();
var size = style.getSize();
@@ -2255,7 +2255,7 @@ ol.format.KML.writeIconStyle_ = function(node, style, objectStack) {
* @private
*/
ol.format.KML.writeLabelStyle_ = function(node, style, objectStack) {
var /** @type {ol.xmlNodeStackItem} */ context = {node: node};
var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
var properties = {};
var fill = style.getFill();
if (fill) {
@@ -2281,7 +2281,7 @@ ol.format.KML.writeLabelStyle_ = function(node, style, objectStack) {
* @private
*/
ol.format.KML.writeLineStyle_ = function(node, style, objectStack) {
var /** @type {ol.xmlNodeStackItem} */ context = {node: node};
var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
var properties = {
'color': style.getColor(),
'width': style.getWidth()
@@ -2308,7 +2308,7 @@ ol.format.KML.writeMultiGeometry_ = function(node, geometry, objectStack) {
(geometry instanceof ol.geom.MultiPolygon),
'geometry should be one of: ol.geom.GeometryCollection, ' +
'ol.geom.MultiPoint, ol.geom.MultiLineString or ol.geom.MultiPolygon');
/** @type {ol.xmlNodeStackItem} */
/** @type {ol.XmlNodeStackItem} */
var context = {node: node};
var type = geometry.getType();
/** @type {Array.<ol.geom.Geometry>} */
@@ -2346,7 +2346,7 @@ ol.format.KML.writeMultiGeometry_ = function(node, geometry, objectStack) {
* @private
*/
ol.format.KML.writeBoundaryIs_ = function(node, linearRing, objectStack) {
var /** @type {ol.xmlNodeStackItem} */ context = {node: node};
var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
ol.xml.pushSerializeAndPop(context,
ol.format.KML.BOUNDARY_IS_SERIALIZERS_,
ol.format.KML.LINEAR_RING_NODE_FACTORY_, [linearRing], objectStack);
@@ -2363,7 +2363,7 @@ ol.format.KML.writeBoundaryIs_ = function(node, linearRing, objectStack) {
* @private
*/
ol.format.KML.writePlacemark_ = function(node, feature, objectStack) {
var /** @type {ol.xmlNodeStackItem} */ context = {node: node};
var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
// set id
if (feature.getId()) {
@@ -2421,7 +2421,7 @@ ol.format.KML.writePrimitiveGeometry_ = function(node, geometry, objectStack) {
'geometry should be one of ol.geom.Point, ol.geom.LineString ' +
'or ol.geom.LinearRing');
var flatCoordinates = geometry.getFlatCoordinates();
var /** @type {ol.xmlNodeStackItem} */ context = {node: node};
var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
context['layout'] = geometry.getLayout();
context['stride'] = geometry.getStride();
ol.xml.pushSerializeAndPop(context,
@@ -2444,7 +2444,7 @@ ol.format.KML.writePolygon_ = function(node, polygon, objectStack) {
goog.asserts.assert(linearRings.length > 0,
'linearRings should not be empty');
var outerRing = linearRings.shift();
var /** @type {ol.xmlNodeStackItem} */ context = {node: node};
var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
// inner rings
ol.xml.pushSerializeAndPop(context,
ol.format.KML.POLYGON_SERIALIZERS_,
@@ -2465,7 +2465,7 @@ ol.format.KML.writePolygon_ = function(node, polygon, objectStack) {
* @private
*/
ol.format.KML.writePolyStyle_ = function(node, style, objectStack) {
var /** @type {ol.xmlNodeStackItem} */ context = {node: node};
var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
ol.xml.pushSerializeAndPop(context, ol.format.KML.POLY_STYLE_SERIALIZERS_,
ol.format.KML.COLOR_NODE_FACTORY_, [style.getColor()], objectStack);
};
@@ -2490,7 +2490,7 @@ ol.format.KML.writeScaleTextNode_ = function(node, scale) {
* @private
*/
ol.format.KML.writeStyle_ = function(node, style, objectStack) {
var /** @type {ol.xmlNodeStackItem} */ context = {node: node};
var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
var properties = {};
var fillStyle = style.getFill();
var strokeStyle = style.getStroke();
@@ -2542,7 +2542,7 @@ ol.format.KML.KML_SEQUENCE_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlSerializer>>}
* @type {Object.<string, Object.<string, ol.XmlSerializer>>}
* @private
*/
ol.format.KML.KML_SERIALIZERS_ = ol.xml.makeStructureNS(
@@ -2554,7 +2554,7 @@ ol.format.KML.KML_SERIALIZERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlSerializer>>}
* @type {Object.<string, Object.<string, ol.XmlSerializer>>}
* @private
*/
ol.format.KML.DOCUMENT_SERIALIZERS_ = ol.xml.makeStructureNS(
@@ -2596,7 +2596,7 @@ ol.format.KML.ICON_SEQUENCE_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlSerializer>>}
* @type {Object.<string, Object.<string, ol.XmlSerializer>>}
* @private
*/
ol.format.KML.ICON_SERIALIZERS_ = ol.xml.makeStructureNS(
@@ -2624,7 +2624,7 @@ ol.format.KML.ICON_STYLE_SEQUENCE_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlSerializer>>}
* @type {Object.<string, Object.<string, ol.XmlSerializer>>}
* @private
*/
ol.format.KML.ICON_STYLE_SERIALIZERS_ = ol.xml.makeStructureNS(
@@ -2649,7 +2649,7 @@ ol.format.KML.LABEL_STYLE_SEQUENCE_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlSerializer>>}
* @type {Object.<string, Object.<string, ol.XmlSerializer>>}
* @private
*/
ol.format.KML.LABEL_STYLE_SERIALIZERS_ = ol.xml.makeStructureNS(
@@ -2672,7 +2672,7 @@ ol.format.KML.LINE_STYLE_SEQUENCE_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlSerializer>>}
* @type {Object.<string, Object.<string, ol.XmlSerializer>>}
* @private
*/
ol.format.KML.LINE_STYLE_SERIALIZERS_ = ol.xml.makeStructureNS(
@@ -2684,7 +2684,7 @@ ol.format.KML.LINE_STYLE_SERIALIZERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlSerializer>>}
* @type {Object.<string, Object.<string, ol.XmlSerializer>>}
* @private
*/
ol.format.KML.BOUNDARY_IS_SERIALIZERS_ = ol.xml.makeStructureNS(
@@ -2696,7 +2696,7 @@ ol.format.KML.BOUNDARY_IS_SERIALIZERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlSerializer>>}
* @type {Object.<string, Object.<string, ol.XmlSerializer>>}
* @private
*/
ol.format.KML.MULTI_GEOMETRY_SERIALIZERS_ = ol.xml.makeStructureNS(
@@ -2725,7 +2725,7 @@ ol.format.KML.PLACEMARK_SEQUENCE_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlSerializer>>}
* @type {Object.<string, Object.<string, ol.XmlSerializer>>}
* @private
*/
ol.format.KML.PLACEMARK_SERIALIZERS_ = ol.xml.makeStructureNS(
@@ -2755,7 +2755,7 @@ ol.format.KML.PLACEMARK_SERIALIZERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlSerializer>>}
* @type {Object.<string, Object.<string, ol.XmlSerializer>>}
* @private
*/
ol.format.KML.PRIMITIVE_GEOMETRY_SERIALIZERS_ = ol.xml.makeStructureNS(
@@ -2767,7 +2767,7 @@ ol.format.KML.PRIMITIVE_GEOMETRY_SERIALIZERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlSerializer>>}
* @type {Object.<string, Object.<string, ol.XmlSerializer>>}
* @private
*/
ol.format.KML.POLYGON_SERIALIZERS_ = ol.xml.makeStructureNS(
@@ -2781,7 +2781,7 @@ ol.format.KML.POLYGON_SERIALIZERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlSerializer>>}
* @type {Object.<string, Object.<string, ol.XmlSerializer>>}
* @private
*/
ol.format.KML.POLY_STYLE_SERIALIZERS_ = ol.xml.makeStructureNS(
@@ -2803,7 +2803,7 @@ ol.format.KML.STYLE_SEQUENCE_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlSerializer>>}
* @type {Object.<string, Object.<string, ol.XmlSerializer>>}
* @private
*/
ol.format.KML.STYLE_SERIALIZERS_ = ol.xml.makeStructureNS(
@@ -2982,7 +2982,7 @@ ol.format.KML.prototype.writeFeaturesNode = function(features, opt_options) {
ol.xml.setAttributeNS(kml, xmlSchemaInstanceUri, 'xsi:schemaLocation',
ol.format.KML.SCHEMA_LOCATION_);
var /** @type {ol.xmlNodeStackItem} */ context = {node: kml};
var /** @type {ol.XmlNodeStackItem} */ context = {node: kml};
var properties = {};
if (features.length > 1) {
properties['Document'] = features;

View File

@@ -165,7 +165,7 @@ ol.format.OSMXML.NAMESPACE_URIS_ = [
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.OSMXML.WAY_PARSERS_ = ol.xml.makeStructureNS(
@@ -177,7 +177,7 @@ ol.format.OSMXML.WAY_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.OSMXML.PARSERS_ = ol.xml.makeStructureNS(
@@ -189,7 +189,7 @@ ol.format.OSMXML.PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.OSMXML.NODE_PARSERS_ = ol.xml.makeStructureNS(

View File

@@ -302,7 +302,7 @@ ol.format.OWS.NAMESPACE_URIS_ = [
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.OWS.PARSERS_ = ol.xml.makeStructureNS(
@@ -318,7 +318,7 @@ ol.format.OWS.PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.OWS.ADDRESS_PARSERS_ = ol.xml.makeStructureNS(
@@ -337,7 +337,7 @@ ol.format.OWS.ADDRESS_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.OWS.ALLOWED_VALUES_PARSERS_ = ol.xml.makeStructureNS(
@@ -348,7 +348,7 @@ ol.format.OWS.ALLOWED_VALUES_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.OWS.CONSTRAINT_PARSERS_ = ol.xml.makeStructureNS(
@@ -360,7 +360,7 @@ ol.format.OWS.CONSTRAINT_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.OWS.CONTACT_INFO_PARSERS_ = ol.xml.makeStructureNS(
@@ -372,7 +372,7 @@ ol.format.OWS.CONTACT_INFO_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.OWS.DCP_PARSERS_ = ol.xml.makeStructureNS(
@@ -383,7 +383,7 @@ ol.format.OWS.DCP_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.OWS.HTTP_PARSERS_ = ol.xml.makeStructureNS(
@@ -395,7 +395,7 @@ ol.format.OWS.HTTP_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.OWS.OPERATION_PARSERS_ = ol.xml.makeStructureNS(
@@ -406,7 +406,7 @@ ol.format.OWS.OPERATION_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.OWS.OPERATIONS_METADATA_PARSERS_ = ol.xml.makeStructureNS(
@@ -417,7 +417,7 @@ ol.format.OWS.OPERATIONS_METADATA_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.OWS.PHONE_PARSERS_ = ol.xml.makeStructureNS(
@@ -429,7 +429,7 @@ ol.format.OWS.PHONE_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.OWS.REQUEST_METHOD_PARSERS_ = ol.xml.makeStructureNS(
@@ -441,7 +441,7 @@ ol.format.OWS.REQUEST_METHOD_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.OWS.SERVICE_CONTACT_PARSERS_ =
@@ -457,7 +457,7 @@ ol.format.OWS.SERVICE_CONTACT_PARSERS_ =
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.OWS.SERVICE_IDENTIFICATION_PARSERS_ =
@@ -472,7 +472,7 @@ ol.format.OWS.SERVICE_IDENTIFICATION_PARSERS_ =
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.OWS.SERVICE_PROVIDER_PARSERS_ =

View File

@@ -130,7 +130,7 @@ ol.format.WFS.prototype.readFeaturesFromNode = function(node, opt_options) {
* Read transaction response of the source.
*
* @param {Document|Node|Object|string} source Source.
* @return {ol.format.WFS.TransactionResponse|undefined} Transaction response.
* @return {ol.WFSTransactionResponse|undefined} Transaction response.
* @api stable
*/
ol.format.WFS.prototype.readTransactionResponse = function(source) {
@@ -153,7 +153,7 @@ ol.format.WFS.prototype.readTransactionResponse = function(source) {
* Read feature collection metadata of the source.
*
* @param {Document|Node|Object|string} source Source.
* @return {ol.format.WFS.FeatureCollectionMetadata|undefined}
* @return {ol.WFSFeatureCollectionMetadata|undefined}
* FeatureCollection metadata.
* @api stable
*/
@@ -176,7 +176,7 @@ ol.format.WFS.prototype.readFeatureCollectionMetadata = function(source) {
/**
* @param {Document} doc Document.
* @return {ol.format.WFS.FeatureCollectionMetadata|undefined}
* @return {ol.WFSFeatureCollectionMetadata|undefined}
* FeatureCollection metadata.
*/
ol.format.WFS.prototype.readFeatureCollectionMetadataFromDocument = function(doc) {
@@ -193,7 +193,7 @@ ol.format.WFS.prototype.readFeatureCollectionMetadataFromDocument = function(doc
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WFS.FEATURE_COLLECTION_PARSERS_ = {
@@ -206,7 +206,7 @@ ol.format.WFS.FEATURE_COLLECTION_PARSERS_ = {
/**
* @param {Node} node Node.
* @return {ol.format.WFS.FeatureCollectionMetadata|undefined}
* @return {ol.WFSFeatureCollectionMetadata|undefined}
* FeatureCollection metadata.
*/
ol.format.WFS.prototype.readFeatureCollectionMetadataFromNode = function(node) {
@@ -219,14 +219,14 @@ ol.format.WFS.prototype.readFeatureCollectionMetadataFromNode = function(node) {
node.getAttribute('numberOfFeatures'));
result['numberOfFeatures'] = value;
return ol.xml.pushParseAndPop(
/** @type {ol.format.WFS.FeatureCollectionMetadata} */ (result),
/** @type {ol.WFSFeatureCollectionMetadata} */ (result),
ol.format.WFS.FEATURE_COLLECTION_PARSERS_, node, [], this.gmlFormat_);
};
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WFS.TRANSACTION_SUMMARY_PARSERS_ = {
@@ -255,7 +255,7 @@ ol.format.WFS.readTransactionSummary_ = function(node, objectStack) {
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WFS.OGC_FID_PARSERS_ = {
@@ -279,7 +279,7 @@ ol.format.WFS.fidParser_ = function(node, objectStack) {
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WFS.INSERT_RESULTS_PARSERS_ = {
@@ -303,7 +303,7 @@ ol.format.WFS.readInsertResults_ = function(node, objectStack) {
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WFS.TRANSACTION_RESPONSE_PARSERS_ = {
@@ -318,7 +318,7 @@ ol.format.WFS.TRANSACTION_RESPONSE_PARSERS_ = {
/**
* @param {Document} doc Document.
* @return {ol.format.WFS.TransactionResponse|undefined} Transaction response.
* @return {ol.WFSTransactionResponse|undefined} Transaction response.
*/
ol.format.WFS.prototype.readTransactionResponseFromDocument = function(doc) {
goog.asserts.assert(doc.nodeType == goog.dom.NodeType.DOCUMENT,
@@ -334,7 +334,7 @@ ol.format.WFS.prototype.readTransactionResponseFromDocument = function(doc) {
/**
* @param {Node} node Node.
* @return {ol.format.WFS.TransactionResponse|undefined} Transaction response.
* @return {ol.WFSTransactionResponse|undefined} Transaction response.
*/
ol.format.WFS.prototype.readTransactionResponseFromNode = function(node) {
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
@@ -342,13 +342,13 @@ ol.format.WFS.prototype.readTransactionResponseFromNode = function(node) {
goog.asserts.assert(node.localName == 'TransactionResponse',
'localName should be TransactionResponse');
return ol.xml.pushParseAndPop(
/** @type {ol.format.WFS.TransactionResponse} */({}),
/** @type {ol.WFSTransactionResponse} */({}),
ol.format.WFS.TRANSACTION_RESPONSE_PARSERS_, node, []);
};
/**
* @type {Object.<string, Object.<string, ol.xmlSerializer>>}
* @type {Object.<string, Object.<string, ol.XmlSerializer>>}
* @private
*/
ol.format.WFS.QUERY_SERIALIZERS_ = {
@@ -497,7 +497,7 @@ ol.format.WFS.writeNative_ = function(node, nativeElement, objectStack) {
/**
* @type {Object.<string, Object.<string, ol.xmlSerializer>>}
* @type {Object.<string, Object.<string, ol.XmlSerializer>>}
* @private
*/
ol.format.WFS.TRANSACTION_SERIALIZERS_ = {
@@ -722,7 +722,7 @@ ol.format.WFS.writeOgcLiteral_ = function(node, value) {
/**
* @type {Object.<string, Object.<string, ol.xmlSerializer>>}
* @type {Object.<string, Object.<string, ol.XmlSerializer>>}
* @private
*/
ol.format.WFS.GETFEATURE_SERIALIZERS_ = {

View File

@@ -568,7 +568,7 @@ ol.format.WMSCapabilities.NAMESPACE_URIS_ = [
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WMSCapabilities.PARSERS_ = ol.xml.makeStructureNS(
@@ -582,7 +582,7 @@ ol.format.WMSCapabilities.PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WMSCapabilities.CAPABILITY_PARSERS_ = ol.xml.makeStructureNS(
@@ -598,7 +598,7 @@ ol.format.WMSCapabilities.CAPABILITY_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WMSCapabilities.SERVICE_PARSERS_ = ol.xml.makeStructureNS(
@@ -626,7 +626,7 @@ ol.format.WMSCapabilities.SERVICE_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WMSCapabilities.CONTACT_INFORMATION_PARSERS_ = ol.xml.makeStructureNS(
@@ -648,7 +648,7 @@ ol.format.WMSCapabilities.CONTACT_INFORMATION_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WMSCapabilities.CONTACT_PERSON_PARSERS_ = ol.xml.makeStructureNS(
@@ -662,7 +662,7 @@ ol.format.WMSCapabilities.CONTACT_PERSON_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WMSCapabilities.CONTACT_ADDRESS_PARSERS_ = ol.xml.makeStructureNS(
@@ -679,7 +679,7 @@ ol.format.WMSCapabilities.CONTACT_ADDRESS_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WMSCapabilities.EXCEPTION_PARSERS_ = ol.xml.makeStructureNS(
@@ -690,7 +690,7 @@ ol.format.WMSCapabilities.EXCEPTION_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WMSCapabilities.LAYER_PARSERS_ = ol.xml.makeStructureNS(
@@ -731,7 +731,7 @@ ol.format.WMSCapabilities.LAYER_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WMSCapabilities.ATTRIBUTION_PARSERS_ = ol.xml.makeStructureNS(
@@ -746,7 +746,7 @@ ol.format.WMSCapabilities.ATTRIBUTION_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WMSCapabilities.EX_GEOGRAPHIC_BOUNDING_BOX_PARSERS_ =
@@ -764,7 +764,7 @@ ol.format.WMSCapabilities.EX_GEOGRAPHIC_BOUNDING_BOX_PARSERS_ =
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WMSCapabilities.REQUEST_PARSERS_ = ol.xml.makeStructureNS(
@@ -780,7 +780,7 @@ ol.format.WMSCapabilities.REQUEST_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WMSCapabilities.OPERATIONTYPE_PARSERS_ = ol.xml.makeStructureNS(
@@ -793,7 +793,7 @@ ol.format.WMSCapabilities.OPERATIONTYPE_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WMSCapabilities.DCPTYPE_PARSERS_ = ol.xml.makeStructureNS(
@@ -805,7 +805,7 @@ ol.format.WMSCapabilities.DCPTYPE_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WMSCapabilities.HTTP_PARSERS_ = ol.xml.makeStructureNS(
@@ -819,7 +819,7 @@ ol.format.WMSCapabilities.HTTP_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WMSCapabilities.STYLE_PARSERS_ = ol.xml.makeStructureNS(
@@ -838,7 +838,7 @@ ol.format.WMSCapabilities.STYLE_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WMSCapabilities.FORMAT_ONLINERESOURCE_PARSERS_ =
@@ -851,7 +851,7 @@ ol.format.WMSCapabilities.FORMAT_ONLINERESOURCE_PARSERS_ =
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WMSCapabilities.KEYWORDLIST_PARSERS_ = ol.xml.makeStructureNS(

View File

@@ -277,7 +277,7 @@ ol.format.WMTSCapabilities.OWS_NAMESPACE_URIS_ = [
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WMTSCapabilities.PARSERS_ = ol.xml.makeStructureNS(
@@ -289,7 +289,7 @@ ol.format.WMTSCapabilities.PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WMTSCapabilities.CONTENTS_PARSERS_ = ol.xml.makeStructureNS(
@@ -303,7 +303,7 @@ ol.format.WMTSCapabilities.CONTENTS_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WMTSCapabilities.LAYER_PARSERS_ = ol.xml.makeStructureNS(
@@ -332,7 +332,7 @@ ol.format.WMTSCapabilities.LAYER_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WMTSCapabilities.STYLE_PARSERS_ = ol.xml.makeStructureNS(
@@ -349,7 +349,7 @@ ol.format.WMTSCapabilities.STYLE_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WMTSCapabilities.TMS_LINKS_PARSERS_ = ol.xml.makeStructureNS(
@@ -361,7 +361,7 @@ ol.format.WMTSCapabilities.TMS_LINKS_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WMTSCapabilities.DIMENSION_PARSERS_ = ol.xml.makeStructureNS(
@@ -378,7 +378,7 @@ ol.format.WMTSCapabilities.DIMENSION_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WMTSCapabilities.WGS84_BBOX_READERS_ = ol.xml.makeStructureNS(
@@ -392,7 +392,7 @@ ol.format.WMTSCapabilities.WGS84_BBOX_READERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WMTSCapabilities.TMS_PARSERS_ = ol.xml.makeStructureNS(
@@ -411,7 +411,7 @@ ol.format.WMTSCapabilities.TMS_PARSERS_ = ol.xml.makeStructureNS(
/**
* @const
* @type {Object.<string, Object.<string, ol.xmlParser>>}
* @type {Object.<string, Object.<string, ol.XmlParser>>}
* @private
*/
ol.format.WMTSCapabilities.TM_PARSERS_ = ol.xml.makeStructureNS(

View File

@@ -71,31 +71,31 @@ ol.render.canvas.Immediate = function(context, pixelRatio, extent, transform, vi
/**
* @private
* @type {?ol.canvasFillState}
* @type {?ol.CanvasFillState}
*/
this.contextFillState_ = null;
/**
* @private
* @type {?ol.canvasStrokeState}
* @type {?ol.CanvasStrokeState}
*/
this.contextStrokeState_ = null;
/**
* @private
* @type {?ol.canvasTextState}
* @type {?ol.CanvasTextState}
*/
this.contextTextState_ = null;
/**
* @private
* @type {?ol.canvasFillState}
* @type {?ol.CanvasFillState}
*/
this.fillState_ = null;
/**
* @private
* @type {?ol.canvasStrokeState}
* @type {?ol.CanvasStrokeState}
*/
this.strokeState_ = null;
@@ -203,19 +203,19 @@ ol.render.canvas.Immediate = function(context, pixelRatio, extent, transform, vi
/**
* @private
* @type {?ol.canvasFillState}
* @type {?ol.CanvasFillState}
*/
this.textFillState_ = null;
/**
* @private
* @type {?ol.canvasStrokeState}
* @type {?ol.CanvasStrokeState}
*/
this.textStrokeState_ = null;
/**
* @private
* @type {?ol.canvasTextState}
* @type {?ol.CanvasTextState}
*/
this.textState_ = null;
@@ -700,7 +700,7 @@ ol.render.canvas.Immediate.prototype.drawMultiPolygon = function(geometry) {
/**
* @param {ol.canvasFillState} fillState Fill state.
* @param {ol.CanvasFillState} fillState Fill state.
* @private
*/
ol.render.canvas.Immediate.prototype.setContextFillState_ = function(fillState) {
@@ -720,7 +720,7 @@ ol.render.canvas.Immediate.prototype.setContextFillState_ = function(fillState)
/**
* @param {ol.canvasStrokeState} strokeState Stroke state.
* @param {ol.CanvasStrokeState} strokeState Stroke state.
* @private
*/
ol.render.canvas.Immediate.prototype.setContextStrokeState_ = function(strokeState) {
@@ -772,7 +772,7 @@ ol.render.canvas.Immediate.prototype.setContextStrokeState_ = function(strokeSta
/**
* @param {ol.canvasTextState} textState Text state.
* @param {ol.CanvasTextState} textState Text state.
* @private
*/
ol.render.canvas.Immediate.prototype.setContextTextState_ = function(textState) {

View File

@@ -1538,19 +1538,19 @@ ol.render.canvas.TextReplay = function(tolerance, maxExtent, resolution) {
/**
* @private
* @type {?ol.canvasFillState}
* @type {?ol.CanvasFillState}
*/
this.replayFillState_ = null;
/**
* @private
* @type {?ol.canvasStrokeState}
* @type {?ol.CanvasStrokeState}
*/
this.replayStrokeState_ = null;
/**
* @private
* @type {?ol.canvasTextState}
* @type {?ol.CanvasTextState}
*/
this.replayTextState_ = null;
@@ -1586,19 +1586,19 @@ ol.render.canvas.TextReplay = function(tolerance, maxExtent, resolution) {
/**
* @private
* @type {?ol.canvasFillState}
* @type {?ol.CanvasFillState}
*/
this.textFillState_ = null;
/**
* @private
* @type {?ol.canvasStrokeState}
* @type {?ol.CanvasStrokeState}
*/
this.textStrokeState_ = null;
/**
* @private
* @type {?ol.canvasTextState}
* @type {?ol.CanvasTextState}
*/
this.textState_ = null;
@@ -1638,7 +1638,7 @@ ol.render.canvas.TextReplay.prototype.drawText = function(flatCoordinates, offse
/**
* @param {ol.canvasFillState} fillState Fill state.
* @param {ol.CanvasFillState} fillState Fill state.
* @private
*/
ol.render.canvas.TextReplay.prototype.setReplayFillState_ = function(fillState) {
@@ -1662,7 +1662,7 @@ ol.render.canvas.TextReplay.prototype.setReplayFillState_ = function(fillState)
/**
* @param {ol.canvasStrokeState} strokeState Stroke state.
* @param {ol.CanvasStrokeState} strokeState Stroke state.
* @private
*/
ol.render.canvas.TextReplay.prototype.setReplayStrokeState_ = function(strokeState) {
@@ -1704,7 +1704,7 @@ ol.render.canvas.TextReplay.prototype.setReplayStrokeState_ = function(strokeSta
/**
* @param {ol.canvasTextState} textState Text state.
* @param {ol.CanvasTextState} textState Text state.
* @private
*/
ol.render.canvas.TextReplay.prototype.setReplayTextState_ = function(textState) {

View File

@@ -104,7 +104,7 @@ ol.renderer.webgl.Map = function(container, map) {
/**
* @private
* @type {ol.structs.LRUCache.<ol.webglTextureCacheEntry|null>}
* @type {ol.structs.LRUCache.<ol.WebglTextureCacheEntry|null>}
*/
this.textureCache_ = new ol.structs.LRUCache();
@@ -294,7 +294,7 @@ ol.renderer.webgl.Map.prototype.disposeInternal = function() {
if (!gl.isContextLost()) {
this.textureCache_.forEach(
/**
* @param {?ol.webglTextureCacheEntry} textureCacheEntry
* @param {?ol.WebglTextureCacheEntry} textureCacheEntry
* Texture cache entry.
*/
function(textureCacheEntry) {

View File

@@ -23,7 +23,7 @@ goog.require('ol.reproj.Triangulation');
* @param {ol.Extent} targetExtent Target extent.
* @param {number} targetResolution Target resolution.
* @param {number} pixelRatio Pixel ratio.
* @param {ol.reprojImageFunctionType} getImageFunction
* @param {ol.ReprojImageFunctionType} getImageFunction
* Function returning source images (extent, resolution, pixelRatio).
*/
ol.reproj.Image = function(sourceProj, targetProj,

View File

@@ -28,7 +28,7 @@ goog.require('ol.reproj.Triangulation');
* @param {ol.TileCoord} wrappedTileCoord Coordinate of the tile wrapped in X.
* @param {number} pixelRatio Pixel ratio.
* @param {number} gutter Gutter of the source tiles.
* @param {ol.reprojTileFunctionType} getTileFunction
* @param {ol.ReprojTileFunctionType} getTileFunction
* Function returning source tiles (z, x, y, pixelRatio).
* @param {number=} opt_errorThreshold Acceptable reprojection error (in px).
* @param {boolean=} opt_renderEdges Render reprojection edges.

View File

@@ -63,7 +63,7 @@ ol.reproj.Triangulation = function(sourceProj, targetProj, targetExtent,
this.errorThresholdSquared_ = errorThreshold * errorThreshold;
/**
* @type {Array.<ol.reprojTriangle>}
* @type {Array.<ol.ReprojTriangle>}
* @private
*/
this.triangles_ = [];
@@ -324,7 +324,7 @@ ol.reproj.Triangulation.prototype.calculateSourceExtent = function() {
/**
* @return {Array.<ol.reprojTriangle>} Array of the calculated triangles.
* @return {Array.<ol.ReprojTriangle>} Array of the calculated triangles.
*/
ol.reproj.Triangulation.prototype.getTriangles = function() {
return this.triangles_;

View File

@@ -19,7 +19,7 @@ goog.require('ol.source.Source');
*
* @constructor
* @extends {ol.source.Source}
* @param {ol.sourceImageOptions} options Single image source options.
* @param {ol.SourceImageOptions} options Single image source options.
* @api
*/
ol.source.Image = function(options) {

View File

@@ -91,7 +91,7 @@ ol.source.Raster = function(options) {
/**
* The most recently rendered state.
* @type {?ol.sourceRasterRenderedState}
* @type {?ol.SourceRasterRenderedState}
* @private
*/
this.renderedState_ = null;

View File

@@ -30,7 +30,7 @@ ol.source.State = {
*
* @constructor
* @extends {ol.Object}
* @param {ol.sourceSourceOptions} options Source options.
* @param {ol.SourceSourceOptions} options Source options.
* @api stable
*/
ol.source.Source = function(options) {

View File

@@ -279,19 +279,19 @@ ol.source.TileImage.prototype.getTile = function(z, x, y, pixelRatio, projection
ol.source.TileImage.prototype.getTileInternal = function(z, x, y, pixelRatio, projection) {
var /** @type {ol.Tile} */ tile = null;
var tileCoordKey = this.getKeyZXY(z, x, y);
var paramsKey = this.getKeyParams();
var key = this.getKey();
if (!this.tileCache.containsKey(tileCoordKey)) {
goog.asserts.assert(projection, 'argument projection is truthy');
tile = this.createTile_(z, x, y, pixelRatio, projection, paramsKey);
tile = this.createTile_(z, x, y, pixelRatio, projection, key);
this.tileCache.set(tileCoordKey, tile);
} else {
tile = /** @type {!ol.Tile} */ (this.tileCache.get(tileCoordKey));
if (tile.key != paramsKey) {
if (tile.key != key) {
// The source's params changed. If the tile has an interim tile and if we
// can use it then we use it. Otherwise we create a new tile. In both
// cases we attempt to assign an interim tile to the new tile.
var /** @type {ol.Tile} */ interimTile = tile;
if (tile.interimTile && tile.interimTile.key == paramsKey) {
if (tile.interimTile && tile.interimTile.key == key) {
goog.asserts.assert(tile.interimTile.getState() == ol.TileState.LOADED);
goog.asserts.assert(tile.interimTile.interimTile === null);
tile = tile.interimTile;
@@ -299,7 +299,7 @@ ol.source.TileImage.prototype.getTileInternal = function(z, x, y, pixelRatio, pr
tile.interimTile = interimTile;
}
} else {
tile = this.createTile_(z, x, y, pixelRatio, projection, paramsKey);
tile = this.createTile_(z, x, y, pixelRatio, projection, key);
if (interimTile.getState() == ol.TileState.LOADED) {
tile.interimTile = interimTile;
} else if (interimTile.interimTile &&

View File

@@ -22,7 +22,7 @@ goog.require('ol.tilegrid.TileGrid');
*
* @constructor
* @extends {ol.source.Source}
* @param {ol.sourceTileOptions} options Tile source options.
* @param {ol.SourceTileOptions} options Tile source options.
* @api
*/
ol.source.Tile = function(options) {
@@ -67,6 +67,12 @@ ol.source.Tile = function(options) {
*/
this.tmpSize = [0, 0];
/**
* @private
* @type {string}
*/
this.key_ = '';
};
goog.inherits(ol.source.Tile, ol.source.Source);
@@ -138,13 +144,25 @@ ol.source.Tile.prototype.getGutter = function(projection) {
/**
* Return the "parameters" key, a string composed of the source's
* parameters/dimensions.
* @return {string} The parameters key.
* Return the key to be used for all tiles in the source.
* @return {string} The key for all tiles.
* @protected
*/
ol.source.Tile.prototype.getKeyParams = function() {
return '';
ol.source.Tile.prototype.getKey = function() {
return this.key_;
};
/**
* Set the value to be used as the key for all tiles in the source.
* @param {string} key The key for tiles.
* @protected
*/
ol.source.Tile.prototype.setKey = function(key) {
if (this.key_ !== key) {
this.key_ = key;
this.changed();
}
};

View File

@@ -63,13 +63,6 @@ ol.source.TileWMS = function(opt_options) {
*/
this.params_ = params;
/**
* @private
* @type {string}
*/
this.paramsKey_ = '';
this.resetParamsKey_();
/**
* @private
* @type {boolean}
@@ -103,6 +96,7 @@ ol.source.TileWMS = function(opt_options) {
this.tmpExtent_ = ol.extent.createEmpty();
this.updateV13_();
this.setKey(this.getKeyForParams_());
};
goog.inherits(ol.source.TileWMS, ol.source.TileImage);
@@ -182,14 +176,6 @@ ol.source.TileWMS.prototype.getGutterInternal = function() {
};
/**
* @inheritDoc
*/
ol.source.TileWMS.prototype.getKeyParams = function() {
return this.paramsKey_;
};
/**
* @inheritDoc
*/
@@ -311,14 +297,15 @@ ol.source.TileWMS.prototype.resetCoordKeyPrefix_ = function() {
/**
* @private
* @return {string} The key for the current params.
*/
ol.source.TileWMS.prototype.resetParamsKey_ = function() {
ol.source.TileWMS.prototype.getKeyForParams_ = function() {
var i = 0;
var res = [];
for (var key in this.params_) {
res[i++] = key + '-' + this.params_[key];
}
this.paramsKey_ = res.join('/');
return res.join('/');
};
@@ -378,9 +365,8 @@ ol.source.TileWMS.prototype.fixedTileUrlFunction = function(tileCoord, pixelRati
ol.source.TileWMS.prototype.updateParams = function(params) {
ol.object.assign(this.params_, params);
this.resetCoordKeyPrefix_();
this.resetParamsKey_();
this.updateV13_();
this.changed();
this.setKey(this.getKeyForParams_());
};

View File

@@ -14,7 +14,7 @@ goog.require('ol.source.TileEvent');
* @constructor
* @fires ol.source.TileEvent
* @extends {ol.source.Tile}
* @param {ol.sourceUrlTileOptions} options Image tile options.
* @param {ol.SourceUrlTileOptions} options Image tile options.
*/
ol.source.UrlTile = function(options) {
@@ -143,15 +143,16 @@ ol.source.UrlTile.prototype.setTileLoadFunction = function(tileLoadFunction) {
/**
* Set the tile URL function of the source.
* @param {ol.TileUrlFunctionType} tileUrlFunction Tile URL function.
* @param {string=} opt_key Optional new tile key for the source.
* @api
*/
ol.source.UrlTile.prototype.setTileUrlFunction = function(tileUrlFunction) {
// FIXME It should be possible to be more intelligent and avoid clearing the
// FIXME cache. The tile URL function would need to be incorporated into the
// FIXME cache key somehow.
this.tileCache.clear();
ol.source.UrlTile.prototype.setTileUrlFunction = function(tileUrlFunction, opt_key) {
this.tileUrlFunction = tileUrlFunction;
this.changed();
if (typeof opt_key !== 'undefined') {
this.setKey(opt_key);
} else {
this.changed();
}
};
@@ -164,7 +165,7 @@ ol.source.UrlTile.prototype.setUrl = function(url) {
var urls = this.urls = ol.TileUrlFunction.expandUrl(url);
this.setTileUrlFunction(this.fixedTileUrlFunction ?
this.fixedTileUrlFunction.bind(this) :
ol.TileUrlFunction.createFromTemplates(urls, this.tileGrid));
ol.TileUrlFunction.createFromTemplates(urls, this.tileGrid), url);
};
@@ -175,9 +176,10 @@ ol.source.UrlTile.prototype.setUrl = function(url) {
*/
ol.source.UrlTile.prototype.setUrls = function(urls) {
this.urls = urls;
var key = urls.join('\n');
this.setTileUrlFunction(this.fixedTileUrlFunction ?
this.fixedTileUrlFunction.bind(this) :
ol.TileUrlFunction.createFromTemplates(urls, this.tileGrid));
ol.TileUrlFunction.createFromTemplates(urls, this.tileGrid), key);
};

View File

@@ -54,13 +54,6 @@ ol.source.WMTS = function(options) {
*/
this.dimensions_ = options.dimensions !== undefined ? options.dimensions : {};
/**
* @private
* @type {string}
*/
this.dimensionsKey_ = '';
this.resetDimensionsKey_();
/**
* @private
* @type {string}
@@ -187,6 +180,8 @@ ol.source.WMTS = function(options) {
wrapX: options.wrapX !== undefined ? options.wrapX : false
});
this.setKey(this.getKeyForDimensions_());
};
goog.inherits(ol.source.WMTS, ol.source.TileImage);
@@ -213,14 +208,6 @@ ol.source.WMTS.prototype.getFormat = function() {
};
/**
* @inheritDoc
*/
ol.source.WMTS.prototype.getKeyParams = function() {
return this.dimensionsKey_;
};
/**
* Return the layer of the WMTS source.
* @return {string} Layer.
@@ -273,14 +260,15 @@ ol.source.WMTS.prototype.getVersion = function() {
/**
* @private
* @return {string} The key for the current dimensions.
*/
ol.source.WMTS.prototype.resetDimensionsKey_ = function() {
ol.source.WMTS.prototype.getKeyForDimensions_ = function() {
var i = 0;
var res = [];
for (var key in this.dimensions_) {
res[i++] = key + '-' + this.dimensions_[key];
}
this.dimensionsKey_ = res.join('/');
return res.join('/');
};
@@ -291,8 +279,7 @@ ol.source.WMTS.prototype.resetDimensionsKey_ = function() {
*/
ol.source.WMTS.prototype.updateDimensions = function(dimensions) {
ol.object.assign(this.dimensions_, dimensions);
this.resetDimensionsKey_();
this.changed();
this.setKey(this.getKeyForDimensions_());
};

View File

@@ -22,10 +22,11 @@ goog.require('ol.source.TileImage');
*
* @constructor
* @extends {ol.source.TileImage}
* @param {olx.source.XYZOptions} options XYZ options.
* @param {olx.source.XYZOptions=} opt_options XYZ options.
* @api stable
*/
ol.source.XYZ = function(options) {
ol.source.XYZ = function(opt_options) {
var options = opt_options || {};
var projection = options.projection !== undefined ?
options.projection : 'EPSG:3857';

View File

@@ -1,26 +0,0 @@
/**
* typedefs for the WFS sub-sub-namespace
* See typedefs.js for more details
*/
goog.provide('ol.format.WFS.FeatureCollectionMetadata');
goog.provide('ol.format.WFS.TransactionResponse');
/**
* Number of features; bounds/extent.
* @typedef {{numberOfFeatures: number,
* bounds: ol.Extent}}
* @api stable
*/
ol.format.WFS.FeatureCollectionMetadata;
/**
* Total deleted; total inserted; total updated; array of insert ids.
* @typedef {{totalDeleted: number,
* totalInserted: number,
* totalUpdated: number,
* insertIds: Array.<string>}}
* @api stable
*/
ol.format.WFS.TransactionResponse;

View File

@@ -4,15 +4,12 @@
* These look like vars (or var properties), but in fact are simply identifiers
* for the Closure compiler. Originally they were included in the appropriate
* namespace file, but with the move away from Closure namespaces and towards
* self-contained standard modules are now all in this file, with two exceptions.
* self-contained standard modules are now all in this file.
* Unlike the other type definitions - enums and constructor functions - they
* are not code and so are not imported or exported. They are only referred to
* in type-defining comments used by the Closure compiler, and so should not
* appear in module code.
*
* The 2 exceptions are the WFS typedefs which are in a sub-sub-namespace and
* are API. These have been put in their own separate file.
*
* When the code is converted to ES6 modules, the namespace structure will
* disappear, and these typedefs will have to be renamed accordingly, but the
* namespace structure is maintained for the present for backwards compatibility.
@@ -40,6 +37,12 @@ goog.provide('ol.style.AtlasBlock');
ol.AttributionLike;
/**
* @typedef {{fillStyle: ol.ColorLike}}
*/
ol.CanvasFillState;
/**
* A function returning the canvas element (`{HTMLCanvasElement}`)
* used by the source as an image. The arguments passed to the function are:
@@ -56,6 +59,25 @@ ol.AttributionLike;
ol.CanvasFunctionType;
/**
* @typedef {{lineCap: string,
* lineDash: Array.<number>,
* lineJoin: string,
* lineWidth: number,
* miterLimit: number,
* strokeStyle: string}}
*/
ol.CanvasStrokeState;
/**
* @typedef {{font: string,
* textAlign: string,
* textBaseline: string}}
*/
ol.CanvasTextState;
/**
* @typedef {function((ol.Coordinate|undefined)): (ol.Coordinate|undefined)}
*/
@@ -269,6 +291,27 @@ ol.PostRenderFunction;
ol.PreRenderFunction;
/**
* @typedef {function(ol.Extent, number, number) : ol.ImageBase}
*/
ol.ReprojImageFunctionType;
/**
* @typedef {function(number, number, number, number) : ol.Tile}
*/
ol.ReprojTileFunctionType;
/**
* Single triangle; consists of 3 source points and 3 target points.
*
* @typedef {{source: Array.<ol.Coordinate>,
* target: Array.<ol.Coordinate>}}
*/
ol.ReprojTriangle;
/**
* @typedef {function((number|undefined), number, number): (number|undefined)}
*/
@@ -289,6 +332,69 @@ ol.RotationConstraintType;
ol.Size;
/**
* @typedef {{attributions: (ol.AttributionLike|undefined),
* extent: (null|ol.Extent|undefined),
* logo: (string|olx.LogoOptions|undefined),
* projection: ol.proj.ProjectionLike,
* resolutions: (Array.<number>|undefined),
* state: (ol.source.State|undefined)}}
*/
ol.SourceImageOptions;
/**
* @typedef {{revision: number,
* resolution: number,
* extent: ol.Extent}}
*/
ol.SourceRasterRenderedState;
/**
* @typedef {{attributions: (ol.AttributionLike|undefined),
* logo: (string|olx.LogoOptions|undefined),
* projection: ol.proj.ProjectionLike,
* state: (ol.source.State|undefined),
* wrapX: (boolean|undefined)}}
*/
ol.SourceSourceOptions;
/**
* @typedef {{attributions: (ol.AttributionLike|undefined),
* cacheSize: (number|undefined),
* extent: (ol.Extent|undefined),
* logo: (string|olx.LogoOptions|undefined),
* opaque: (boolean|undefined),
* tilePixelRatio: (number|undefined),
* projection: ol.proj.ProjectionLike,
* state: (ol.source.State|undefined),
* tileGrid: (ol.tilegrid.TileGrid|undefined),
* wrapX: (boolean|undefined)}}
*/
ol.SourceTileOptions;
/**
* @typedef {{attributions: (ol.AttributionLike|undefined),
* cacheSize: (number|undefined),
* extent: (ol.Extent|undefined),
* logo: (string|olx.LogoOptions|undefined),
* opaque: (boolean|undefined),
* projection: ol.proj.ProjectionLike,
* state: (ol.source.State|undefined),
* tileGrid: (ol.tilegrid.TileGrid|undefined),
* tileLoadFunction: ol.TileLoadFunctionType,
* tilePixelRatio: (number|undefined),
* tileUrlFunction: (ol.TileUrlFunctionType|undefined),
* url: (string|undefined),
* urls: (Array.<string>|undefined),
* wrapX: (boolean|undefined)}}
*/
ol.SourceUrlTileOptions;
/**
* An array of three numbers representing the location of a tile in a tile
* grid. The order is `z`, `x`, and `y`. `z` is the zoom level.
@@ -355,6 +461,39 @@ ol.TileUrlFunctionType;
ol.TransformFunction;
/**
* @typedef {{buf: ol.webgl.Buffer,
* buffer: WebGLBuffer}}
*/
ol.WebglBufferCacheEntry;
/**
* @typedef {{magFilter: number, minFilter: number, texture: WebGLTexture}}
*/
ol.WebglTextureCacheEntry;
/**
* Number of features; bounds/extent.
* @typedef {{numberOfFeatures: number,
* bounds: ol.Extent}}
* @api stable
*/
ol.WFSFeatureCollectionMetadata;
/**
* Total deleted; total inserted; total updated; array of insert ids.
* @typedef {{totalDeleted: number,
* totalInserted: number,
* totalUpdated: number,
* insertIds: Array.<string>}}
* @api stable
*/
ol.WFSTransactionResponse;
/**
* @typedef {{type: number, value: (number|string|undefined), position: number}}
*/
@@ -362,28 +501,24 @@ ol.WKTToken;
/**
* @typedef {{fillStyle: ol.ColorLike}}
* When using {@link ol.xml.makeChildAppender} or
* {@link ol.xml.makeSimpleNodeFactory}, the top `objectStack` item needs to
* have this structure.
* @typedef {{node:Node}}
*/
ol.canvasFillState;
ol.XmlNodeStackItem;
/**
* @typedef {{lineCap: string,
* lineDash: Array.<number>,
* lineJoin: string,
* lineWidth: number,
* miterLimit: number,
* strokeStyle: string}}
* @typedef {function(Node, Array.<*>)}
*/
ol.canvasStrokeState;
ol.XmlParser;
/**
* @typedef {{font: string,
* textAlign: string,
* textBaseline: string}}
* @typedef {function(Node, *, Array.<*>)}
*/
ol.canvasTextState;
ol.XmlSerializer;
/**
@@ -529,90 +664,6 @@ ol.raster.Operation;
ol.raster.Pixel;
/**
* @typedef {function(ol.Extent, number, number) : ol.ImageBase}
*/
ol.reprojImageFunctionType;
/**
* @typedef {function(number, number, number, number) : ol.Tile}
*/
ol.reprojTileFunctionType;
/**
* Single triangle; consists of 3 source points and 3 target points.
*
* @typedef {{source: Array.<ol.Coordinate>,
* target: Array.<ol.Coordinate>}}
*/
ol.reprojTriangle;
/**
* @typedef {{attributions: (ol.AttributionLike|undefined),
* extent: (null|ol.Extent|undefined),
* logo: (string|olx.LogoOptions|undefined),
* projection: ol.proj.ProjectionLike,
* resolutions: (Array.<number>|undefined),
* state: (ol.source.State|undefined)}}
*/
ol.sourceImageOptions;
/**
* @typedef {{revision: number,
* resolution: number,
* extent: ol.Extent}}
*/
ol.sourceRasterRenderedState;
/**
* @typedef {{attributions: (ol.AttributionLike|undefined),
* logo: (string|olx.LogoOptions|undefined),
* projection: ol.proj.ProjectionLike,
* state: (ol.source.State|undefined),
* wrapX: (boolean|undefined)}}
*/
ol.sourceSourceOptions;
/**
* @typedef {{attributions: (ol.AttributionLike|undefined),
* cacheSize: (number|undefined),
* extent: (ol.Extent|undefined),
* logo: (string|olx.LogoOptions|undefined),
* opaque: (boolean|undefined),
* tilePixelRatio: (number|undefined),
* projection: ol.proj.ProjectionLike,
* state: (ol.source.State|undefined),
* tileGrid: (ol.tilegrid.TileGrid|undefined),
* wrapX: (boolean|undefined)}}
*/
ol.sourceTileOptions;
/**
* @typedef {{attributions: (ol.AttributionLike|undefined),
* cacheSize: (number|undefined),
* extent: (ol.Extent|undefined),
* logo: (string|olx.LogoOptions|undefined),
* opaque: (boolean|undefined),
* projection: ol.proj.ProjectionLike,
* state: (ol.source.State|undefined),
* tileGrid: (ol.tilegrid.TileGrid|undefined),
* tileLoadFunction: ol.TileLoadFunctionType,
* tilePixelRatio: (number|undefined),
* tileUrlFunction: (ol.TileUrlFunctionType|undefined),
* url: (string|undefined),
* urls: (Array.<string>|undefined),
* wrapX: (boolean|undefined)}}
*/
ol.sourceUrlTileOptions;
/**
* @typedef {{x: number, y: number, width: number, height: number}}
*/
@@ -691,37 +742,3 @@ ol.style.RegularShapeRenderOptions;
* @api
*/
ol.style.StyleFunction;
/**
* @typedef {{buf: ol.webgl.Buffer,
* buffer: WebGLBuffer}}
*/
ol.webglBufferCacheEntry;
/**
* @typedef {{magFilter: number, minFilter: number, texture: WebGLTexture}}
*/
ol.webglTextureCacheEntry;
/**
* When using {@link ol.xml.makeChildAppender} or
* {@link ol.xml.makeSimpleNodeFactory}, the top `objectStack` item needs to
* have this structure.
* @typedef {{node:Node}}
*/
ol.xmlNodeStackItem;
/**
* @typedef {function(Node, Array.<*>)}
*/
ol.xmlParser;
/**
* @typedef {function(Node, *, Array.<*>)}
*/
ol.xmlSerializer;

View File

@@ -35,7 +35,7 @@ ol.webgl.Context = function(canvas, gl) {
/**
* @private
* @type {Object.<string, ol.webglBufferCacheEntry>}
* @type {Object.<string, ol.WebglBufferCacheEntry>}
*/
this.bufferCache_ = {};

View File

@@ -123,7 +123,7 @@ ol.xml.parse = function(xml) {
* @param {function(this: T, Node, Array.<*>): (Array.<*>|undefined)}
* valueReader Value reader.
* @param {T=} opt_this The object to use as `this` in `valueReader`.
* @return {ol.xmlParser} Parser.
* @return {ol.XmlParser} Parser.
* @template T
*/
ol.xml.makeArrayExtender = function(valueReader, opt_this) {
@@ -152,7 +152,7 @@ ol.xml.makeArrayExtender = function(valueReader, opt_this) {
* object stack.
* @param {function(this: T, Node, Array.<*>): *} valueReader Value reader.
* @param {T=} opt_this The object to use as `this` in `valueReader`.
* @return {ol.xmlParser} Parser.
* @return {ol.XmlParser} Parser.
* @template T
*/
ol.xml.makeArrayPusher = function(valueReader, opt_this) {
@@ -179,7 +179,7 @@ ol.xml.makeArrayPusher = function(valueReader, opt_this) {
* top of the stack.
* @param {function(this: T, Node, Array.<*>): *} valueReader Value reader.
* @param {T=} opt_this The object to use as `this` in `valueReader`.
* @return {ol.xmlParser} Parser.
* @return {ol.XmlParser} Parser.
* @template T
*/
ol.xml.makeReplacer = function(valueReader, opt_this) {
@@ -204,7 +204,7 @@ ol.xml.makeReplacer = function(valueReader, opt_this) {
* @param {function(this: T, Node, Array.<*>): *} valueReader Value reader.
* @param {string=} opt_property Property.
* @param {T=} opt_this The object to use as `this` in `valueReader`.
* @return {ol.xmlParser} Parser.
* @return {ol.XmlParser} Parser.
* @template T
*/
ol.xml.makeObjectPropertyPusher = function(valueReader, opt_property, opt_this) {
@@ -242,7 +242,7 @@ ol.xml.makeObjectPropertyPusher = function(valueReader, opt_property, opt_this)
* @param {function(this: T, Node, Array.<*>): *} valueReader Value reader.
* @param {string=} opt_property Property.
* @param {T=} opt_this The object to use as `this` in `valueReader`.
* @return {ol.xmlParser} Parser.
* @return {ol.XmlParser} Parser.
* @template T
*/
ol.xml.makeObjectPropertySetter = function(valueReader, opt_property, opt_this) {
@@ -272,11 +272,11 @@ ol.xml.makeObjectPropertySetter = function(valueReader, opt_property, opt_this)
/**
* Create a serializer that appends nodes written by its `nodeWriter` to its
* designated parent. The parent is the `node` of the
* {@link ol.xmlNodeStackItem} at the top of the `objectStack`.
* {@link ol.XmlNodeStackItem} at the top of the `objectStack`.
* @param {function(this: T, Node, V, Array.<*>)}
* nodeWriter Node writer.
* @param {T=} opt_this The object to use as `this` in `nodeWriter`.
* @return {ol.xmlSerializer} Serializer.
* @return {ol.XmlSerializer} Serializer.
* @template T, V
*/
ol.xml.makeChildAppender = function(nodeWriter, opt_this) {
@@ -305,7 +305,7 @@ ol.xml.makeChildAppender = function(nodeWriter, opt_this) {
* @param {function(this: T, Node, V, Array.<*>)}
* nodeWriter Node writer.
* @param {T=} opt_this The object to use as `this` in `nodeWriter`.
* @return {ol.xmlSerializer} Serializer.
* @return {ol.XmlSerializer} Serializer.
* @template T, V
*/
ol.xml.makeArraySerializer = function(nodeWriter, opt_this) {
@@ -422,7 +422,7 @@ ol.xml.makeStructureNS = function(namespaceURIs, structure, opt_structureNS) {
/**
* Parse a node using the parsers and object stack.
* @param {Object.<string, Object.<string, ol.xmlParser>>} parsersNS
* @param {Object.<string, Object.<string, ol.XmlParser>>} parsersNS
* Parsers by namespace.
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
@@ -445,7 +445,7 @@ ol.xml.parseNode = function(parsersNS, node, objectStack, opt_this) {
/**
* Push an object on top of the stack, parse and return the popped object.
* @param {T} object Object.
* @param {Object.<string, Object.<string, ol.xmlParser>>} parsersNS
* @param {Object.<string, Object.<string, ol.XmlParser>>} parsersNS
* Parsers by namespace.
* @param {Node} node Node.
* @param {Array.<*>} objectStack Object stack.
@@ -463,7 +463,7 @@ ol.xml.pushParseAndPop = function(
/**
* Walk through an array of `values` and call a serializer for each value.
* @param {Object.<string, Object.<string, ol.xmlSerializer>>} serializersNS
* @param {Object.<string, Object.<string, ol.XmlSerializer>>} serializersNS
* Namespaced serializers.
* @param {function(this: T, *, Array.<*>, (string|undefined)): (Node|undefined)} nodeFactory
* Node factory. The `nodeFactory` creates the node whose namespace and name
@@ -503,7 +503,7 @@ ol.xml.serialize = function(
/**
* @param {O} object Object.
* @param {Object.<string, Object.<string, ol.xmlSerializer>>} serializersNS
* @param {Object.<string, Object.<string, ol.XmlSerializer>>} serializersNS
* Namespaced serializers.
* @param {function(this: T, *, Array.<*>, (string|undefined)): (Node|undefined)} nodeFactory
* Node factory. The `nodeFactory` creates the node whose namespace and name

View File

@@ -27,7 +27,7 @@ describe('ol.source.TileImage', function() {
beforeEach(function() {
source = createSource();
expect(source.getKeyParams()).to.be('');
expect(source.getKey()).to.be('');
source.getTileInternal(0, 0, -1, 1, ol.proj.get('EPSG:3857'));
expect(source.tileCache.getCount()).to.be(1);
tile = source.tileCache.get(source.getKeyZXY(0, 0, -1));
@@ -43,7 +43,7 @@ describe('ol.source.TileImage', function() {
describe('tile is not loaded', function() {
it('returns a tile with no interim tile', function() {
source.getKeyParams = function() {
source.getKey = function() {
return 'key0';
};
var returnedTile = source.getTileInternal(
@@ -56,7 +56,7 @@ describe('ol.source.TileImage', function() {
describe('tile is loaded', function() {
it('returns a tile with interim tile', function() {
source.getKeyParams = function() {
source.getKey = function() {
return 'key0';
};
tile.state = ol.TileState.LOADED;
@@ -71,7 +71,7 @@ describe('ol.source.TileImage', function() {
describe('tile is not loaded but interim tile is', function() {
it('returns a tile with interim tile', function() {
var dynamicParamsKey, returnedTile;
source.getKeyParams = function() {
source.getKey = function() {
return dynamicParamsKey;
};
dynamicParamsKey = 'key0';

View File

@@ -12,6 +12,47 @@ describe('ol.source.Tile', function() {
});
});
describe('#setKey()', function() {
it('sets the source key', function() {
var source = new ol.source.Tile({});
expect(source.getKey()).to.equal('');
var key = 'foo';
source.setKey(key);
expect(source.getKey()).to.equal(key);
});
});
describe('#setKey()', function() {
it('dispatches a change event', function(done) {
var source = new ol.source.Tile({});
var key = 'foo';
source.once('change', function() {
done();
});
source.setKey(key);
});
it('does not dispatch change if key does not change', function(done) {
var source = new ol.source.Tile({});
var key = 'foo';
source.once('change', function() {
source.once('change', function() {
done(new Error('Unexpected change event after source.setKey()'));
});
setTimeout(function() {
done();
}, 10);
source.setKey(key); // this should not result in a change event
});
source.setKey(key); // this should result in a change event
});
});
describe('#forEachLoadedTile()', function() {
var callback;

View File

@@ -3,6 +3,54 @@ goog.provide('ol.test.source.UrlTile');
describe('ol.source.UrlTile', function() {
describe('#setUrl()', function() {
it('sets the URL for the source', function() {
var source = new ol.source.UrlTile({});
var url = 'https://example.com/';
source.setUrl(url);
expect(source.getUrls()).to.eql([url]);
});
it('updates the key for the source', function() {
var source = new ol.source.UrlTile({});
var url = 'https://example.com/';
source.setUrl(url);
expect(source.getKey()).to.eql(url);
});
});
describe('#setUrls()', function() {
it('sets the URL for the source', function() {
var source = new ol.source.UrlTile({});
var urls = [
'https://a.example.com/',
'https://b.example.com/',
'https://c.example.com/'
];
source.setUrls(urls);
expect(source.getUrls()).to.eql(urls);
});
it('updates the key for the source', function() {
var source = new ol.source.UrlTile({});
var urls = [
'https://a.example.com/',
'https://b.example.com/',
'https://c.example.com/'
];
source.setUrls(urls);
expect(source.getKey()).to.eql(urls.join('\n'));
});
});
describe('url option', function() {
it('expands url template', function() {
var tileSource = new ol.source.UrlTile({

View File

@@ -5,6 +5,14 @@ describe('ol.source.XYZ', function() {
describe('constructor', function() {
it('can be constructed without options', function() {
var source = new ol.source.XYZ();
expect(source).to.be.an(ol.source.XYZ);
expect(source).to.be.an(ol.source.TileImage);
expect(source).to.be.an(ol.source.UrlTile);
expect(source).to.be.an(ol.source.Tile);
});
it('can be constructed with a custom tile grid', function() {
var tileGrid = ol.tilegrid.createXYZ();
var tileSource = new ol.source.XYZ({
@@ -179,4 +187,7 @@ describe('ol.source.XYZ', function() {
});
goog.require('ol.source.Tile');
goog.require('ol.source.TileImage');
goog.require('ol.source.UrlTile');
goog.require('ol.source.XYZ');