Rename _ol_geom_LineString_ to LineString
This commit is contained in:
@@ -2,7 +2,7 @@ import {inherits} from '../src/ol/index.js';
|
||||
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_geom_LineString_ from '../src/ol/geom/LineString.js';
|
||||
import LineString from '../src/ol/geom/LineString.js';
|
||||
import Point from '../src/ol/geom/Point.js';
|
||||
import _ol_geom_Polygon_ from '../src/ol/geom/Polygon.js';
|
||||
import _ol_interaction_ from '../src/ol/interaction.js';
|
||||
@@ -137,7 +137,7 @@ app.Drag.prototype.handleUpEvent = function() {
|
||||
var pointFeature = new _ol_Feature_(new Point([0, 0]));
|
||||
|
||||
var lineFeature = new _ol_Feature_(
|
||||
new _ol_geom_LineString_([[-1e7, 1e6], [-1e6, 3e6]]));
|
||||
new LineString([[-1e7, 1e6], [-1e6, 3e6]]));
|
||||
|
||||
var polygonFeature = new _ol_Feature_(
|
||||
new _ol_geom_Polygon_([[[-3e6, -1e6], [-3e6, 1e6],
|
||||
|
||||
@@ -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_geom_LineString_ from '../src/ol/geom/LineString.js';
|
||||
import LineString from '../src/ol/geom/LineString.js';
|
||||
import _ol_layer_Tile_ from '../src/ol/layer/Tile.js';
|
||||
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_Stamen_ from '../src/ol/source/Stamen.js';
|
||||
@@ -60,7 +60,7 @@ var animateFlights = function(event) {
|
||||
}
|
||||
|
||||
var maxIndex = Math.min(elapsedPoints, coords.length);
|
||||
var currentLine = new _ol_geom_LineString_(coords.slice(0, maxIndex));
|
||||
var currentLine = new LineString(coords.slice(0, maxIndex));
|
||||
|
||||
// directly draw the line with the vector context
|
||||
vectorContext.drawGeometry(currentLine);
|
||||
@@ -92,7 +92,7 @@ flightsSource = new _ol_source_Vector_({
|
||||
|
||||
var arcLine = arcGenerator.Arc(100, {offset: 10});
|
||||
if (arcLine.geometries.length === 1) {
|
||||
var line = new _ol_geom_LineString_(arcLine.geometries[0].coords);
|
||||
var line = new LineString(arcLine.geometries[0].coords);
|
||||
line.transform('EPSG:4326', 'EPSG:3857');
|
||||
|
||||
var feature = new _ol_Feature_({
|
||||
|
||||
@@ -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_geom_LineString_ from '../src/ol/geom/LineString.js';
|
||||
import LineString from '../src/ol/geom/LineString.js';
|
||||
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
|
||||
@@ -11,7 +11,7 @@ var sin30 = Math.sin(Math.PI / 6);
|
||||
var rise = radius * sin30;
|
||||
var run = radius * cos30;
|
||||
|
||||
var triangle = new _ol_geom_LineString_([
|
||||
var triangle = new LineString([
|
||||
[0, radius], [run, -rise], [-run, -rise], [0, radius]
|
||||
]);
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import _ol_Map_ from '../src/ol/Map.js';
|
||||
import _ol_Overlay_ from '../src/ol/Overlay.js';
|
||||
import _ol_View_ from '../src/ol/View.js';
|
||||
import _ol_control_ from '../src/ol/control.js';
|
||||
import _ol_geom_LineString_ from '../src/ol/geom/LineString.js';
|
||||
import LineString from '../src/ol/geom/LineString.js';
|
||||
import _ol_layer_Tile_ from '../src/ol/layer/Tile.js';
|
||||
import {fromLonLat} from '../src/ol/proj.js';
|
||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
@@ -42,7 +42,7 @@ map.addOverlay(marker);
|
||||
// LineString to store the different geolocation positions. This LineString
|
||||
// is time aware.
|
||||
// The Z dimension is actually used to store the rotation (heading).
|
||||
var positions = new _ol_geom_LineString_([],
|
||||
var positions = new LineString([],
|
||||
/** @type {ol.geom.GeometryLayout} */ ('XYZM'));
|
||||
|
||||
// Geolocation Control
|
||||
|
||||
@@ -5,7 +5,7 @@ import _ol_layer_Vector_ from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_OSM_ from '../src/ol/source/OSM.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import _ol_Feature_ from '../src/ol/Feature.js';
|
||||
import _ol_geom_LineString_ from '../src/ol/geom/LineString.js';
|
||||
import LineString from '../src/ol/geom/LineString.js';
|
||||
import _ol_style_Style_ from '../src/ol/style/Style.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
|
||||
@@ -20,7 +20,7 @@ var style = new _ol_style_Style_({
|
||||
})
|
||||
});
|
||||
|
||||
var feature = new _ol_Feature_(new _ol_geom_LineString_([[-4000000, 0], [4000000, 0]]));
|
||||
var feature = new _ol_Feature_(new LineString([[-4000000, 0], [4000000, 0]]));
|
||||
|
||||
var vector = new _ol_layer_Vector_({
|
||||
source: new _ol_source_Vector_({
|
||||
|
||||
@@ -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_IGC_ from '../src/ol/format/IGC.js';
|
||||
import _ol_geom_LineString_ from '../src/ol/geom/LineString.js';
|
||||
import LineString from '../src/ol/geom/LineString.js';
|
||||
import Point from '../src/ol/geom/Point.js';
|
||||
import _ol_layer_Tile_ from '../src/ol/layer/Tile.js';
|
||||
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js';
|
||||
@@ -132,7 +132,7 @@ var displaySnap = function(coordinate) {
|
||||
closestFeature.get('PLT') + ' (' + date.toUTCString() + ')';
|
||||
var coordinates = [coordinate, [closestPoint[0], closestPoint[1]]];
|
||||
if (line === null) {
|
||||
line = new _ol_geom_LineString_(coordinates);
|
||||
line = new LineString(coordinates);
|
||||
} else {
|
||||
line.setCoordinates(coordinates);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import _ol_Observable_ from '../src/ol/Observable.js';
|
||||
import _ol_Overlay_ from '../src/ol/Overlay.js';
|
||||
import _ol_Sphere_ from '../src/ol/Sphere.js';
|
||||
import _ol_View_ from '../src/ol/View.js';
|
||||
import _ol_geom_LineString_ from '../src/ol/geom/LineString.js';
|
||||
import LineString from '../src/ol/geom/LineString.js';
|
||||
import _ol_geom_Polygon_ from '../src/ol/geom/Polygon.js';
|
||||
import _ol_interaction_Draw_ from '../src/ol/interaction/Draw.js';
|
||||
import _ol_layer_Tile_ from '../src/ol/layer/Tile.js';
|
||||
@@ -106,7 +106,7 @@ var pointerMoveHandler = function(evt) {
|
||||
var geom = (sketch.getGeometry());
|
||||
if (geom instanceof _ol_geom_Polygon_) {
|
||||
helpMsg = continuePolygonMsg;
|
||||
} else if (geom instanceof _ol_geom_LineString_) {
|
||||
} else if (geom instanceof LineString) {
|
||||
helpMsg = continueLineMsg;
|
||||
}
|
||||
}
|
||||
@@ -220,7 +220,7 @@ function addInteraction() {
|
||||
if (geom instanceof _ol_geom_Polygon_) {
|
||||
output = formatArea(geom);
|
||||
tooltipCoord = geom.getInteriorPoint().getCoordinates();
|
||||
} else if (geom instanceof _ol_geom_LineString_) {
|
||||
} else if (geom instanceof LineString) {
|
||||
output = formatLength(geom);
|
||||
tooltipCoord = geom.getLastCoordinate();
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import _ol_geom_LineString_ from '../src/ol/geom/LineString.js';
|
||||
import LineString from '../src/ol/geom/LineString.js';
|
||||
import Point from '../src/ol/geom/Point.js';
|
||||
import _ol_geom_Polygon_ from '../src/ol/geom/Polygon.js';
|
||||
import _ol_render_ from '../src/ol/render.js';
|
||||
@@ -24,6 +24,6 @@ var style = new _ol_style_Style_({
|
||||
});
|
||||
vectorContext.setStyle(style);
|
||||
|
||||
vectorContext.drawGeometry(new _ol_geom_LineString_([[10, 10], [90, 90]]));
|
||||
vectorContext.drawGeometry(new LineString([[10, 10], [90, 90]]));
|
||||
vectorContext.drawGeometry(new _ol_geom_Polygon_([[[2, 2], [98, 2], [2, 98], [2, 2]]]));
|
||||
vectorContext.drawGeometry(new Point([88, 88]));
|
||||
|
||||
@@ -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_geom_LineString_ from '../src/ol/geom/LineString.js';
|
||||
import LineString from '../src/ol/geom/LineString.js';
|
||||
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
import _ol_style_Stroke_ from '../src/ol/style/Stroke.js';
|
||||
@@ -31,7 +31,7 @@ for (i = 0; i < count; ++i) {
|
||||
deltaY = delta * signY;
|
||||
endPoint = [startPoint[0] + deltaX, startPoint[1] + deltaY];
|
||||
features[i] = new _ol_Feature_({
|
||||
'geometry': new _ol_geom_LineString_([startPoint, endPoint])
|
||||
'geometry': new LineString([startPoint, endPoint])
|
||||
});
|
||||
startPoint = endPoint;
|
||||
}
|
||||
|
||||
@@ -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_geom_LineString_ from '../src/ol/geom/LineString.js';
|
||||
import LineString from '../src/ol/geom/LineString.js';
|
||||
import Point from '../src/ol/geom/Point.js';
|
||||
import _ol_layer_Vector_ from '../src/ol/layer/Vector.js';
|
||||
import _ol_source_Vector_ from '../src/ol/source/Vector.js';
|
||||
@@ -76,7 +76,7 @@ var displaySnap = function(coordinate) {
|
||||
point.setCoordinates(closestPoint);
|
||||
}
|
||||
if (line === null) {
|
||||
line = new _ol_geom_LineString_([coordinate, closestPoint]);
|
||||
line = new LineString([coordinate, closestPoint]);
|
||||
} else {
|
||||
line.setCoordinates([coordinate, closestPoint]);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,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 Point from '../src/ol/geom/Point.js';
|
||||
import _ol_geom_LineString_ from '../src/ol/geom/LineString.js';
|
||||
import LineString from '../src/ol/geom/LineString.js';
|
||||
import _ol_geom_Polygon_ from '../src/ol/geom/Polygon.js';
|
||||
import _ol_interaction_Draw_ from '../src/ol/interaction/Draw.js';
|
||||
import _ol_interaction_Snap_ from '../src/ol/interaction/Snap.js';
|
||||
@@ -113,7 +113,7 @@ topo.on('removenode', function(e) {
|
||||
topo.on('addedge', edgeToFeature);
|
||||
topo.on('modedge', function(e) {
|
||||
var feature = edges.getFeatureById(e.id);
|
||||
feature.setGeometry(new _ol_geom_LineString_(e.coordinates));
|
||||
feature.setGeometry(new LineString(e.coordinates));
|
||||
});
|
||||
topo.on('removeedge', function(e) {
|
||||
removeElementFeature(edges, e);
|
||||
@@ -139,7 +139,7 @@ function nodeToFeature(node) {
|
||||
|
||||
function edgeToFeature(edge) {
|
||||
var feature = new _ol_Feature_({
|
||||
geometry: new _ol_geom_LineString_(edge.coordinates),
|
||||
geometry: new LineString(edge.coordinates),
|
||||
edge: edge
|
||||
});
|
||||
feature.setId(edge.id);
|
||||
|
||||
Reference in New Issue
Block a user