Add tests and documentation for ol.net.jsonp

ol.net.Jsonp was renamed to ol.net.jsonp, because it is not a constructor.
This commit is contained in:
Andreas Hocevar
2016-01-31 23:03:36 +01:00
parent 8d0ef13505
commit 136c8af878
6 changed files with 84 additions and 15 deletions

View File

@@ -5,7 +5,7 @@ goog.require('ol.Attribution');
goog.require('ol.TileRange');
goog.require('ol.TileUrlFunction');
goog.require('ol.extent');
goog.require('ol.net.Jsonp');
goog.require('ol.net');
goog.require('ol.proj');
goog.require('ol.source.State');
goog.require('ol.source.TileImage');
@@ -49,7 +49,7 @@ ol.source.BingMaps = function(options) {
options.imagerySet +
'?uriScheme=https&include=ImageryProviders&key=' + options.key;
ol.net.Jsonp(url, this.handleImageryMetadataResponse.bind(this), undefined,
ol.net.jsonp(url, this.handleImageryMetadataResponse.bind(this), undefined,
'jsonp');
};

View File

@@ -12,7 +12,7 @@ goog.require('ol.Attribution');
goog.require('ol.TileRange');
goog.require('ol.TileUrlFunction');
goog.require('ol.extent');
goog.require('ol.net.Jsonp');
goog.require('ol.net');
goog.require('ol.proj');
goog.require('ol.source.State');
goog.require('ol.source.TileImage');
@@ -40,7 +40,7 @@ ol.source.TileJSON = function(options) {
});
if (options.jsonp) {
ol.net.Jsonp(options.url, this.handleTileJSONResponse.bind(this),
ol.net.jsonp(options.url, this.handleTileJSONResponse.bind(this),
this.handleTileJSONError.bind(this));
} else {
var xhr = new XMLHttpRequest();

View File

@@ -9,7 +9,7 @@ goog.require('ol.TileUrlFunction');
goog.require('ol.events');
goog.require('ol.events.EventType');
goog.require('ol.extent');
goog.require('ol.net.Jsonp');
goog.require('ol.net');
goog.require('ol.proj');
goog.require('ol.source.State');
goog.require('ol.source.Tile');
@@ -49,7 +49,7 @@ ol.source.TileUTFGrid = function(options) {
*/
this.template_ = undefined;
ol.net.Jsonp(options.url, this.handleTileJSONResponse.bind(this));
ol.net.jsonp(options.url, this.handleTileJSONResponse.bind(this));
};
goog.inherits(ol.source.TileUTFGrid, ol.source.Tile);
@@ -359,7 +359,7 @@ ol.source.TileUTFGridTile_.prototype.handleLoad_ = function(json) {
ol.source.TileUTFGridTile_.prototype.loadInternal_ = function() {
if (this.state == ol.TileState.IDLE) {
this.state = ol.TileState.LOADING;
ol.net.Jsonp(this.src_, this.handleLoad_.bind(this),
ol.net.jsonp(this.src_, this.handleLoad_.bind(this),
this.handleError_.bind(this));
}
};