Merge remote-tracking branch 'upstream/master' into vector-api
Conflicts: src/objectliterals.jsdoc src/ol/attribution.js src/ol/geom/geometry.js src/ol/geom/geometrycollection.js src/ol/geom/linestring.js src/ol/layer/vectorlayer.exports src/ol/layer/vectorlayer.js src/ol/map.js src/ol/proj/proj.js src/ol/renderer/canvas/canvasvectorlayerrenderer.js src/ol/source/imagewmssource.js src/ol/source/tilewmssource.js src/ol/source/vectorsource.exports src/ol/source/vectorsource.js src/ol/source/wmssource.js src/ol/style/style.js src/ol/tilegrid/tilegrid.js src/ol/tilegrid/wmtstilegrid.js src/ol/tilegrid/xyztilegrid.js
This commit is contained in:
@@ -1 +1 @@
|
||||
@exportClass ol.interaction.Draw ol.interaction.DrawOptions
|
||||
@exportSymbol ol.interaction.Draw
|
||||
|
||||
@@ -23,7 +23,7 @@ goog.require('ol.source.Vector');
|
||||
|
||||
/**
|
||||
* Interaction that allows drawing geometries.
|
||||
* @param {ol.interaction.DrawOptions} options Options.
|
||||
* @param {olx.interaction.DrawOptions} options Options.
|
||||
* @constructor
|
||||
* @extends {ol.interaction.Interaction}
|
||||
*/
|
||||
@@ -337,11 +337,11 @@ ol.interaction.Draw.prototype.finishDrawing_ = function(event) {
|
||||
sketchFeature.setGeometry(new ol.geom.Polygon(coordinates));
|
||||
}
|
||||
// cast multi-part geometries
|
||||
if (this.type_ === ol.geom.GeometryType.MULTIPOINT) {
|
||||
if (this.type_ === ol.geom.GeometryType.MULTI_POINT) {
|
||||
sketchFeature.setGeometry(new ol.geom.MultiPoint([coordinates]));
|
||||
} else if (this.type_ === ol.geom.GeometryType.MULTILINESTRING) {
|
||||
} else if (this.type_ === ol.geom.GeometryType.MULTI_LINE_STRING) {
|
||||
sketchFeature.setGeometry(new ol.geom.MultiLineString([coordinates]));
|
||||
} else if (this.type_ === ol.geom.GeometryType.MULTIPOLYGON) {
|
||||
} else if (this.type_ === ol.geom.GeometryType.MULTI_POLYGON) {
|
||||
sketchFeature.setGeometry(new ol.geom.MultiPolygon([coordinates]));
|
||||
}
|
||||
this.layer_.getVectorSource().addFeatures([sketchFeature]);
|
||||
@@ -379,13 +379,13 @@ ol.interaction.Draw.prototype.abortDrawing_ = function() {
|
||||
ol.interaction.Draw.getMode_ = function(type) {
|
||||
var mode;
|
||||
if (type === ol.geom.GeometryType.POINT ||
|
||||
type === ol.geom.GeometryType.MULTIPOINT) {
|
||||
type === ol.geom.GeometryType.MULTI_POINT) {
|
||||
mode = ol.interaction.DrawMode.POINT;
|
||||
} else if (type === ol.geom.GeometryType.LINESTRING ||
|
||||
type === ol.geom.GeometryType.MULTILINESTRING) {
|
||||
} else if (type === ol.geom.GeometryType.LINE_STRING ||
|
||||
type === ol.geom.GeometryType.MULTI_LINE_STRING) {
|
||||
mode = ol.interaction.DrawMode.LINESTRING;
|
||||
} else if (type === ol.geom.GeometryType.POLYGON ||
|
||||
type === ol.geom.GeometryType.MULTIPOLYGON) {
|
||||
type === ol.geom.GeometryType.MULTI_POLYGON) {
|
||||
mode = ol.interaction.DrawMode.POLYGON;
|
||||
}
|
||||
goog.asserts.assert(goog.isDef(mode));
|
||||
|
||||
@@ -1 +1 @@
|
||||
@exportClass ol.interaction.Modify ol.interaction.ModifyOptions
|
||||
@exportSymbol ol.interaction.Modify
|
||||
|
||||
@@ -38,7 +38,7 @@ ol.interaction.SegmentDataType;
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.interaction.Drag}
|
||||
* @param {ol.interaction.ModifyOptions=} opt_options Options.
|
||||
* @param {olx.interaction.ModifyOptions=} opt_options Options.
|
||||
*/
|
||||
ol.interaction.Modify = function(opt_options) {
|
||||
goog.base(this);
|
||||
@@ -243,18 +243,18 @@ ol.interaction.Modify.prototype.addIndex_ = function(features, layer) {
|
||||
*/
|
||||
ol.interaction.Modify.prototype.removeIndex_ = function(features) {
|
||||
var rBush = this.rBush_;
|
||||
var i, feature, nodesToRemove;
|
||||
var nodesToRemove = [];
|
||||
var i, feature;
|
||||
for (i = features.length - 1; i >= 0; --i) {
|
||||
feature = features[i];
|
||||
nodesToRemove = [];
|
||||
rBush.forEachInExtent(feature.getGeometry().getBounds(), function(node) {
|
||||
if (feature === node.feature) {
|
||||
nodesToRemove.push(node);
|
||||
}
|
||||
});
|
||||
for (i = nodesToRemove.length - 1; i >= 0; --i) {
|
||||
rBush.remove(nodesToRemove[i]);
|
||||
}
|
||||
}
|
||||
for (i = nodesToRemove.length - 1; i >= 0; --i) {
|
||||
rBush.remove(nodesToRemove[i]);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
@exportClass ol.interaction.Select ol.interaction.SelectOptions
|
||||
@exportSymbol ol.interaction.Select
|
||||
|
||||
@@ -15,7 +15,7 @@ goog.require('ol.layer.Vector');
|
||||
* Allows the user to select features on the map.
|
||||
* @constructor
|
||||
* @extends {ol.interaction.Interaction}
|
||||
* @param {ol.interaction.SelectOptions=} opt_options Options.
|
||||
* @param {olx.interaction.SelectOptions=} opt_options Options.
|
||||
* @todo stability experimental
|
||||
*/
|
||||
ol.interaction.Select = function(opt_options) {
|
||||
|
||||
Reference in New Issue
Block a user