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&' +