Rename _ol_format_GeoJSON_ to GeoJSON

This commit is contained in:
Tim Schaub
2017-12-17 01:42:56 -07:00
parent 96a05fa0ed
commit 8656e794ff
31 changed files with 135 additions and 135 deletions

View File

@@ -1,7 +1,7 @@
import _ol_Map_ from '../src/ol/Map.js';
import _ol_View_ from '../src/ol/View.js';
import _ol_events_condition_ from '../src/ol/events/condition.js';
import _ol_format_GeoJSON_ from '../src/ol/format/GeoJSON.js';
import GeoJSON from '../src/ol/format/GeoJSON.js';
import DragBox from '../src/ol/interaction/DragBox.js';
import _ol_interaction_Select_ from '../src/ol/interaction/Select.js';
import _ol_layer_Tile_ from '../src/ol/layer/Tile.js';
@@ -12,7 +12,7 @@ import _ol_source_Vector_ from '../src/ol/source/Vector.js';
var vectorSource = new _ol_source_Vector_({
url: 'data/geojson/countries.geojson',
format: new _ol_format_GeoJSON_()
format: new GeoJSON()
});

View File

@@ -1,7 +1,7 @@
import _ol_Map_ from '../src/ol/Map.js';
import _ol_View_ from '../src/ol/View.js';
import * as _ol_extent_ from '../src/ol/extent.js';
import _ol_format_GeoJSON_ from '../src/ol/format/GeoJSON.js';
import GeoJSON from '../src/ol/format/GeoJSON.js';
import _ol_has_ from '../src/ol/has.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js';
import {fromLonLat} from '../src/ol/proj.js';
@@ -84,7 +84,7 @@ var getStackedStyle = function(feature, resolution) {
var vectorLayer = new _ol_layer_Vector_({
source: new _ol_source_Vector_({
url: 'data/geojson/countries.geojson',
format: new _ol_format_GeoJSON_()
format: new GeoJSON()
}),
style: getStackedStyle
});

View File

@@ -1,7 +1,7 @@
import _ol_Map_ from '../src/ol/Map.js';
import _ol_View_ from '../src/ol/View.js';
import _ol_control_ from '../src/ol/control.js';
import _ol_format_GeoJSON_ from '../src/ol/format/GeoJSON.js';
import GeoJSON from '../src/ol/format/GeoJSON.js';
import _ol_layer_Tile_ from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
@@ -13,7 +13,7 @@ import _ol_style_Style_ from '../src/ol/style/Style.js';
var source = new _ol_source_Vector_({
url: 'data/geojson/switzerland.geojson',
format: new _ol_format_GeoJSON_()
format: new GeoJSON()
});
var style = new _ol_style_Style_({
fill: new _ol_style_Fill_({

View File

@@ -1,7 +1,7 @@
import _ol_Map_ from '../src/ol/Map.js';
import _ol_View_ from '../src/ol/View.js';
import _ol_format_GPX_ from '../src/ol/format/GPX.js';
import _ol_format_GeoJSON_ from '../src/ol/format/GeoJSON.js';
import GeoJSON from '../src/ol/format/GeoJSON.js';
import _ol_format_IGC_ from '../src/ol/format/IGC.js';
import _ol_format_KML_ from '../src/ol/format/KML.js';
import _ol_format_TopoJSON_ from '../src/ol/format/TopoJSON.js';
@@ -86,7 +86,7 @@ var styleFunction = function(feature, resolution) {
var dragAndDropInteraction = new DragAndDrop({
formatConstructors: [
_ol_format_GPX_,
_ol_format_GeoJSON_,
GeoJSON,
_ol_format_IGC_,
_ol_format_KML_,
_ol_format_TopoJSON_

View File

@@ -1,7 +1,7 @@
import _ol_Map_ from '../src/ol/Map.js';
import _ol_View_ from '../src/ol/View.js';
import _ol_format_GPX_ from '../src/ol/format/GPX.js';
import _ol_format_GeoJSON_ from '../src/ol/format/GeoJSON.js';
import GeoJSON from '../src/ol/format/GeoJSON.js';
import _ol_format_IGC_ from '../src/ol/format/IGC.js';
import _ol_format_KML_ from '../src/ol/format/KML.js';
import _ol_format_TopoJSON_ from '../src/ol/format/TopoJSON.js';
@@ -86,7 +86,7 @@ var styleFunction = function(feature, resolution) {
var dragAndDropInteraction = new DragAndDrop({
formatConstructors: [
_ol_format_GPX_,
_ol_format_GeoJSON_,
GeoJSON,
_ol_format_IGC_,
_ol_format_KML_,
_ol_format_TopoJSON_

View File

@@ -3,7 +3,7 @@
import _ol_Map_ from '../src/ol/Map.js';
import _ol_View_ from '../src/ol/View.js';
import _ol_control_ from '../src/ol/control.js';
import _ol_format_GeoJSON_ from '../src/ol/format/GeoJSON.js';
import GeoJSON from '../src/ol/format/GeoJSON.js';
import _ol_layer_Tile_ from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
@@ -17,7 +17,7 @@ var map = new _ol_Map_({
new _ol_layer_Vector_({
source: new _ol_source_Vector_({
url: 'data/geojson/countries.geojson',
format: new _ol_format_GeoJSON_()
format: new GeoJSON()
})
})
],

View File

@@ -1,7 +1,7 @@
import _ol_Map_ from '../src/ol/Map.js';
import _ol_View_ from '../src/ol/View.js';
import _ol_events_condition_ from '../src/ol/events/condition.js';
import _ol_format_GeoJSON_ from '../src/ol/format/GeoJSON.js';
import GeoJSON from '../src/ol/format/GeoJSON.js';
import _ol_interaction_Extent_ from '../src/ol/interaction/Extent.js';
import _ol_layer_Tile_ from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js';
@@ -10,7 +10,7 @@ import _ol_source_Vector_ from '../src/ol/source/Vector.js';
var vectorSource = new _ol_source_Vector_({
url: 'data/geojson/countries.geojson',
format: new _ol_format_GeoJSON_()
format: new GeoJSON()
});
var map = new _ol_Map_({

View File

@@ -1,7 +1,7 @@
// NOCOMPILE
import _ol_Map_ from '../src/ol/Map.js';
import _ol_View_ from '../src/ol/View.js';
import _ol_format_GeoJSON_ from '../src/ol/format/GeoJSON.js';
import GeoJSON from '../src/ol/format/GeoJSON.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
import _ol_source_VectorTile_ from '../src/ol/source/VectorTile.js';
import _ol_layer_Tile_ from '../src/ol/layer/Tile.js';
@@ -75,7 +75,7 @@ fetch(url).then(function(response) {
debug: 1
});
var vectorSource = new _ol_source_VectorTile_({
format: new _ol_format_GeoJSON_(),
format: new GeoJSON(),
tileLoadFunction: function(tile) {
var format = tile.getFormat();
var tileCoord = tile.getTileCoord();

View File

@@ -2,7 +2,7 @@ import _ol_Feature_ from '../src/ol/Feature.js';
import _ol_Map_ from '../src/ol/Map.js';
import _ol_View_ from '../src/ol/View.js';
import _ol_control_ from '../src/ol/control.js';
import _ol_format_GeoJSON_ from '../src/ol/format/GeoJSON.js';
import GeoJSON from '../src/ol/format/GeoJSON.js';
import Circle from '../src/ol/geom/Circle.js';
import _ol_layer_Tile_ from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js';
@@ -161,7 +161,7 @@ var geojsonObject = {
};
var vectorSource = new _ol_source_Vector_({
features: (new _ol_format_GeoJSON_()).readFeatures(geojsonObject)
features: (new GeoJSON()).readFeatures(geojsonObject)
});
vectorSource.addFeature(new _ol_Feature_(new Circle([5e6, 7e6], 1e6)));

View File

@@ -1,6 +1,6 @@
import _ol_Map_ from '../src/ol/Map.js';
import _ol_View_ from '../src/ol/View.js';
import _ol_format_GeoJSON_ from '../src/ol/format/GeoJSON.js';
import GeoJSON from '../src/ol/format/GeoJSON.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
@@ -26,7 +26,7 @@ var map = new _ol_Map_({
renderMode: 'image',
source: new _ol_source_Vector_({
url: 'data/geojson/countries.geojson',
format: new _ol_format_GeoJSON_()
format: new GeoJSON()
}),
style: function(feature) {
style.getText().setText(feature.get('name'));

View File

@@ -2,7 +2,7 @@
// this example uses JSTS for which we don't have an externs file.
import _ol_Map_ from '../src/ol/Map.js';
import _ol_View_ from '../src/ol/View.js';
import _ol_format_GeoJSON_ from '../src/ol/format/GeoJSON.js';
import GeoJSON from '../src/ol/format/GeoJSON.js';
import _ol_layer_Tile_ from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js';
import {fromLonLat} from '../src/ol/proj.js';
@@ -14,7 +14,7 @@ var source = new _ol_source_Vector_();
fetch('data/geojson/roads-seoul.geojson').then(function(response) {
return response.json();
}).then(function(json) {
var format = new _ol_format_GeoJSON_();
var format = new GeoJSON();
var features = format.readFeatures(json, {featureProjection: 'EPSG:3857'});
var parser = new jsts.io.OL3Parser();

View File

@@ -1,6 +1,6 @@
import _ol_Map_ from '../src/ol/Map.js';
import _ol_View_ from '../src/ol/View.js';
import _ol_format_GeoJSON_ from '../src/ol/format/GeoJSON.js';
import GeoJSON from '../src/ol/format/GeoJSON.js';
import _ol_interaction_ from '../src/ol/interaction.js';
import _ol_interaction_Modify_ from '../src/ol/interaction/Modify.js';
import _ol_interaction_Select_ from '../src/ol/interaction/Select.js';
@@ -17,7 +17,7 @@ var raster = new _ol_layer_Tile_({
var vector = new _ol_layer_Vector_({
source: new _ol_source_Vector_({
url: 'data/geojson/countries.geojson',
format: new _ol_format_GeoJSON_(),
format: new GeoJSON(),
wrapX: false
})
});

View File

@@ -1,6 +1,6 @@
import _ol_Map_ from '../src/ol/Map.js';
import _ol_View_ from '../src/ol/View.js';
import _ol_format_GeoJSON_ from '../src/ol/format/GeoJSON.js';
import GeoJSON from '../src/ol/format/GeoJSON.js';
import _ol_interaction_ from '../src/ol/interaction.js';
import _ol_interaction_Modify_ from '../src/ol/interaction/Modify.js';
import _ol_interaction_Select_ from '../src/ol/interaction/Select.js';
@@ -145,7 +145,7 @@ var geojsonObject = {
};
var source = new _ol_source_Vector_({
features: (new _ol_format_GeoJSON_()).readFeatures(geojsonObject)
features: (new GeoJSON()).readFeatures(geojsonObject)
});
var layer = new _ol_layer_Vector_({

View File

@@ -1,6 +1,6 @@
import _ol_Map_ from '../src/ol/Map.js';
import _ol_View_ from '../src/ol/View.js';
import _ol_format_GeoJSON_ from '../src/ol/format/GeoJSON.js';
import GeoJSON from '../src/ol/format/GeoJSON.js';
import MultiPoint from '../src/ol/geom/MultiPoint.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
@@ -81,7 +81,7 @@ var geojsonObject = {
};
var source = new _ol_source_Vector_({
features: (new _ol_format_GeoJSON_()).readFeatures(geojsonObject)
features: (new GeoJSON()).readFeatures(geojsonObject)
});
var layer = new _ol_layer_Vector_({

View File

@@ -1,7 +1,7 @@
import _ol_Map_ from '../src/ol/Map.js';
import _ol_View_ from '../src/ol/View.js';
import _ol_events_condition_ from '../src/ol/events/condition.js';
import _ol_format_GeoJSON_ from '../src/ol/format/GeoJSON.js';
import GeoJSON from '../src/ol/format/GeoJSON.js';
import _ol_interaction_Select_ from '../src/ol/interaction/Select.js';
import _ol_layer_Tile_ from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js';
@@ -15,7 +15,7 @@ var raster = new _ol_layer_Tile_({
var vector = new _ol_layer_Vector_({
source: new _ol_source_Vector_({
url: 'data/geojson/countries.geojson',
format: new _ol_format_GeoJSON_()
format: new GeoJSON()
})
});

View File

@@ -1,7 +1,7 @@
import Graticule from '../src/ol/Graticule.js';
import _ol_Map_ from '../src/ol/Map.js';
import _ol_View_ from '../src/ol/View.js';
import _ol_format_GeoJSON_ from '../src/ol/format/GeoJSON.js';
import GeoJSON from '../src/ol/format/GeoJSON.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js';
import _ol_proj_Projection_ from '../src/ol/proj/Projection.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
@@ -28,7 +28,7 @@ var map = new _ol_Map_({
new _ol_layer_Vector_({
source: new _ol_source_Vector_({
url: 'data/geojson/countries-110m.geojson',
format: new _ol_format_GeoJSON_()
format: new GeoJSON()
})
})
],

View File

@@ -1,7 +1,7 @@
import _ol_Map_ from '../src/ol/Map.js';
import _ol_View_ from '../src/ol/View.js';
import * as _ol_extent_ from '../src/ol/extent.js';
import _ol_format_GeoJSON_ from '../src/ol/format/GeoJSON.js';
import GeoJSON from '../src/ol/format/GeoJSON.js';
import _ol_layer_Tile_ from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js';
import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js';
@@ -30,7 +30,7 @@ var map = new _ol_Map_({
}), new _ol_layer_Vector_({
declutter: true,
source: new _ol_source_Vector_({
format: new _ol_format_GeoJSON_(),
format: new GeoJSON(),
url: 'data/geojson/vienna-streets.geojson'
}),
style: function(feature) {

View File

@@ -1,6 +1,6 @@
import _ol_Map_ from '../src/ol/Map.js';
import _ol_View_ from '../src/ol/View.js';
import _ol_format_GeoJSON_ from '../src/ol/format/GeoJSON.js';
import GeoJSON from '../src/ol/format/GeoJSON.js';
import _ol_interaction_ from '../src/ol/interaction.js';
import _ol_interaction_Select_ from '../src/ol/interaction/Select.js';
import _ol_interaction_Translate_ from '../src/ol/interaction/Translate.js';
@@ -17,7 +17,7 @@ var raster = new _ol_layer_Tile_({
var vector = new _ol_layer_Vector_({
source: new _ol_source_Vector_({
url: 'data/geojson/countries.geojson',
format: new _ol_format_GeoJSON_()
format: new GeoJSON()
})
});

View File

@@ -2,7 +2,7 @@
// this example uses turf.js for which we don't have an externs file.
import _ol_Map_ from '../src/ol/Map.js';
import _ol_View_ from '../src/ol/View.js';
import _ol_format_GeoJSON_ from '../src/ol/format/GeoJSON.js';
import GeoJSON from '../src/ol/format/GeoJSON.js';
import _ol_layer_Tile_ from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js';
import {fromLonLat} from '../src/ol/proj.js';
@@ -14,7 +14,7 @@ var source = new _ol_source_Vector_();
fetch('data/geojson/roads-seoul.geojson').then(function(response) {
return response.json();
}).then(function(json) {
var format = new _ol_format_GeoJSON_();
var format = new GeoJSON();
var features = format.readFeatures(json);
var street = features[0];

View File

@@ -1,7 +1,7 @@
import _ol_Map_ from '../src/ol/Map.js';
import _ol_View_ from '../src/ol/View.js';
import * as _ol_extent_ from '../src/ol/extent.js';
import _ol_format_GeoJSON_ from '../src/ol/format/GeoJSON.js';
import GeoJSON from '../src/ol/format/GeoJSON.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
@@ -61,7 +61,7 @@ var style = [countryStyle, labelStyle];
var vectorLayer = new _ol_layer_Vector_({
source: new _ol_source_Vector_({
url: 'data/geojson/countries.geojson',
format: new _ol_format_GeoJSON_()
format: new GeoJSON()
}),
style: function(feature) {
labelStyle.getText().setText(feature.get('name'));

View File

@@ -1,6 +1,6 @@
import _ol_Map_ from '../src/ol/Map.js';
import _ol_View_ from '../src/ol/View.js';
import _ol_format_GeoJSON_ from '../src/ol/format/GeoJSON.js';
import GeoJSON from '../src/ol/format/GeoJSON.js';
import _ol_layer_Tile_ from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js';
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
@@ -143,7 +143,7 @@ function polygonStyleFunction(feature, resolution) {
var vectorPolygons = new _ol_layer_Vector_({
source: new _ol_source_Vector_({
url: 'data/geojson/polygon-samples.geojson',
format: new _ol_format_GeoJSON_()
format: new GeoJSON()
}),
style: polygonStyleFunction
});
@@ -163,7 +163,7 @@ function lineStyleFunction(feature, resolution) {
var vectorLines = new _ol_layer_Vector_({
source: new _ol_source_Vector_({
url: 'data/geojson/line-samples.geojson',
format: new _ol_format_GeoJSON_()
format: new GeoJSON()
}),
style: lineStyleFunction
});
@@ -184,7 +184,7 @@ function pointStyleFunction(feature, resolution) {
var vectorPoints = new _ol_layer_Vector_({
source: new _ol_source_Vector_({
url: 'data/geojson/point-samples.geojson',
format: new _ol_format_GeoJSON_()
format: new GeoJSON()
}),
style: pointStyleFunction
});

View File

@@ -1,6 +1,6 @@
import _ol_Map_ from '../src/ol/Map.js';
import _ol_View_ from '../src/ol/View.js';
import _ol_format_GeoJSON_ from '../src/ol/format/GeoJSON.js';
import GeoJSON from '../src/ol/format/GeoJSON.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js';
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
import _ol_style_Fill_ from '../src/ol/style/Fill.js';
@@ -32,7 +32,7 @@ var style = new _ol_style_Style_({
var vectorLayer = new _ol_layer_Vector_({
source: new _ol_source_Vector_({
url: 'data/geojson/countries.geojson',
format: new _ol_format_GeoJSON_()
format: new GeoJSON()
}),
style: function(feature) {
style.getText().setText(feature.get('name'));

View File

@@ -2,7 +2,7 @@ import _ol_Map_ from '../src/ol/Map.js';
import _ol_View_ from '../src/ol/View.js';
import _ol_format_filter_ from '../src/ol/format/filter.js';
import _ol_format_WFS_ from '../src/ol/format/WFS.js';
import _ol_format_GeoJSON_ from '../src/ol/format/GeoJSON.js';
import GeoJSON from '../src/ol/format/GeoJSON.js';
import _ol_layer_Tile_ from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js';
import _ol_source_BingMaps_ from '../src/ol/source/BingMaps.js';
@@ -59,7 +59,7 @@ fetch('https://ahocevar.com/geoserver/wfs', {
}).then(function(response) {
return response.json();
}).then(function(json) {
var features = new _ol_format_GeoJSON_().readFeatures(json);
var features = new GeoJSON().readFeatures(json);
vectorSource.addFeatures(features);
map.getView().fit(vectorSource.getExtent());
});

View File

@@ -1,6 +1,6 @@
import _ol_Map_ from '../src/ol/Map.js';
import _ol_View_ from '../src/ol/View.js';
import _ol_format_GeoJSON_ from '../src/ol/format/GeoJSON.js';
import GeoJSON from '../src/ol/format/GeoJSON.js';
import _ol_layer_Tile_ from '../src/ol/layer/Tile.js';
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js';
import _ol_loadingstrategy_ from '../src/ol/loadingstrategy.js';
@@ -11,7 +11,7 @@ import _ol_style_Style_ from '../src/ol/style/Style.js';
var vectorSource = new _ol_source_Vector_({
format: new _ol_format_GeoJSON_(),
format: new GeoJSON(),
url: function(extent) {
return 'https://ahocevar.com/geoserver/wfs?service=WFS&' +
'version=1.1.0&request=GetFeature&typename=osm:water_areas&' +

View File

@@ -28,7 +28,7 @@ import {get as getProjection} from '../proj.js';
* @param {olx.format.GeoJSONOptions=} opt_options Options.
* @api
*/
var _ol_format_GeoJSON_ = function(opt_options) {
var GeoJSON = function(opt_options) {
var options = opt_options ? opt_options : {};
@@ -62,7 +62,7 @@ var _ol_format_GeoJSON_ = function(opt_options) {
};
inherits(_ol_format_GeoJSON_, _ol_format_JSONFeature_);
inherits(GeoJSON, _ol_format_JSONFeature_);
/**
@@ -71,11 +71,11 @@ inherits(_ol_format_GeoJSON_, _ol_format_JSONFeature_);
* @private
* @return {ol.geom.Geometry} Geometry.
*/
_ol_format_GeoJSON_.readGeometry_ = function(object, opt_options) {
GeoJSON.readGeometry_ = function(object, opt_options) {
if (!object) {
return null;
}
var geometryReader = _ol_format_GeoJSON_.GEOMETRY_READERS_[object.type];
var geometryReader = GeoJSON.GEOMETRY_READERS_[object.type];
return (
/** @type {ol.geom.Geometry} */ FeatureFormat.transformWithOptions(
geometryReader(object), false, opt_options)
@@ -89,7 +89,7 @@ _ol_format_GeoJSON_.readGeometry_ = function(object, opt_options) {
* @private
* @return {ol.geom.GeometryCollection} Geometry collection.
*/
_ol_format_GeoJSON_.readGeometryCollectionGeometry_ = function(
GeoJSON.readGeometryCollectionGeometry_ = function(
object, opt_options) {
var geometries = object.geometries.map(
/**
@@ -97,7 +97,7 @@ _ol_format_GeoJSON_.readGeometryCollectionGeometry_ = function(
* @return {ol.geom.Geometry} geometry Geometry.
*/
function(geometry) {
return _ol_format_GeoJSON_.readGeometry_(geometry, opt_options);
return GeoJSON.readGeometry_(geometry, opt_options);
});
return new GeometryCollection(geometries);
};
@@ -108,7 +108,7 @@ _ol_format_GeoJSON_.readGeometryCollectionGeometry_ = function(
* @private
* @return {ol.geom.Point} Point.
*/
_ol_format_GeoJSON_.readPointGeometry_ = function(object) {
GeoJSON.readPointGeometry_ = function(object) {
return new Point(object.coordinates);
};
@@ -118,7 +118,7 @@ _ol_format_GeoJSON_.readPointGeometry_ = function(object) {
* @private
* @return {ol.geom.LineString} LineString.
*/
_ol_format_GeoJSON_.readLineStringGeometry_ = function(object) {
GeoJSON.readLineStringGeometry_ = function(object) {
return new LineString(object.coordinates);
};
@@ -128,7 +128,7 @@ _ol_format_GeoJSON_.readLineStringGeometry_ = function(object) {
* @private
* @return {ol.geom.MultiLineString} MultiLineString.
*/
_ol_format_GeoJSON_.readMultiLineStringGeometry_ = function(object) {
GeoJSON.readMultiLineStringGeometry_ = function(object) {
return new MultiLineString(object.coordinates);
};
@@ -138,7 +138,7 @@ _ol_format_GeoJSON_.readMultiLineStringGeometry_ = function(object) {
* @private
* @return {ol.geom.MultiPoint} MultiPoint.
*/
_ol_format_GeoJSON_.readMultiPointGeometry_ = function(object) {
GeoJSON.readMultiPointGeometry_ = function(object) {
return new MultiPoint(object.coordinates);
};
@@ -148,7 +148,7 @@ _ol_format_GeoJSON_.readMultiPointGeometry_ = function(object) {
* @private
* @return {ol.geom.MultiPolygon} MultiPolygon.
*/
_ol_format_GeoJSON_.readMultiPolygonGeometry_ = function(object) {
GeoJSON.readMultiPolygonGeometry_ = function(object) {
return new MultiPolygon(object.coordinates);
};
@@ -158,7 +158,7 @@ _ol_format_GeoJSON_.readMultiPolygonGeometry_ = function(object) {
* @private
* @return {ol.geom.Polygon} Polygon.
*/
_ol_format_GeoJSON_.readPolygonGeometry_ = function(object) {
GeoJSON.readPolygonGeometry_ = function(object) {
return new Polygon(object.coordinates);
};
@@ -169,8 +169,8 @@ _ol_format_GeoJSON_.readPolygonGeometry_ = function(object) {
* @private
* @return {GeoJSONGeometry|GeoJSONGeometryCollection} GeoJSON geometry.
*/
_ol_format_GeoJSON_.writeGeometry_ = function(geometry, opt_options) {
var geometryWriter = _ol_format_GeoJSON_.GEOMETRY_WRITERS_[geometry.getType()];
GeoJSON.writeGeometry_ = function(geometry, opt_options) {
var geometryWriter = GeoJSON.GEOMETRY_WRITERS_[geometry.getType()];
return geometryWriter(/** @type {ol.geom.Geometry} */ (
FeatureFormat.transformWithOptions(geometry, true, opt_options)),
opt_options);
@@ -182,7 +182,7 @@ _ol_format_GeoJSON_.writeGeometry_ = function(geometry, opt_options) {
* @private
* @return {GeoJSONGeometryCollection} Empty GeoJSON geometry collection.
*/
_ol_format_GeoJSON_.writeEmptyGeometryCollectionGeometry_ = function(geometry) {
GeoJSON.writeEmptyGeometryCollectionGeometry_ = function(geometry) {
return /** @type {GeoJSONGeometryCollection} */ ({
type: 'GeometryCollection',
geometries: []
@@ -196,12 +196,12 @@ _ol_format_GeoJSON_.writeEmptyGeometryCollectionGeometry_ = function(geometry) {
* @private
* @return {GeoJSONGeometryCollection} GeoJSON geometry collection.
*/
_ol_format_GeoJSON_.writeGeometryCollectionGeometry_ = function(
GeoJSON.writeGeometryCollectionGeometry_ = function(
geometry, opt_options) {
var geometries = geometry.getGeometriesArray().map(function(geometry) {
var options = _ol_obj_.assign({}, opt_options);
delete options.featureProjection;
return _ol_format_GeoJSON_.writeGeometry_(geometry, options);
return GeoJSON.writeGeometry_(geometry, options);
});
return /** @type {GeoJSONGeometryCollection} */ ({
type: 'GeometryCollection',
@@ -216,7 +216,7 @@ _ol_format_GeoJSON_.writeGeometryCollectionGeometry_ = function(
* @private
* @return {GeoJSONGeometry} GeoJSON geometry.
*/
_ol_format_GeoJSON_.writeLineStringGeometry_ = function(geometry, opt_options) {
GeoJSON.writeLineStringGeometry_ = function(geometry, opt_options) {
return /** @type {GeoJSONGeometry} */ ({
type: 'LineString',
coordinates: geometry.getCoordinates()
@@ -230,7 +230,7 @@ _ol_format_GeoJSON_.writeLineStringGeometry_ = function(geometry, opt_options) {
* @private
* @return {GeoJSONGeometry} GeoJSON geometry.
*/
_ol_format_GeoJSON_.writeMultiLineStringGeometry_ = function(geometry, opt_options) {
GeoJSON.writeMultiLineStringGeometry_ = function(geometry, opt_options) {
return /** @type {GeoJSONGeometry} */ ({
type: 'MultiLineString',
coordinates: geometry.getCoordinates()
@@ -244,7 +244,7 @@ _ol_format_GeoJSON_.writeMultiLineStringGeometry_ = function(geometry, opt_optio
* @private
* @return {GeoJSONGeometry} GeoJSON geometry.
*/
_ol_format_GeoJSON_.writeMultiPointGeometry_ = function(geometry, opt_options) {
GeoJSON.writeMultiPointGeometry_ = function(geometry, opt_options) {
return /** @type {GeoJSONGeometry} */ ({
type: 'MultiPoint',
coordinates: geometry.getCoordinates()
@@ -258,7 +258,7 @@ _ol_format_GeoJSON_.writeMultiPointGeometry_ = function(geometry, opt_options) {
* @private
* @return {GeoJSONGeometry} GeoJSON geometry.
*/
_ol_format_GeoJSON_.writeMultiPolygonGeometry_ = function(geometry, opt_options) {
GeoJSON.writeMultiPolygonGeometry_ = function(geometry, opt_options) {
var right;
if (opt_options) {
right = opt_options.rightHanded;
@@ -276,7 +276,7 @@ _ol_format_GeoJSON_.writeMultiPolygonGeometry_ = function(geometry, opt_options)
* @private
* @return {GeoJSONGeometry} GeoJSON geometry.
*/
_ol_format_GeoJSON_.writePointGeometry_ = function(geometry, opt_options) {
GeoJSON.writePointGeometry_ = function(geometry, opt_options) {
return /** @type {GeoJSONGeometry} */ ({
type: 'Point',
coordinates: geometry.getCoordinates()
@@ -290,7 +290,7 @@ _ol_format_GeoJSON_.writePointGeometry_ = function(geometry, opt_options) {
* @private
* @return {GeoJSONGeometry} GeoJSON geometry.
*/
_ol_format_GeoJSON_.writePolygonGeometry_ = function(geometry, opt_options) {
GeoJSON.writePolygonGeometry_ = function(geometry, opt_options) {
var right;
if (opt_options) {
right = opt_options.rightHanded;
@@ -307,14 +307,14 @@ _ol_format_GeoJSON_.writePolygonGeometry_ = function(geometry, opt_options) {
* @private
* @type {Object.<string, function(GeoJSONObject): ol.geom.Geometry>}
*/
_ol_format_GeoJSON_.GEOMETRY_READERS_ = {
'Point': _ol_format_GeoJSON_.readPointGeometry_,
'LineString': _ol_format_GeoJSON_.readLineStringGeometry_,
'Polygon': _ol_format_GeoJSON_.readPolygonGeometry_,
'MultiPoint': _ol_format_GeoJSON_.readMultiPointGeometry_,
'MultiLineString': _ol_format_GeoJSON_.readMultiLineStringGeometry_,
'MultiPolygon': _ol_format_GeoJSON_.readMultiPolygonGeometry_,
'GeometryCollection': _ol_format_GeoJSON_.readGeometryCollectionGeometry_
GeoJSON.GEOMETRY_READERS_ = {
'Point': GeoJSON.readPointGeometry_,
'LineString': GeoJSON.readLineStringGeometry_,
'Polygon': GeoJSON.readPolygonGeometry_,
'MultiPoint': GeoJSON.readMultiPointGeometry_,
'MultiLineString': GeoJSON.readMultiLineStringGeometry_,
'MultiPolygon': GeoJSON.readMultiPolygonGeometry_,
'GeometryCollection': GeoJSON.readGeometryCollectionGeometry_
};
@@ -323,15 +323,15 @@ _ol_format_GeoJSON_.GEOMETRY_READERS_ = {
* @private
* @type {Object.<string, function(ol.geom.Geometry, olx.format.WriteOptions=): (GeoJSONGeometry|GeoJSONGeometryCollection)>}
*/
_ol_format_GeoJSON_.GEOMETRY_WRITERS_ = {
'Point': _ol_format_GeoJSON_.writePointGeometry_,
'LineString': _ol_format_GeoJSON_.writeLineStringGeometry_,
'Polygon': _ol_format_GeoJSON_.writePolygonGeometry_,
'MultiPoint': _ol_format_GeoJSON_.writeMultiPointGeometry_,
'MultiLineString': _ol_format_GeoJSON_.writeMultiLineStringGeometry_,
'MultiPolygon': _ol_format_GeoJSON_.writeMultiPolygonGeometry_,
'GeometryCollection': _ol_format_GeoJSON_.writeGeometryCollectionGeometry_,
'Circle': _ol_format_GeoJSON_.writeEmptyGeometryCollectionGeometry_
GeoJSON.GEOMETRY_WRITERS_ = {
'Point': GeoJSON.writePointGeometry_,
'LineString': GeoJSON.writeLineStringGeometry_,
'Polygon': GeoJSON.writePolygonGeometry_,
'MultiPoint': GeoJSON.writeMultiPointGeometry_,
'MultiLineString': GeoJSON.writeMultiLineStringGeometry_,
'MultiPolygon': GeoJSON.writeMultiPolygonGeometry_,
'GeometryCollection': GeoJSON.writeGeometryCollectionGeometry_,
'Circle': GeoJSON.writeEmptyGeometryCollectionGeometry_
};
@@ -347,7 +347,7 @@ _ol_format_GeoJSON_.GEOMETRY_WRITERS_ = {
* @return {ol.Feature} Feature.
* @api
*/
_ol_format_GeoJSON_.prototype.readFeature;
GeoJSON.prototype.readFeature;
/**
@@ -361,13 +361,13 @@ _ol_format_GeoJSON_.prototype.readFeature;
* @return {Array.<ol.Feature>} Features.
* @api
*/
_ol_format_GeoJSON_.prototype.readFeatures;
GeoJSON.prototype.readFeatures;
/**
* @inheritDoc
*/
_ol_format_GeoJSON_.prototype.readFeatureFromObject = function(
GeoJSON.prototype.readFeatureFromObject = function(
object, opt_options) {
/**
* @type {GeoJSONFeature}
@@ -382,7 +382,7 @@ _ol_format_GeoJSON_.prototype.readFeatureFromObject = function(
});
}
var geometry = _ol_format_GeoJSON_.readGeometry_(geoJSONFeature.geometry, opt_options);
var geometry = GeoJSON.readGeometry_(geoJSONFeature.geometry, opt_options);
var feature = new _ol_Feature_();
if (this.geometryName_) {
feature.setGeometryName(this.geometryName_);
@@ -403,7 +403,7 @@ _ol_format_GeoJSON_.prototype.readFeatureFromObject = function(
/**
* @inheritDoc
*/
_ol_format_GeoJSON_.prototype.readFeaturesFromObject = function(
GeoJSON.prototype.readFeaturesFromObject = function(
object, opt_options) {
var geoJSONObject = /** @type {GeoJSONObject} */ (object);
/** @type {Array.<ol.Feature>} */
@@ -434,15 +434,15 @@ _ol_format_GeoJSON_.prototype.readFeaturesFromObject = function(
* @return {ol.geom.Geometry} Geometry.
* @api
*/
_ol_format_GeoJSON_.prototype.readGeometry;
GeoJSON.prototype.readGeometry;
/**
* @inheritDoc
*/
_ol_format_GeoJSON_.prototype.readGeometryFromObject = function(
GeoJSON.prototype.readGeometryFromObject = function(
object, opt_options) {
return _ol_format_GeoJSON_.readGeometry_(
return GeoJSON.readGeometry_(
/** @type {GeoJSONGeometry} */ (object), opt_options);
};
@@ -455,13 +455,13 @@ _ol_format_GeoJSON_.prototype.readGeometryFromObject = function(
* @return {ol.proj.Projection} Projection.
* @api
*/
_ol_format_GeoJSON_.prototype.readProjection;
GeoJSON.prototype.readProjection;
/**
* @inheritDoc
*/
_ol_format_GeoJSON_.prototype.readProjectionFromObject = function(object) {
GeoJSON.prototype.readProjectionFromObject = function(object) {
var geoJSONObject = /** @type {GeoJSONObject} */ (object);
var crs = geoJSONObject.crs;
var projection;
@@ -488,7 +488,7 @@ _ol_format_GeoJSON_.prototype.readProjectionFromObject = function(object) {
* @override
* @api
*/
_ol_format_GeoJSON_.prototype.writeFeature;
GeoJSON.prototype.writeFeature;
/**
@@ -500,7 +500,7 @@ _ol_format_GeoJSON_.prototype.writeFeature;
* @override
* @api
*/
_ol_format_GeoJSON_.prototype.writeFeatureObject = function(feature, opt_options) {
GeoJSON.prototype.writeFeatureObject = function(feature, opt_options) {
opt_options = this.adaptOptions(opt_options);
var object = /** @type {GeoJSONFeature} */ ({
@@ -513,7 +513,7 @@ _ol_format_GeoJSON_.prototype.writeFeatureObject = function(feature, opt_options
var geometry = feature.getGeometry();
if (geometry) {
object.geometry =
_ol_format_GeoJSON_.writeGeometry_(geometry, opt_options);
GeoJSON.writeGeometry_(geometry, opt_options);
} else {
object.geometry = null;
}
@@ -537,7 +537,7 @@ _ol_format_GeoJSON_.prototype.writeFeatureObject = function(feature, opt_options
* @return {string} GeoJSON.
* @api
*/
_ol_format_GeoJSON_.prototype.writeFeatures;
GeoJSON.prototype.writeFeatures;
/**
@@ -549,7 +549,7 @@ _ol_format_GeoJSON_.prototype.writeFeatures;
* @override
* @api
*/
_ol_format_GeoJSON_.prototype.writeFeaturesObject = function(features, opt_options) {
GeoJSON.prototype.writeFeaturesObject = function(features, opt_options) {
opt_options = this.adaptOptions(opt_options);
var objects = [];
var i, ii;
@@ -572,7 +572,7 @@ _ol_format_GeoJSON_.prototype.writeFeaturesObject = function(features, opt_optio
* @return {string} GeoJSON.
* @api
*/
_ol_format_GeoJSON_.prototype.writeGeometry;
GeoJSON.prototype.writeGeometry;
/**
@@ -584,9 +584,9 @@ _ol_format_GeoJSON_.prototype.writeGeometry;
* @override
* @api
*/
_ol_format_GeoJSON_.prototype.writeGeometryObject = function(geometry,
GeoJSON.prototype.writeGeometryObject = function(geometry,
opt_options) {
return _ol_format_GeoJSON_.writeGeometry_(geometry,
return GeoJSON.writeGeometry_(geometry,
this.adaptOptions(opt_options));
};
export default _ol_format_GeoJSON_;
export default GeoJSON;

View File

@@ -1,7 +1,7 @@
import _ol_Feature_ from '../../../../src/ol/Feature.js';
import _ol_Map_ from '../../../../src/ol/Map.js';
import _ol_View_ from '../../../../src/ol/View.js';
import _ol_format_GeoJSON_ from '../../../../src/ol/format/GeoJSON.js';
import GeoJSON from '../../../../src/ol/format/GeoJSON.js';
import Circle from '../../../../src/ol/geom/Circle.js';
import LineString from '../../../../src/ol/geom/LineString.js';
import Point from '../../../../src/ol/geom/Point.js';
@@ -463,7 +463,7 @@ describe('ol.rendering.layer.Vector', function() {
properties: {}
};
var format = new _ol_format_GeoJSON_({featureProjection: 'EPSG:3857'});
var format = new GeoJSON({featureProjection: 'EPSG:3857'});
var feature = format.readFeature(json);
var layer = new _ol_layer_Vector_({

View File

@@ -1,5 +1,5 @@
import _ol_featureloader_ from '../../../src/ol/featureloader.js';
import _ol_format_GeoJSON_ from '../../../src/ol/format/GeoJSON.js';
import GeoJSON from '../../../src/ol/format/GeoJSON.js';
import _ol_source_Vector_ from '../../../src/ol/source/Vector.js';
@@ -13,7 +13,7 @@ describe('ol.featureloader', function() {
beforeEach(function() {
url = 'spec/ol/data/point.json';
format = new _ol_format_GeoJSON_();
format = new GeoJSON();
source = new _ol_source_Vector_();
});

View File

@@ -1,6 +1,6 @@
import _ol_Feature_ from '../../../../src/ol/Feature.js';
import * as _ol_extent_ from '../../../../src/ol/extent.js';
import _ol_format_GeoJSON_ from '../../../../src/ol/format/GeoJSON.js';
import GeoJSON from '../../../../src/ol/format/GeoJSON.js';
import Circle from '../../../../src/ol/geom/Circle.js';
import GeometryCollection from '../../../../src/ol/geom/GeometryCollection.js';
import LineString from '../../../../src/ol/geom/LineString.js';
@@ -15,7 +15,7 @@ describe('ol.format.GeoJSON', function() {
var format;
beforeEach(function() {
format = new _ol_format_GeoJSON_();
format = new GeoJSON();
});
var pointGeoJSON = {
@@ -215,7 +215,7 @@ describe('ol.format.GeoJSON', function() {
});
it('uses featureProjection passed to the constructor', function() {
var format = new _ol_format_GeoJSON_({featureProjection: 'EPSG:3857'});
var format = new GeoJSON({featureProjection: 'EPSG:3857'});
var feature = format.readFeatures(pointGeoJSON);
expect(feature[0].getGeometry()).to.be.an(Point);
expect(feature[0].getGeometry().getCoordinates()).to.eql(
@@ -223,7 +223,7 @@ describe('ol.format.GeoJSON', function() {
});
it('gives precedence to options passed to the read method', function() {
var format = new _ol_format_GeoJSON_({featureProjection: 'EPSG:1234'});
var format = new GeoJSON({featureProjection: 'EPSG:1234'});
var feature = format.readFeatures(pointGeoJSON, {
featureProjection: 'EPSG:3857'
});
@@ -254,7 +254,7 @@ describe('ol.format.GeoJSON', function() {
});
it('can create a feature with a specific geometryName', function() {
var feature = new _ol_format_GeoJSON_({geometryName: 'the_geom'}).
var feature = new GeoJSON({geometryName: 'the_geom'}).
readFeature(pointGeoJSON);
expect(feature.getGeometryName()).to.be('the_geom');
expect(feature.getGeometry()).to.be.an(Point);
@@ -322,7 +322,7 @@ describe('ol.format.GeoJSON', function() {
it('generates an array of features for Feature', function() {
var format = new _ol_format_GeoJSON_();
var format = new GeoJSON();
var json = {
type: 'Feature',
properties: {
@@ -604,7 +604,7 @@ describe('ol.format.GeoJSON', function() {
});
it('respects featureProjection passed to constructor', function() {
var format = new _ol_format_GeoJSON_({featureProjection: 'EPSG:3857'});
var format = new GeoJSON({featureProjection: 'EPSG:3857'});
var point = new Point(fromLonLat([10, 20]));
var geojson = format.writeGeometry(point);
var obj = JSON.parse(geojson);

View File

@@ -1,6 +1,6 @@
import _ol_Feature_ from '../../../../src/ol/Feature.js';
import _ol_array_ from '../../../../src/ol/array.js';
import _ol_format_GeoJSON_ from '../../../../src/ol/format/GeoJSON.js';
import GeoJSON from '../../../../src/ol/format/GeoJSON.js';
import _ol_format_KML_ from '../../../../src/ol/format/KML.js';
import GeometryCollection from '../../../../src/ol/geom/GeometryCollection.js';
import LineString from '../../../../src/ol/geom/LineString.js';
@@ -3230,7 +3230,7 @@ describe('ol.format.KML', function() {
});
it('feature must not have a properties property', function() {
var geojsonFormat = new _ol_format_GeoJSON_();
var geojsonFormat = new GeoJSON();
features.forEach(function(feature) {
var geojsonFeature = geojsonFormat.writeFeatureObject(feature);
expect(geojsonFeature.properties).to.be(null);

View File

@@ -2,7 +2,7 @@ import {inherits} from '../../../../src/ol/index.js';
import _ol_View_ from '../../../../src/ol/View.js';
import Event from '../../../../src/ol/events/Event.js';
import EventTarget from '../../../../src/ol/events/EventTarget.js';
import _ol_format_GeoJSON_ from '../../../../src/ol/format/GeoJSON.js';
import GeoJSON from '../../../../src/ol/format/GeoJSON.js';
import DragAndDrop from '../../../../src/ol/interaction/DragAndDrop.js';
import _ol_source_Vector_ from '../../../../src/ol/source/Vector.js';
@@ -20,7 +20,7 @@ where('FileReader').describe('ol.interaction.DragAndDrop', function() {
}
};
interaction = new DragAndDrop({
formatConstructors: [_ol_format_GeoJSON_]
formatConstructors: [GeoJSON]
});
});
@@ -38,7 +38,7 @@ where('FileReader').describe('ol.interaction.DragAndDrop', function() {
it('accepts a source option', function() {
var source = new _ol_source_Vector_();
var drop = new DragAndDrop({
formatConstructors: [_ol_format_GeoJSON_],
formatConstructors: [GeoJSON],
source: source
});
expect(drop.source_).to.equal(source);
@@ -74,7 +74,7 @@ where('FileReader').describe('ol.interaction.DragAndDrop', function() {
it('registers and unregisters listeners on a custom target', function() {
var customTarget = new EventTarget();
interaction = new DragAndDrop({
formatConstructors: [_ol_format_GeoJSON_],
formatConstructors: [GeoJSON],
target: customTarget
});
interaction.setMap(map);
@@ -138,7 +138,7 @@ where('FileReader').describe('ol.interaction.DragAndDrop', function() {
it('adds dropped features to a source', function(done) {
var source = new _ol_source_Vector_();
var drop = new DragAndDrop({
formatConstructors: [_ol_format_GeoJSON_],
formatConstructors: [GeoJSON],
source: source
});
drop.setMap(map);

View File

@@ -2,7 +2,7 @@ import _ol_TileState_ from '../../../src/ol/TileState.js';
import _ol_VectorImageTile_ from '../../../src/ol/VectorImageTile.js';
import _ol_VectorTile_ from '../../../src/ol/VectorTile.js';
import _ol_events_ from '../../../src/ol/events.js';
import _ol_format_GeoJSON_ from '../../../src/ol/format/GeoJSON.js';
import GeoJSON from '../../../src/ol/format/GeoJSON.js';
import {get as getProjection} from '../../../src/ol/proj.js';
import _ol_tilegrid_ from '../../../src/ol/tilegrid.js';
import _ol_tilegrid_TileGrid_ from '../../../src/ol/tilegrid/TileGrid.js';
@@ -11,7 +11,7 @@ import _ol_tilegrid_TileGrid_ from '../../../src/ol/tilegrid/TileGrid.js';
describe('ol.VectorImageTile', function() {
it('configures loader that sets features on the source tile', function(done) {
var format = new _ol_format_GeoJSON_();
var format = new GeoJSON();
var url = 'spec/ol/data/point.json';
var tile = new _ol_VectorImageTile_([0, 0, -1], 0, url, format,
_ol_VectorImageTile_.defaultLoadFunction, [0, 0, -1], function() {
@@ -31,7 +31,7 @@ describe('ol.VectorImageTile', function() {
});
it('sets LOADED state when previously failed source tiles are loaded', function(done) {
var format = new _ol_format_GeoJSON_();
var format = new GeoJSON();
var url = 'spec/ol/data/unavailable.json';
var sourceTile;
var tile = new _ol_VectorImageTile_([0, 0, 0] /* one world away */, 0, url, format,
@@ -59,7 +59,7 @@ describe('ol.VectorImageTile', function() {
});
it('sets ERROR state when source tiles fail to load', function(done) {
var format = new _ol_format_GeoJSON_();
var format = new GeoJSON();
var url = 'spec/ol/data/unavailable.json';
var tile = new _ol_VectorImageTile_([0, 0, -1], 0, url, format,
_ol_VectorImageTile_.defaultLoadFunction, [0, 0, -1], function() {
@@ -76,7 +76,7 @@ describe('ol.VectorImageTile', function() {
});
it('sets EMPTY state when tile has only empty source tiles', function(done) {
var format = new _ol_format_GeoJSON_();
var format = new GeoJSON();
var url = '';
var tile = new _ol_VectorImageTile_([0, 0, -1], 0, url, format,
_ol_VectorImageTile_.defaultLoadFunction, [0, 0, -1], function() {},
@@ -92,7 +92,7 @@ describe('ol.VectorImageTile', function() {
});
it('only loads tiles within the source tileGrid\'s extent', function() {
var format = new _ol_format_GeoJSON_();
var format = new GeoJSON();
var url = 'spec/ol/data/point.json';
var tileGrid = new _ol_tilegrid_TileGrid_({
resolutions: [0.02197265625, 0.010986328125, 0.0054931640625],
@@ -112,7 +112,7 @@ describe('ol.VectorImageTile', function() {
});
it('#dispose() while loading', function() {
var format = new _ol_format_GeoJSON_();
var format = new GeoJSON();
var url = 'spec/ol/data/point.json';
var tile = new _ol_VectorImageTile_([0, 0, 0] /* one world away */, 0, url, format,
_ol_VectorImageTile_.defaultLoadFunction, [0, 0, -1], function() {
@@ -132,7 +132,7 @@ describe('ol.VectorImageTile', function() {
});
it('#dispose() when loaded', function(done) {
var format = new _ol_format_GeoJSON_();
var format = new GeoJSON();
var url = 'spec/ol/data/point.json';
var tile = new _ol_VectorImageTile_([0, 0, -1], 0, url, format,
_ol_VectorImageTile_.defaultLoadFunction, [0, 0, -1], function() {