Static ol.style.Style functions
This commit is contained in:
@@ -312,7 +312,7 @@ ol.inherits(ol.interaction.Draw, ol.interaction.Pointer);
|
||||
* @return {ol.StyleFunction} Styles.
|
||||
*/
|
||||
ol.interaction.Draw.getDefaultStyleFunction = function() {
|
||||
var styles = ol.style.createDefaultEditingStyles();
|
||||
var styles = ol.style.Style.createDefaultEditing();
|
||||
return function(feature, resolution) {
|
||||
return styles[feature.getGeometry().getType()];
|
||||
};
|
||||
|
||||
@@ -1034,7 +1034,7 @@ ol.interaction.Modify.prototype.updateSegmentIndices_ = function(
|
||||
* @return {ol.StyleFunction} Styles.
|
||||
*/
|
||||
ol.interaction.Modify.getDefaultStyleFunction = function() {
|
||||
var style = ol.style.createDefaultEditingStyles();
|
||||
var style = ol.style.Style.createDefaultEditing();
|
||||
return function(feature, resolution) {
|
||||
return style[ol.geom.GeometryType.POINT];
|
||||
};
|
||||
|
||||
@@ -342,7 +342,7 @@ ol.interaction.Select.prototype.setMap = function(map) {
|
||||
* @return {ol.StyleFunction} Styles.
|
||||
*/
|
||||
ol.interaction.Select.getDefaultStyleFunction = function() {
|
||||
var styles = ol.style.createDefaultEditingStyles();
|
||||
var styles = ol.style.Style.createDefaultEditing();
|
||||
ol.array.extend(styles[ol.geom.GeometryType.POLYGON],
|
||||
styles[ol.geom.GeometryType.LINE_STRING]);
|
||||
ol.array.extend(styles[ol.geom.GeometryType.GEOMETRY_COLLECTION],
|
||||
|
||||
Reference in New Issue
Block a user