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:
@@ -30,7 +30,6 @@ function collectExports(source) {
|
|||||||
var encoding = env.conf.encoding || 'utf8';
|
var encoding = env.conf.encoding || 'utf8';
|
||||||
var fs = require('jsdoc/fs');
|
var fs = require('jsdoc/fs');
|
||||||
collectExports(fs.readFileSync('build/src/external/src/exports.js', encoding));
|
collectExports(fs.readFileSync('build/src/external/src/exports.js', encoding));
|
||||||
collectExports(fs.readFileSync('build/src/external/src/types.js', encoding));
|
|
||||||
|
|
||||||
|
|
||||||
exports.handlers = {
|
exports.handlers = {
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ class ObjectLiteral(Exportable):
|
|||||||
return ''.join(lines)
|
return ''.join(lines)
|
||||||
|
|
||||||
def extern_name(self):
|
def extern_name(self):
|
||||||
return re.sub(r'ol\.(\S+)', r'olx.\1Extern', self.name)
|
return re.sub(r'(olx\.\S+)', r'\1Extern', self.name)
|
||||||
|
|
||||||
def extern_namespace(self):
|
def extern_namespace(self):
|
||||||
return '.'.join(self.extern_name().split('.')[:-1]) or None
|
return '.'.join(self.extern_name().split('.')[:-1]) or None
|
||||||
@@ -398,6 +398,7 @@ def main(argv):
|
|||||||
else:
|
else:
|
||||||
sys.stdout.write('var %s;\n' % (namespace,))
|
sys.stdout.write('var %s;\n' % (namespace,))
|
||||||
for object_literal in object_literals:
|
for object_literal in object_literals:
|
||||||
|
sys.stdout.write(object_literal.typedef())
|
||||||
sys.stdout.write(object_literal.extern())
|
sys.stdout.write(object_literal.extern())
|
||||||
|
|
||||||
if options.typedef:
|
if options.typedef:
|
||||||
|
|||||||
10
build.py
10
build.py
@@ -91,8 +91,7 @@ EXPORTS = [path
|
|||||||
|
|
||||||
EXTERNAL_SRC = [
|
EXTERNAL_SRC = [
|
||||||
'build/src/external/externs/types.js',
|
'build/src/external/externs/types.js',
|
||||||
'build/src/external/src/exports.js',
|
'build/src/external/src/exports.js']
|
||||||
'build/src/external/src/types.js']
|
|
||||||
|
|
||||||
EXAMPLES = [path
|
EXAMPLES = [path
|
||||||
for path in ifind('examples')
|
for path in ifind('examples')
|
||||||
@@ -237,13 +236,6 @@ def build_src_external_src_exports_js(t):
|
|||||||
'--exports', 'src/objectliterals.jsdoc', EXPORTS)
|
'--exports', 'src/objectliterals.jsdoc', EXPORTS)
|
||||||
|
|
||||||
|
|
||||||
@target('build/src/external/src/types.js', 'bin/generate-exports.py',
|
|
||||||
'src/objectliterals.jsdoc')
|
|
||||||
def build_src_external_src_types_js(t):
|
|
||||||
t.output('%(PYTHON)s', 'bin/generate-exports.py',
|
|
||||||
'--typedef', 'src/objectliterals.jsdoc')
|
|
||||||
|
|
||||||
|
|
||||||
for glsl_src in GLSL_SRC:
|
for glsl_src in GLSL_SRC:
|
||||||
def shader_src_helper(glsl_src):
|
def shader_src_helper(glsl_src):
|
||||||
@target(glsl_src.replace('.glsl', 'shader.js'), glsl_src,
|
@target(glsl_src.replace('.glsl', 'shader.js'), glsl_src,
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
"inputs": [
|
"inputs": [
|
||||||
"../build/src/internal/src/requireall.js",
|
"../build/src/internal/src/requireall.js",
|
||||||
"../build/src/internal/src/types.js",
|
|
||||||
"../build/src/external/src/exports.js"
|
"../build/src/external/src/exports.js"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
"externs": [
|
"externs": [
|
||||||
"//json.js",
|
"//json.js",
|
||||||
|
"../build/src/external/externs/types.js",
|
||||||
"../externs/bingmaps.js",
|
"../externs/bingmaps.js",
|
||||||
"../externs/geojson.js",
|
"../externs/geojson.js",
|
||||||
"../externs/topojson.js",
|
"../externs/topojson.js",
|
||||||
@@ -27,7 +28,7 @@
|
|||||||
|
|
||||||
"inputs": [
|
"inputs": [
|
||||||
"../build/src/internal/src/requireall.js",
|
"../build/src/internal/src/requireall.js",
|
||||||
"../build/src/internal/src/types.js"
|
"../build/src/external/src/exports.js"
|
||||||
],
|
],
|
||||||
|
|
||||||
"mode": "SIMPLE",
|
"mode": "SIMPLE",
|
||||||
|
|||||||
@@ -27,8 +27,7 @@
|
|||||||
"inherits": "ol.json",
|
"inherits": "ol.json",
|
||||||
|
|
||||||
"inputs": [
|
"inputs": [
|
||||||
"../build/src/internal/src/requireall.js",
|
"../build/src/internal/src/requireall.js"
|
||||||
"../build/src/internal/src/types.js"
|
|
||||||
],
|
],
|
||||||
|
|
||||||
"mode": "WHITESPACE",
|
"mode": "WHITESPACE",
|
||||||
|
|||||||
@@ -27,8 +27,7 @@
|
|||||||
"inherits": "base.json",
|
"inherits": "base.json",
|
||||||
|
|
||||||
"inputs": [
|
"inputs": [
|
||||||
"../build/src/external/src/exports.js",
|
"../build/src/external/src/exports.js"
|
||||||
"../build/src/external/src/types.js"
|
|
||||||
],
|
],
|
||||||
|
|
||||||
"output-wrapper": "// OpenLayers 3. see http://ol3js.org/\n(function(){%output%})();",
|
"output-wrapper": "// OpenLayers 3. see http://ol3js.org/\n(function(){%output%})();",
|
||||||
|
|||||||
@@ -36,9 +36,9 @@
|
|||||||
<form class="form-inline">
|
<form class="form-inline">
|
||||||
<label>Geometry type </label>
|
<label>Geometry type </label>
|
||||||
<select id="type">
|
<select id="type">
|
||||||
<option value="polygon">Polygon</option>
|
<option value="Polygon">Polygon</option>
|
||||||
<option value="linestring">Linestring</option>
|
<option value="LineString">Linestring</option>
|
||||||
<option value="point">Point</option>
|
<option value="Point">Point</option>
|
||||||
</select>
|
</select>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ var style = new ol.style.Style({rules: [
|
|||||||
]
|
]
|
||||||
}),
|
}),
|
||||||
new ol.style.Rule({
|
new ol.style.Rule({
|
||||||
filter: 'geometryType("point")',
|
filter: 'geometryType("Point")',
|
||||||
symbolizers: [
|
symbolizers: [
|
||||||
new ol.style.Shape({
|
new ol.style.Shape({
|
||||||
size: 40,
|
size: 40,
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
goog.require('ol.Feature');
|
||||||
goog.require('ol.Map');
|
goog.require('ol.Map');
|
||||||
goog.require('ol.RendererHint');
|
goog.require('ol.RendererHint');
|
||||||
goog.require('ol.View2D');
|
goog.require('ol.View2D');
|
||||||
@@ -12,13 +13,19 @@ var raster = new ol.layer.Tile({
|
|||||||
source: new ol.source.OSM()
|
source: new ol.source.OSM()
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var parser = new ol.parser.WKT();
|
||||||
|
var transform = ol.proj.getTransform('EPSG:4326', 'EPSG:3857');
|
||||||
|
var geom = parser.read(
|
||||||
|
'POLYGON((10.689697265625 -25.0927734375, 34.595947265625 ' +
|
||||||
|
'-20.1708984375, 38.814697265625 -35.6396484375, 13.502197265625 ' +
|
||||||
|
'-39.1552734375, 10.689697265625 -25.0927734375))');
|
||||||
|
geom.transform(transform);
|
||||||
|
var feature = new ol.Feature();
|
||||||
|
feature.setGeometry(geom);
|
||||||
|
|
||||||
var vector = new ol.layer.Vector({
|
var vector = new ol.layer.Vector({
|
||||||
source: new ol.source.Vector({
|
source: new ol.source.Vector({
|
||||||
parser: new ol.parser.WKT(),
|
features: [feature]
|
||||||
projection: ol.proj.get('EPSG:4326'),
|
|
||||||
data: 'POLYGON((10.689697265625 -25.0927734375, 34.595947265625 ' +
|
|
||||||
'-20.1708984375, 38.814697265625 -35.6396484375, 13.502197265625 ' +
|
|
||||||
'-39.1552734375, 10.689697265625 -25.0927734375))'
|
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
@exportSymbol ol.geom.GeometryType
|
@exportSymbol ol.geom.GeometryType
|
||||||
@exportProperty ol.geom.GeometryType.POINT
|
@exportProperty ol.geom.GeometryType.POINT
|
||||||
@exportProperty ol.geom.GeometryType.LINEARRING
|
@exportProperty ol.geom.GeometryType.LINEAR_RING
|
||||||
@exportProperty ol.geom.GeometryType.LINESTRING
|
@exportProperty ol.geom.GeometryType.LINE_STRING
|
||||||
@exportProperty ol.geom.GeometryType.POLYGON
|
@exportProperty ol.geom.GeometryType.POLYGON
|
||||||
@exportProperty ol.geom.GeometryType.MULTIPOINT
|
@exportProperty ol.geom.GeometryType.MULTI_POINT
|
||||||
@exportProperty ol.geom.GeometryType.MULTILINESTRING
|
@exportProperty ol.geom.GeometryType.MULTI_LINE_STRING
|
||||||
@exportProperty ol.geom.GeometryType.MULTIPOLYGON
|
@exportProperty ol.geom.GeometryType.MULTI_POLYGON
|
||||||
@exportProperty ol.geom.GeometryType.GEOMETRYCOLLECTION
|
@exportProperty ol.geom.GeometryType.GEOMETRY_COLLECTION
|
||||||
|
|
||||||
@exportSymbol ol.geom.Geometry
|
@exportSymbol ol.geom.Geometry
|
||||||
|
|
||||||
|
|||||||
@@ -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.
|
* Interaction that allows drawing geometries.
|
||||||
* @param {ol.interaction.DrawOptions} options Options.
|
* @param {olx.interaction.DrawOptions} options Options.
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.interaction.Interaction}
|
* @extends {ol.interaction.Interaction}
|
||||||
*/
|
*/
|
||||||
@@ -337,11 +337,11 @@ ol.interaction.Draw.prototype.finishDrawing_ = function(event) {
|
|||||||
sketchFeature.setGeometry(new ol.geom.Polygon(coordinates));
|
sketchFeature.setGeometry(new ol.geom.Polygon(coordinates));
|
||||||
}
|
}
|
||||||
// cast multi-part geometries
|
// 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]));
|
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]));
|
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]));
|
sketchFeature.setGeometry(new ol.geom.MultiPolygon([coordinates]));
|
||||||
}
|
}
|
||||||
this.layer_.getVectorSource().addFeatures([sketchFeature]);
|
this.layer_.getVectorSource().addFeatures([sketchFeature]);
|
||||||
@@ -379,13 +379,13 @@ ol.interaction.Draw.prototype.abortDrawing_ = function() {
|
|||||||
ol.interaction.Draw.getMode_ = function(type) {
|
ol.interaction.Draw.getMode_ = function(type) {
|
||||||
var mode;
|
var mode;
|
||||||
if (type === ol.geom.GeometryType.POINT ||
|
if (type === ol.geom.GeometryType.POINT ||
|
||||||
type === ol.geom.GeometryType.MULTIPOINT) {
|
type === ol.geom.GeometryType.MULTI_POINT) {
|
||||||
mode = ol.interaction.DrawMode.POINT;
|
mode = ol.interaction.DrawMode.POINT;
|
||||||
} else if (type === ol.geom.GeometryType.LINESTRING ||
|
} else if (type === ol.geom.GeometryType.LINE_STRING ||
|
||||||
type === ol.geom.GeometryType.MULTILINESTRING) {
|
type === ol.geom.GeometryType.MULTI_LINE_STRING) {
|
||||||
mode = ol.interaction.DrawMode.LINESTRING;
|
mode = ol.interaction.DrawMode.LINESTRING;
|
||||||
} else if (type === ol.geom.GeometryType.POLYGON ||
|
} else if (type === ol.geom.GeometryType.POLYGON ||
|
||||||
type === ol.geom.GeometryType.MULTIPOLYGON) {
|
type === ol.geom.GeometryType.MULTI_POLYGON) {
|
||||||
mode = ol.interaction.DrawMode.POLYGON;
|
mode = ol.interaction.DrawMode.POLYGON;
|
||||||
}
|
}
|
||||||
goog.asserts.assert(goog.isDef(mode));
|
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
|
* @constructor
|
||||||
* @extends {ol.interaction.Drag}
|
* @extends {ol.interaction.Drag}
|
||||||
* @param {ol.interaction.ModifyOptions=} opt_options Options.
|
* @param {olx.interaction.ModifyOptions=} opt_options Options.
|
||||||
*/
|
*/
|
||||||
ol.interaction.Modify = function(opt_options) {
|
ol.interaction.Modify = function(opt_options) {
|
||||||
goog.base(this);
|
goog.base(this);
|
||||||
@@ -243,18 +243,18 @@ ol.interaction.Modify.prototype.addIndex_ = function(features, layer) {
|
|||||||
*/
|
*/
|
||||||
ol.interaction.Modify.prototype.removeIndex_ = function(features) {
|
ol.interaction.Modify.prototype.removeIndex_ = function(features) {
|
||||||
var rBush = this.rBush_;
|
var rBush = this.rBush_;
|
||||||
var i, feature, nodesToRemove;
|
var nodesToRemove = [];
|
||||||
|
var i, feature;
|
||||||
for (i = features.length - 1; i >= 0; --i) {
|
for (i = features.length - 1; i >= 0; --i) {
|
||||||
feature = features[i];
|
feature = features[i];
|
||||||
nodesToRemove = [];
|
|
||||||
rBush.forEachInExtent(feature.getGeometry().getBounds(), function(node) {
|
rBush.forEachInExtent(feature.getGeometry().getBounds(), function(node) {
|
||||||
if (feature === node.feature) {
|
if (feature === node.feature) {
|
||||||
nodesToRemove.push(node);
|
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.
|
* Allows the user to select features on the map.
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.interaction.Interaction}
|
* @extends {ol.interaction.Interaction}
|
||||||
* @param {ol.interaction.SelectOptions=} opt_options Options.
|
* @param {olx.interaction.SelectOptions=} opt_options Options.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
ol.interaction.Select = function(opt_options) {
|
ol.interaction.Select = function(opt_options) {
|
||||||
|
|||||||
@@ -410,10 +410,10 @@ ol.parser.GeoJSON.prototype.write = function(obj) {
|
|||||||
*/
|
*/
|
||||||
ol.parser.GeoJSON.GeometryType = {
|
ol.parser.GeoJSON.GeometryType = {
|
||||||
'Point': ol.geom.GeometryType.POINT,
|
'Point': ol.geom.GeometryType.POINT,
|
||||||
'LineString': ol.geom.GeometryType.LINESTRING,
|
'LineString': ol.geom.GeometryType.LINE_STRING,
|
||||||
'Polygon': ol.geom.GeometryType.POLYGON,
|
'Polygon': ol.geom.GeometryType.POLYGON,
|
||||||
'MultiPoint': ol.geom.GeometryType.MULTIPOINT,
|
'MultiPoint': ol.geom.GeometryType.MULTI_POINT,
|
||||||
'MultiLineString': ol.geom.GeometryType.MULTILINESTRING,
|
'MultiLineString': ol.geom.GeometryType.MULTI_LINE_STRING,
|
||||||
'MultiPolygon': ol.geom.GeometryType.MULTIPOLYGON,
|
'MultiPolygon': ol.geom.GeometryType.MULTI_POLYGON,
|
||||||
'GeometryCollection': ol.geom.GeometryType.GEOMETRYCOLLECTION
|
'GeometryCollection': ol.geom.GeometryType.GEOMETRY_COLLECTION
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -21,12 +21,12 @@ goog.require('ol.parser.XML');
|
|||||||
* @implements {ol.parser.DomFeatureParser}
|
* @implements {ol.parser.DomFeatureParser}
|
||||||
* @implements {ol.parser.StringFeatureParser}
|
* @implements {ol.parser.StringFeatureParser}
|
||||||
* @implements {ol.parser.ObjectFeatureParser}
|
* @implements {ol.parser.ObjectFeatureParser}
|
||||||
* @param {ol.parser.GPXOptions=} opt_options Optional configuration object.
|
* @param {olx.parser.GPXOptions=} opt_options Optional configuration object.
|
||||||
* @extends {ol.parser.XML}
|
* @extends {ol.parser.XML}
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
ol.parser.GPX = function(opt_options) {
|
ol.parser.GPX = function(opt_options) {
|
||||||
var options = /** @type {ol.parser.GPXOptions} */
|
var options = /** @type {olx.parser.GPXOptions} */
|
||||||
(goog.isDef(opt_options) ? opt_options : {});
|
(goog.isDef(opt_options) ? opt_options : {});
|
||||||
this.extractAttributes = goog.isDef(options.extractAttributes) ?
|
this.extractAttributes = goog.isDef(options.extractAttributes) ?
|
||||||
options.extractAttributes : true;
|
options.extractAttributes : true;
|
||||||
@@ -65,7 +65,7 @@ ol.parser.GPX = function(opt_options) {
|
|||||||
},
|
},
|
||||||
'rte': function(node, obj) {
|
'rte': function(node, obj) {
|
||||||
if (this.extractRoutes || obj.force) {
|
if (this.extractRoutes || obj.force) {
|
||||||
var type = ol.geom.GeometryType.LINESTRING;
|
var type = ol.geom.GeometryType.LINE_STRING;
|
||||||
var container = {
|
var container = {
|
||||||
properties: {},
|
properties: {},
|
||||||
geometry: {
|
geometry: {
|
||||||
@@ -269,7 +269,7 @@ ol.parser.GPX.prototype.readFeaturesFromObject = function(obj) {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.parser.GPXWriteOptions} obj Object structure to write out
|
* @param {olx.parser.GPXWriteOptions} obj Object structure to write out
|
||||||
* as GPX.
|
* as GPX.
|
||||||
* @return {string} An string representing the GPX document.
|
* @return {string} An string representing the GPX document.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -40,12 +40,12 @@ goog.require('ol.style.Stroke');
|
|||||||
* @implements {ol.parser.StringFeatureParser}
|
* @implements {ol.parser.StringFeatureParser}
|
||||||
* @implements {ol.parser.AsyncObjectFeatureParser}
|
* @implements {ol.parser.AsyncObjectFeatureParser}
|
||||||
* @implements {ol.parser.AsyncStringFeatureParser}
|
* @implements {ol.parser.AsyncStringFeatureParser}
|
||||||
* @param {ol.parser.KMLOptions=} opt_options Optional configuration object.
|
* @param {olx.parser.KMLOptions=} opt_options Optional configuration object.
|
||||||
* @extends {ol.parser.XML}
|
* @extends {ol.parser.XML}
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
ol.parser.KML = function(opt_options) {
|
ol.parser.KML = function(opt_options) {
|
||||||
var options = /** @type {ol.parser.KMLOptions} */
|
var options = /** @type {olx.parser.KMLOptions} */
|
||||||
(goog.isDef(opt_options) ? opt_options : {});
|
(goog.isDef(opt_options) ? opt_options : {});
|
||||||
this.extractAttributes = goog.isDef(options.extractAttributes) ?
|
this.extractAttributes = goog.isDef(options.extractAttributes) ?
|
||||||
options.extractAttributes : true;
|
options.extractAttributes : true;
|
||||||
@@ -185,19 +185,19 @@ ol.parser.KML = function(opt_options) {
|
|||||||
switch (type) {
|
switch (type) {
|
||||||
case ol.geom.GeometryType.POINT:
|
case ol.geom.GeometryType.POINT:
|
||||||
obj.geometry = {
|
obj.geometry = {
|
||||||
type: ol.geom.GeometryType.MULTIPOINT,
|
type: ol.geom.GeometryType.MULTI_POINT,
|
||||||
parts: parts
|
parts: parts
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case ol.geom.GeometryType.LINESTRING:
|
case ol.geom.GeometryType.LINE_STRING:
|
||||||
obj.geometry = {
|
obj.geometry = {
|
||||||
type: ol.geom.GeometryType.MULTILINESTRING,
|
type: ol.geom.GeometryType.MULTI_LINE_STRING,
|
||||||
parts: parts
|
parts: parts
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
case ol.geom.GeometryType.POLYGON:
|
case ol.geom.GeometryType.POLYGON:
|
||||||
obj.geometry = {
|
obj.geometry = {
|
||||||
type: ol.geom.GeometryType.MULTIPOLYGON,
|
type: ol.geom.GeometryType.MULTI_POLYGON,
|
||||||
parts: parts
|
parts: parts
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
@@ -207,7 +207,7 @@ ol.parser.KML = function(opt_options) {
|
|||||||
} else {
|
} else {
|
||||||
// mixed collection
|
// mixed collection
|
||||||
obj.geometry = {
|
obj.geometry = {
|
||||||
type: ol.geom.GeometryType.GEOMETRYCOLLECTION,
|
type: ol.geom.GeometryType.GEOMETRY_COLLECTION,
|
||||||
parts: parts
|
parts: parts
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -250,7 +250,7 @@ ol.parser.KML = function(opt_options) {
|
|||||||
var coordinates = [];
|
var coordinates = [];
|
||||||
this.readChildNodes(node, coordinates);
|
this.readChildNodes(node, coordinates);
|
||||||
var linestring = {
|
var linestring = {
|
||||||
type: ol.geom.GeometryType.LINESTRING,
|
type: ol.geom.GeometryType.LINE_STRING,
|
||||||
coordinates: coordinates[0]
|
coordinates: coordinates[0]
|
||||||
};
|
};
|
||||||
// in the case of a multi geometry this is parts
|
// in the case of a multi geometry this is parts
|
||||||
@@ -730,7 +730,7 @@ ol.parser.KML = function(opt_options) {
|
|||||||
this.setAttributeNS(node, null, 'id', obj.id);
|
this.setAttributeNS(node, null, 'id', obj.id);
|
||||||
}
|
}
|
||||||
var literal = obj.symbolizer.createLiteral(
|
var literal = obj.symbolizer.createLiteral(
|
||||||
ol.geom.GeometryType.LINESTRING);
|
ol.geom.GeometryType.LINE_STRING);
|
||||||
this.writeNode('color', {
|
this.writeNode('color', {
|
||||||
color: literal.color.substring(1),
|
color: literal.color.substring(1),
|
||||||
opacity: literal.opacity
|
opacity: literal.opacity
|
||||||
@@ -1111,34 +1111,34 @@ ol.parser.KML.prototype.createGeometry_ = function(container) {
|
|||||||
case ol.geom.GeometryType.POINT:
|
case ol.geom.GeometryType.POINT:
|
||||||
geometry = new ol.geom.Point(container.geometry.coordinates);
|
geometry = new ol.geom.Point(container.geometry.coordinates);
|
||||||
break;
|
break;
|
||||||
case ol.geom.GeometryType.LINESTRING:
|
case ol.geom.GeometryType.LINE_STRING:
|
||||||
geometry = new ol.geom.LineString(container.geometry.coordinates);
|
geometry = new ol.geom.LineString(container.geometry.coordinates);
|
||||||
break;
|
break;
|
||||||
case ol.geom.GeometryType.POLYGON:
|
case ol.geom.GeometryType.POLYGON:
|
||||||
geometry = new ol.geom.Polygon(container.geometry.coordinates);
|
geometry = new ol.geom.Polygon(container.geometry.coordinates);
|
||||||
break;
|
break;
|
||||||
case ol.geom.GeometryType.MULTIPOINT:
|
case ol.geom.GeometryType.MULTI_POINT:
|
||||||
coordinates = [];
|
coordinates = [];
|
||||||
for (i = 0, ii = container.geometry.parts.length; i < ii; i++) {
|
for (i = 0, ii = container.geometry.parts.length; i < ii; i++) {
|
||||||
coordinates.push(container.geometry.parts[i].coordinates);
|
coordinates.push(container.geometry.parts[i].coordinates);
|
||||||
}
|
}
|
||||||
geometry = new ol.geom.MultiPoint(coordinates);
|
geometry = new ol.geom.MultiPoint(coordinates);
|
||||||
break;
|
break;
|
||||||
case ol.geom.GeometryType.MULTILINESTRING:
|
case ol.geom.GeometryType.MULTI_LINE_STRING:
|
||||||
coordinates = [];
|
coordinates = [];
|
||||||
for (i = 0, ii = container.geometry.parts.length; i < ii; i++) {
|
for (i = 0, ii = container.geometry.parts.length; i < ii; i++) {
|
||||||
coordinates.push(container.geometry.parts[i].coordinates);
|
coordinates.push(container.geometry.parts[i].coordinates);
|
||||||
}
|
}
|
||||||
geometry = new ol.geom.MultiLineString(coordinates);
|
geometry = new ol.geom.MultiLineString(coordinates);
|
||||||
break;
|
break;
|
||||||
case ol.geom.GeometryType.MULTIPOLYGON:
|
case ol.geom.GeometryType.MULTI_POLYGON:
|
||||||
coordinates = [];
|
coordinates = [];
|
||||||
for (i = 0, ii = container.geometry.parts.length; i < ii; i++) {
|
for (i = 0, ii = container.geometry.parts.length; i < ii; i++) {
|
||||||
coordinates.push(container.geometry.parts[i].coordinates);
|
coordinates.push(container.geometry.parts[i].coordinates);
|
||||||
}
|
}
|
||||||
geometry = new ol.geom.MultiPolygon(coordinates);
|
geometry = new ol.geom.MultiPolygon(coordinates);
|
||||||
break;
|
break;
|
||||||
case ol.geom.GeometryType.GEOMETRYCOLLECTION:
|
case ol.geom.GeometryType.GEOMETRY_COLLECTION:
|
||||||
var geometries = [];
|
var geometries = [];
|
||||||
for (i = 0, ii = container.geometry.parts.length; i < ii; i++) {
|
for (i = 0, ii = container.geometry.parts.length; i < ii; i++) {
|
||||||
geometries.push(this.createGeometry_({
|
geometries.push(this.createGeometry_({
|
||||||
|
|||||||
@@ -649,6 +649,6 @@ ol.parser.ogc.Filter_v1.prototype.setSrsName = function(srsName) {
|
|||||||
this.srsName = srsName;
|
this.srsName = srsName;
|
||||||
if (goog.isDefAndNotNull(this.gmlParser_)) {
|
if (goog.isDefAndNotNull(this.gmlParser_)) {
|
||||||
this.gmlParser_.applyWriteOptions({},
|
this.gmlParser_.applyWriteOptions({},
|
||||||
/** @type {ol.parser.GMLWriteOptions} */ ({srsName: srsName}));
|
/** @type {olx.parser.GMLWriteOptions} */ ({srsName: srsName}));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -22,12 +22,12 @@ goog.require('ol.proj');
|
|||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @implements {ol.parser.StringFeatureParser}
|
* @implements {ol.parser.StringFeatureParser}
|
||||||
* @param {ol.parser.GMLOptions=} opt_options
|
* @param {olx.parser.GMLOptions=} opt_options
|
||||||
* Optional configuration object.
|
* Optional configuration object.
|
||||||
* @extends {ol.parser.XML}
|
* @extends {ol.parser.XML}
|
||||||
*/
|
*/
|
||||||
ol.parser.ogc.GML = function(opt_options) {
|
ol.parser.ogc.GML = function(opt_options) {
|
||||||
var options = /** @type {ol.parser.GMLOptions} */
|
var options = /** @type {olx.parser.GMLOptions} */
|
||||||
(goog.isDef(opt_options) ? opt_options : {});
|
(goog.isDef(opt_options) ? opt_options : {});
|
||||||
this.extractAttributes = goog.isDef(options.extractAttributes) ?
|
this.extractAttributes = goog.isDef(options.extractAttributes) ?
|
||||||
options.extractAttributes : true;
|
options.extractAttributes : true;
|
||||||
@@ -102,7 +102,7 @@ ol.parser.ogc.GML = function(opt_options) {
|
|||||||
[node, parts, container]);
|
[node, parts, container]);
|
||||||
this.readChildNodes(node, parts);
|
this.readChildNodes(node, parts);
|
||||||
container.geometry = {
|
container.geometry = {
|
||||||
type: ol.geom.GeometryType.GEOMETRYCOLLECTION,
|
type: ol.geom.GeometryType.GEOMETRY_COLLECTION,
|
||||||
parts: parts
|
parts: parts
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -115,7 +115,7 @@ ol.parser.ogc.GML = function(opt_options) {
|
|||||||
[node, parts, container]);
|
[node, parts, container]);
|
||||||
this.readChildNodes(node, parts);
|
this.readChildNodes(node, parts);
|
||||||
container.geometry = {
|
container.geometry = {
|
||||||
type: ol.geom.GeometryType.MULTIPOINT,
|
type: ol.geom.GeometryType.MULTI_POINT,
|
||||||
parts: parts
|
parts: parts
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -128,7 +128,7 @@ ol.parser.ogc.GML = function(opt_options) {
|
|||||||
[node, parts, container]);
|
[node, parts, container]);
|
||||||
this.readChildNodes(node, parts);
|
this.readChildNodes(node, parts);
|
||||||
container.geometry = {
|
container.geometry = {
|
||||||
type: ol.geom.GeometryType.MULTILINESTRING,
|
type: ol.geom.GeometryType.MULTI_LINE_STRING,
|
||||||
parts: parts
|
parts: parts
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -141,7 +141,7 @@ ol.parser.ogc.GML = function(opt_options) {
|
|||||||
[node, parts, container]);
|
[node, parts, container]);
|
||||||
this.readChildNodes(node, parts);
|
this.readChildNodes(node, parts);
|
||||||
container.geometry = {
|
container.geometry = {
|
||||||
type: ol.geom.GeometryType.MULTIPOLYGON,
|
type: ol.geom.GeometryType.MULTI_POLYGON,
|
||||||
parts: parts
|
parts: parts
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -173,7 +173,7 @@ ol.parser.ogc.GML = function(opt_options) {
|
|||||||
[node, coordinates, container]);
|
[node, coordinates, container]);
|
||||||
this.readChildNodes(node, coordinates);
|
this.readChildNodes(node, coordinates);
|
||||||
var linestring = {
|
var linestring = {
|
||||||
type: ol.geom.GeometryType.LINESTRING,
|
type: ol.geom.GeometryType.LINE_STRING,
|
||||||
coordinates: coordinates[0]
|
coordinates: coordinates[0]
|
||||||
};
|
};
|
||||||
// in the case of a multi geometry this is parts
|
// in the case of a multi geometry this is parts
|
||||||
@@ -209,7 +209,7 @@ ol.parser.ogc.GML = function(opt_options) {
|
|||||||
container.push(coordinates);
|
container.push(coordinates);
|
||||||
} else {
|
} else {
|
||||||
container.geometry = {
|
container.geometry = {
|
||||||
type: ol.geom.GeometryType.LINEARRING,
|
type: ol.geom.GeometryType.LINEAR_RING,
|
||||||
coordinates: coordinates[0]
|
coordinates: coordinates[0]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -444,20 +444,20 @@ ol.parser.ogc.GML = function(opt_options) {
|
|||||||
var type = geometry.getType(), child;
|
var type = geometry.getType(), child;
|
||||||
if (type === ol.geom.GeometryType.POINT) {
|
if (type === ol.geom.GeometryType.POINT) {
|
||||||
child = this.writeNode('Point', geometry, null, node);
|
child = this.writeNode('Point', geometry, null, node);
|
||||||
} else if (type === ol.geom.GeometryType.MULTIPOINT) {
|
} else if (type === ol.geom.GeometryType.MULTI_POINT) {
|
||||||
child = this.writeNode('MultiPoint', geometry, null, node);
|
child = this.writeNode('MultiPoint', geometry, null, node);
|
||||||
} else if (type === ol.geom.GeometryType.LINEARRING) {
|
} else if (type === ol.geom.GeometryType.LINEAR_RING) {
|
||||||
child = this.writeNode('LinearRing', geometry.getCoordinates(), null,
|
child = this.writeNode('LinearRing', geometry.getCoordinates(), null,
|
||||||
node);
|
node);
|
||||||
} else if (type === ol.geom.GeometryType.LINESTRING) {
|
} else if (type === ol.geom.GeometryType.LINE_STRING) {
|
||||||
child = this.writeNode('LineString', geometry, null, node);
|
child = this.writeNode('LineString', geometry, null, node);
|
||||||
} else if (type === ol.geom.GeometryType.MULTILINESTRING) {
|
} else if (type === ol.geom.GeometryType.MULTI_LINE_STRING) {
|
||||||
child = this.writeNode('MultiLineString', geometry, null, node);
|
child = this.writeNode('MultiLineString', geometry, null, node);
|
||||||
} else if (type === ol.geom.GeometryType.POLYGON) {
|
} else if (type === ol.geom.GeometryType.POLYGON) {
|
||||||
child = this.writeNode('Polygon', geometry, null, node);
|
child = this.writeNode('Polygon', geometry, null, node);
|
||||||
} else if (type === ol.geom.GeometryType.MULTIPOLYGON) {
|
} else if (type === ol.geom.GeometryType.MULTI_POLYGON) {
|
||||||
child = this.writeNode('MultiPolygon', geometry, null, node);
|
child = this.writeNode('MultiPolygon', geometry, null, node);
|
||||||
} else if (type === ol.geom.GeometryType.GEOMETRYCOLLECTION) {
|
} else if (type === ol.geom.GeometryType.GEOMETRY_COLLECTION) {
|
||||||
child = this.writeNode('GeometryCollection', geometry, null, node);
|
child = this.writeNode('GeometryCollection', geometry, null, node);
|
||||||
}
|
}
|
||||||
if (goog.isDefAndNotNull(this.srsName)) {
|
if (goog.isDefAndNotNull(this.srsName)) {
|
||||||
@@ -491,7 +491,7 @@ ol.parser.ogc.GML.prototype.writeGeometry = function(geometry) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string|Document|Element|Object} data Data to read.
|
* @param {string|Document|Element|Object} data Data to read.
|
||||||
* @param {ol.parser.GMLReadOptions=} opt_options Read options.
|
* @param {olx.parser.GMLReadOptions=} opt_options Read options.
|
||||||
* @return {ol.parser.ReadFeaturesResult} An object representing the document.
|
* @return {ol.parser.ReadFeaturesResult} An object representing the document.
|
||||||
*/
|
*/
|
||||||
ol.parser.ogc.GML.prototype.read = function(data, opt_options) {
|
ol.parser.ogc.GML.prototype.read = function(data, opt_options) {
|
||||||
@@ -570,37 +570,37 @@ ol.parser.ogc.GML.prototype.createGeometry = function(container) {
|
|||||||
case ol.geom.GeometryType.POINT:
|
case ol.geom.GeometryType.POINT:
|
||||||
geometry = new ol.geom.Point(container.geometry.coordinates);
|
geometry = new ol.geom.Point(container.geometry.coordinates);
|
||||||
break;
|
break;
|
||||||
case ol.geom.GeometryType.LINEARRING:
|
case ol.geom.GeometryType.LINEAR_RING:
|
||||||
geometry = new ol.geom.LinearRing(container.geometry.coordinates);
|
geometry = new ol.geom.LinearRing(container.geometry.coordinates);
|
||||||
break;
|
break;
|
||||||
case ol.geom.GeometryType.LINESTRING:
|
case ol.geom.GeometryType.LINE_STRING:
|
||||||
geometry = new ol.geom.LineString(container.geometry.coordinates);
|
geometry = new ol.geom.LineString(container.geometry.coordinates);
|
||||||
break;
|
break;
|
||||||
case ol.geom.GeometryType.POLYGON:
|
case ol.geom.GeometryType.POLYGON:
|
||||||
geometry = new ol.geom.Polygon(container.geometry.coordinates);
|
geometry = new ol.geom.Polygon(container.geometry.coordinates);
|
||||||
break;
|
break;
|
||||||
case ol.geom.GeometryType.MULTIPOINT:
|
case ol.geom.GeometryType.MULTI_POINT:
|
||||||
coordinates = [];
|
coordinates = [];
|
||||||
for (i = 0, ii = container.geometry.parts.length; i < ii; i++) {
|
for (i = 0, ii = container.geometry.parts.length; i < ii; i++) {
|
||||||
coordinates.push(container.geometry.parts[i].coordinates);
|
coordinates.push(container.geometry.parts[i].coordinates);
|
||||||
}
|
}
|
||||||
geometry = new ol.geom.MultiPoint(coordinates);
|
geometry = new ol.geom.MultiPoint(coordinates);
|
||||||
break;
|
break;
|
||||||
case ol.geom.GeometryType.MULTILINESTRING:
|
case ol.geom.GeometryType.MULTI_LINE_STRING:
|
||||||
coordinates = [];
|
coordinates = [];
|
||||||
for (i = 0, ii = container.geometry.parts.length; i < ii; i++) {
|
for (i = 0, ii = container.geometry.parts.length; i < ii; i++) {
|
||||||
coordinates.push(container.geometry.parts[i].coordinates);
|
coordinates.push(container.geometry.parts[i].coordinates);
|
||||||
}
|
}
|
||||||
geometry = new ol.geom.MultiLineString(coordinates);
|
geometry = new ol.geom.MultiLineString(coordinates);
|
||||||
break;
|
break;
|
||||||
case ol.geom.GeometryType.MULTIPOLYGON:
|
case ol.geom.GeometryType.MULTI_POLYGON:
|
||||||
coordinates = [];
|
coordinates = [];
|
||||||
for (i = 0, ii = container.geometry.parts.length; i < ii; i++) {
|
for (i = 0, ii = container.geometry.parts.length; i < ii; i++) {
|
||||||
coordinates.push(container.geometry.parts[i].coordinates);
|
coordinates.push(container.geometry.parts[i].coordinates);
|
||||||
}
|
}
|
||||||
geometry = new ol.geom.MultiPolygon(coordinates);
|
geometry = new ol.geom.MultiPolygon(coordinates);
|
||||||
break;
|
break;
|
||||||
case ol.geom.GeometryType.GEOMETRYCOLLECTION:
|
case ol.geom.GeometryType.GEOMETRY_COLLECTION:
|
||||||
var geometries = [];
|
var geometries = [];
|
||||||
for (i = 0, ii = container.geometry.parts.length; i < ii; i++) {
|
for (i = 0, ii = container.geometry.parts.length; i < ii; i++) {
|
||||||
geometries.push(this.createGeometry({
|
geometries.push(this.createGeometry({
|
||||||
@@ -630,7 +630,7 @@ ol.parser.ogc.GML.prototype.readFeaturesFromString = function(str) {
|
|||||||
* Applies the writeOptions passed into the write function.
|
* Applies the writeOptions passed into the write function.
|
||||||
* @param {ol.parser.ReadFeaturesResult} obj Object structure to write out as
|
* @param {ol.parser.ReadFeaturesResult} obj Object structure to write out as
|
||||||
* GML.
|
* GML.
|
||||||
* @param {ol.parser.GMLWriteOptions=} opt_options Write options.
|
* @param {olx.parser.GMLWriteOptions=} opt_options Write options.
|
||||||
*/
|
*/
|
||||||
ol.parser.ogc.GML.prototype.applyWriteOptions = function(obj, opt_options) {
|
ol.parser.ogc.GML.prototype.applyWriteOptions = function(obj, opt_options) {
|
||||||
// srsName handling: opt_options -> this.writeOptions -> obj.metadata
|
// srsName handling: opt_options -> this.writeOptions -> obj.metadata
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ goog.require('ol.parser.ogc.GML');
|
|||||||
* version 2.1.2
|
* version 2.1.2
|
||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param {ol.parser.GMLOptions=} opt_options Optional configuration object.
|
* @param {olx.parser.GMLOptions=} opt_options Optional configuration object.
|
||||||
* @extends {ol.parser.ogc.GML}
|
* @extends {ol.parser.ogc.GML}
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
@@ -127,7 +127,7 @@ goog.inherits(ol.parser.ogc.GML_v2, ol.parser.ogc.GML);
|
|||||||
/**
|
/**
|
||||||
* @param {ol.parser.ReadFeaturesResult} obj Object structure to write out as
|
* @param {ol.parser.ReadFeaturesResult} obj Object structure to write out as
|
||||||
* GML.
|
* GML.
|
||||||
* @param {ol.parser.GMLWriteOptions=} opt_options Write options.
|
* @param {olx.parser.GMLWriteOptions=} opt_options Write options.
|
||||||
* @return {string} A string representing the GML document.
|
* @return {string} A string representing the GML document.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ goog.require('ol.parser.ogc.GML');
|
|||||||
* version 3.1.1
|
* version 3.1.1
|
||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param {ol.parser.GMLOptions=} opt_options Optional configuration object.
|
* @param {olx.parser.GMLOptions=} opt_options Optional configuration object.
|
||||||
* @extends {ol.parser.ogc.GML}
|
* @extends {ol.parser.ogc.GML}
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
@@ -29,18 +29,18 @@ ol.parser.ogc.GML_v3 = function(opt_options) {
|
|||||||
var type = geometry.getType(), child;
|
var type = geometry.getType(), child;
|
||||||
if (type === ol.geom.GeometryType.POINT) {
|
if (type === ol.geom.GeometryType.POINT) {
|
||||||
child = this.writeNode('Point', geometry, null, node);
|
child = this.writeNode('Point', geometry, null, node);
|
||||||
} else if (type === ol.geom.GeometryType.MULTIPOINT) {
|
} else if (type === ol.geom.GeometryType.MULTI_POINT) {
|
||||||
child = this.writeNode('MultiPoint', geometry, null, node);
|
child = this.writeNode('MultiPoint', geometry, null, node);
|
||||||
} else if (type === ol.geom.GeometryType.LINESTRING) {
|
} else if (type === ol.geom.GeometryType.LINE_STRING) {
|
||||||
if (this.curve === true) {
|
if (this.curve === true) {
|
||||||
child = this.writeNode('Curve', geometry, null, node);
|
child = this.writeNode('Curve', geometry, null, node);
|
||||||
} else {
|
} else {
|
||||||
child = this.writeNode('LineString', geometry, null, node);
|
child = this.writeNode('LineString', geometry, null, node);
|
||||||
}
|
}
|
||||||
} else if (type === ol.geom.GeometryType.LINEARRING) {
|
} else if (type === ol.geom.GeometryType.LINEAR_RING) {
|
||||||
child = this.writeNode('LinearRing', geometry.getCoordinates(), null,
|
child = this.writeNode('LinearRing', geometry.getCoordinates(), null,
|
||||||
node);
|
node);
|
||||||
} else if (type === ol.geom.GeometryType.MULTILINESTRING) {
|
} else if (type === ol.geom.GeometryType.MULTI_LINE_STRING) {
|
||||||
if (this.multiCurve === false) {
|
if (this.multiCurve === false) {
|
||||||
child = this.writeNode('MultiLineString', geometry, null, node);
|
child = this.writeNode('MultiLineString', geometry, null, node);
|
||||||
} else {
|
} else {
|
||||||
@@ -52,13 +52,13 @@ ol.parser.ogc.GML_v3 = function(opt_options) {
|
|||||||
} else {
|
} else {
|
||||||
child = this.writeNode('Polygon', geometry, null, node);
|
child = this.writeNode('Polygon', geometry, null, node);
|
||||||
}
|
}
|
||||||
} else if (type === ol.geom.GeometryType.MULTIPOLYGON) {
|
} else if (type === ol.geom.GeometryType.MULTI_POLYGON) {
|
||||||
if (this.multiSurface === false) {
|
if (this.multiSurface === false) {
|
||||||
child = this.writeNode('MultiPolygon', geometry, null, node);
|
child = this.writeNode('MultiPolygon', geometry, null, node);
|
||||||
} else {
|
} else {
|
||||||
child = this.writeNode('MultiSurface', geometry, null, node);
|
child = this.writeNode('MultiSurface', geometry, null, node);
|
||||||
}
|
}
|
||||||
} else if (type === ol.geom.GeometryType.GEOMETRYCOLLECTION) {
|
} else if (type === ol.geom.GeometryType.GEOMETRY_COLLECTION) {
|
||||||
child = this.writeNode('MultiGeometry', geometry, null, node);
|
child = this.writeNode('MultiGeometry', geometry, null, node);
|
||||||
}
|
}
|
||||||
if (goog.isDefAndNotNull(this.srsName)) {
|
if (goog.isDefAndNotNull(this.srsName)) {
|
||||||
@@ -86,7 +86,7 @@ ol.parser.ogc.GML_v3 = function(opt_options) {
|
|||||||
[node, coordinates, container]);
|
[node, coordinates, container]);
|
||||||
this.readChildNodes(node, coordinates);
|
this.readChildNodes(node, coordinates);
|
||||||
var linestring = {
|
var linestring = {
|
||||||
type: ol.geom.GeometryType.LINESTRING,
|
type: ol.geom.GeometryType.LINE_STRING,
|
||||||
coordinates: coordinates[0]
|
coordinates: coordinates[0]
|
||||||
};
|
};
|
||||||
// in the case of a multi geometry this is parts
|
// in the case of a multi geometry this is parts
|
||||||
@@ -176,7 +176,7 @@ ol.parser.ogc.GML_v3 = function(opt_options) {
|
|||||||
[node, parts, container]);
|
[node, parts, container]);
|
||||||
this.readChildNodes(node, parts);
|
this.readChildNodes(node, parts);
|
||||||
container.geometry = {
|
container.geometry = {
|
||||||
type: ol.geom.GeometryType.MULTILINESTRING,
|
type: ol.geom.GeometryType.MULTI_LINE_STRING,
|
||||||
parts: parts
|
parts: parts
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -189,7 +189,7 @@ ol.parser.ogc.GML_v3 = function(opt_options) {
|
|||||||
[node, parts, container]);
|
[node, parts, container]);
|
||||||
this.readChildNodes(node, parts);
|
this.readChildNodes(node, parts);
|
||||||
container.geometry = {
|
container.geometry = {
|
||||||
type: ol.geom.GeometryType.MULTIPOLYGON,
|
type: ol.geom.GeometryType.MULTI_POLYGON,
|
||||||
parts: parts
|
parts: parts
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -425,7 +425,7 @@ goog.inherits(ol.parser.ogc.GML_v3, ol.parser.ogc.GML);
|
|||||||
/**
|
/**
|
||||||
* @param {ol.parser.ReadFeaturesResult} obj Object structure to write out as
|
* @param {ol.parser.ReadFeaturesResult} obj Object structure to write out as
|
||||||
* XML.
|
* XML.
|
||||||
* @param {ol.parser.GMLWriteOptions=} opt_options Write options.
|
* @param {olx.parser.GMLWriteOptions=} opt_options Write options.
|
||||||
* @return {string} An string representing the XML document.
|
* @return {string} An string representing the XML document.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ ol.parser.ogc.SLD_v1 = function() {
|
|||||||
delete config.fill;
|
delete config.fill;
|
||||||
config.zIndex = this.featureTypeCounter;
|
config.zIndex = this.featureTypeCounter;
|
||||||
rule.symbolizers.push(
|
rule.symbolizers.push(
|
||||||
new ol.style.Text(/** @type {ol.style.TextOptions} */(config))
|
new ol.style.Text(/** @type {olx.style.TextOptions} */(config))
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
'Label': function(node, symbolizer) {
|
'Label': function(node, symbolizer) {
|
||||||
@@ -197,7 +197,7 @@ ol.parser.ogc.SLD_v1 = function() {
|
|||||||
if (goog.isDef(config.externalGraphic)) {
|
if (goog.isDef(config.externalGraphic)) {
|
||||||
config.width = config.height = config.size;
|
config.width = config.height = config.size;
|
||||||
symbolizer = new ol.style.Icon(
|
symbolizer = new ol.style.Icon(
|
||||||
/** @type {ol.style.IconOptions} */(config));
|
/** @type {olx.style.IconOptions} */(config));
|
||||||
} else {
|
} else {
|
||||||
symbolizer = new ol.style.Shape(config);
|
symbolizer = new ol.style.Shape(config);
|
||||||
}
|
}
|
||||||
@@ -689,7 +689,7 @@ ol.parser.ogc.SLD_v1.prototype.getScaleDenominatorFromResolution_ =
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string|Document|Element} data Data to read.
|
* @param {string|Document|Element} data Data to read.
|
||||||
* @param {ol.parser.SLDReadOptions=} opt_options Read options.
|
* @param {olx.parser.SLDReadOptions=} opt_options Read options.
|
||||||
* @return {Object} An object representing the document.
|
* @return {Object} An object representing the document.
|
||||||
*/
|
*/
|
||||||
ol.parser.ogc.SLD_v1.prototype.read = function(data, opt_options) {
|
ol.parser.ogc.SLD_v1.prototype.read = function(data, opt_options) {
|
||||||
@@ -713,7 +713,7 @@ ol.parser.ogc.SLD_v1.prototype.read = function(data, opt_options) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Object} style The style to write out.
|
* @param {Object} style The style to write out.
|
||||||
* @param {ol.parser.SLDWriteOptions=} opt_options Write options.
|
* @param {olx.parser.SLDWriteOptions=} opt_options Write options.
|
||||||
* @return {string} The serialized SLD.
|
* @return {string} The serialized SLD.
|
||||||
*/
|
*/
|
||||||
ol.parser.ogc.SLD_v1.prototype.write = function(style, opt_options) {
|
ol.parser.ogc.SLD_v1.prototype.write = function(style, opt_options) {
|
||||||
|
|||||||
@@ -28,9 +28,9 @@ ol.parser.ogc.WFS_v1 = function(opt_options) {
|
|||||||
this.writers = {};
|
this.writers = {};
|
||||||
this.writers[this.defaultNamespaceURI] = {
|
this.writers[this.defaultNamespaceURI] = {
|
||||||
/**
|
/**
|
||||||
* @param {ol.parser.WFSWriteGetFeatureOptions} options Options.
|
* @param {olx.parser.WFSWriteGetFeatureOptions} options Options.
|
||||||
* @return {{node: Node,
|
* @return {{node: Node,
|
||||||
* options: ol.parser.WFSWriteGetFeatureOptions}} Object.
|
* options: olx.parser.WFSWriteGetFeatureOptions}} Object.
|
||||||
* @this {ol.parser.XML}
|
* @this {ol.parser.XML}
|
||||||
*/
|
*/
|
||||||
'GetFeature': function(options) {
|
'GetFeature': function(options) {
|
||||||
@@ -64,7 +64,7 @@ ol.parser.ogc.WFS_v1 = function(opt_options) {
|
|||||||
* @param {{inserts: Array.<ol.Feature>,
|
* @param {{inserts: Array.<ol.Feature>,
|
||||||
* updates: Array.<ol.Feature>,
|
* updates: Array.<ol.Feature>,
|
||||||
* deletes: Array.<ol.Feature>,
|
* deletes: Array.<ol.Feature>,
|
||||||
* options: ol.parser.WFSWriteTransactionOptions}} obj Object.
|
* options: olx.parser.WFSWriteTransactionOptions}} obj Object.
|
||||||
* @return {Element} Node.
|
* @return {Element} Node.
|
||||||
* @this {ol.parser.XML}
|
* @this {ol.parser.XML}
|
||||||
*/
|
*/
|
||||||
@@ -120,7 +120,7 @@ ol.parser.ogc.WFS_v1 = function(opt_options) {
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @param {{feature: ol.Feature,
|
* @param {{feature: ol.Feature,
|
||||||
* options: ol.parser.WFSWriteTransactionOptions}} obj Object.
|
* options: olx.parser.WFSWriteTransactionOptions}} obj Object.
|
||||||
* @return {Element} Node.
|
* @return {Element} Node.
|
||||||
* @this {ol.parser.XML}
|
* @this {ol.parser.XML}
|
||||||
*/
|
*/
|
||||||
@@ -140,7 +140,7 @@ ol.parser.ogc.WFS_v1 = function(opt_options) {
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @param {{feature: ol.Feature,
|
* @param {{feature: ol.Feature,
|
||||||
* options: ol.parser.WFSWriteTransactionOptions}} obj Object.
|
* options: olx.parser.WFSWriteTransactionOptions}} obj Object.
|
||||||
* @return {Element} Node.
|
* @return {Element} Node.
|
||||||
* @this {ol.parser.XML}
|
* @this {ol.parser.XML}
|
||||||
*/
|
*/
|
||||||
@@ -213,7 +213,7 @@ ol.parser.ogc.WFS_v1 = function(opt_options) {
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @param {{feature: ol.Feature,
|
* @param {{feature: ol.Feature,
|
||||||
* options: ol.parser.WFSWriteTransactionOptions}} obj Object.
|
* options: olx.parser.WFSWriteTransactionOptions}} obj Object.
|
||||||
* @return {Element} Node.
|
* @return {Element} Node.
|
||||||
* @this {ol.parser.XML}
|
* @this {ol.parser.XML}
|
||||||
*/
|
*/
|
||||||
@@ -338,7 +338,7 @@ ol.parser.ogc.WFS_v1.prototype.read = function(data) {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.parser.WFSWriteGetFeatureOptions} options Options.
|
* @param {olx.parser.WFSWriteGetFeatureOptions} options Options.
|
||||||
* @return {string} A serialized WFS GetFeature query.
|
* @return {string} A serialized WFS GetFeature query.
|
||||||
*/
|
*/
|
||||||
ol.parser.ogc.WFS_v1.prototype.writeGetFeature = function(options) {
|
ol.parser.ogc.WFS_v1.prototype.writeGetFeature = function(options) {
|
||||||
@@ -352,7 +352,7 @@ ol.parser.ogc.WFS_v1.prototype.writeGetFeature = function(options) {
|
|||||||
* @param {Array.<ol.Feature>} inserts The features to insert.
|
* @param {Array.<ol.Feature>} inserts The features to insert.
|
||||||
* @param {Array.<ol.Feature>} updates The features to update.
|
* @param {Array.<ol.Feature>} updates The features to update.
|
||||||
* @param {Array.<ol.Feature>} deletes The features to delete.
|
* @param {Array.<ol.Feature>} deletes The features to delete.
|
||||||
* @param {ol.parser.WFSWriteTransactionOptions} options Write options.
|
* @param {olx.parser.WFSWriteTransactionOptions} options Write options.
|
||||||
* @return {string} A serialized WFS transaction.
|
* @return {string} A serialized WFS transaction.
|
||||||
*/
|
*/
|
||||||
ol.parser.ogc.WFS_v1.prototype.writeTransaction =
|
ol.parser.ogc.WFS_v1.prototype.writeTransaction =
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
@exportClass ol.style.Fill ol.style.FillOptions
|
@exportSymbol ol.style.Fill
|
||||||
@exportClass ol.style.Icon ol.style.IconOptions
|
@exportSymbol ol.style.Icon
|
||||||
@exportClass ol.style.Rule ol.style.RuleOptions
|
@exportSymbol ol.style.Rule
|
||||||
@exportClass ol.style.Shape ol.style.ShapeOptions
|
@exportSymbol ol.style.Shape
|
||||||
@exportClass ol.style.Stroke ol.style.StrokeOptions
|
@exportSymbol ol.style.Stroke
|
||||||
@exportClass ol.style.Style ol.style.StyleOptions
|
@exportSymbol ol.style.Style
|
||||||
@exportClass ol.style.Text ol.style.TextOptions
|
@exportSymbol ol.style.Text
|
||||||
@exportSymbol ol.style.ShapeType
|
@exportSymbol ol.style.ShapeType
|
||||||
@exportProperty ol.style.ShapeType.CIRCLE
|
@exportProperty ol.style.ShapeType.CIRCLE
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ goog.require('ol.style.Symbolizer');
|
|||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.style.Symbolizer}
|
* @extends {ol.style.Symbolizer}
|
||||||
* @param {ol.style.FillOptions=} opt_options Polygon options.
|
* @param {olx.style.FillOptions=} opt_options Polygon options.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
ol.style.Fill = function(opt_options) {
|
ol.style.Fill = function(opt_options) {
|
||||||
@@ -68,7 +68,7 @@ ol.style.Fill.prototype.createLiteral = function(featureOrType) {
|
|||||||
var literal = null;
|
var literal = null;
|
||||||
|
|
||||||
if (type === ol.geom.GeometryType.POLYGON ||
|
if (type === ol.geom.GeometryType.POLYGON ||
|
||||||
type === ol.geom.GeometryType.MULTIPOLYGON) {
|
type === ol.geom.GeometryType.MULTI_POLYGON) {
|
||||||
|
|
||||||
var color = ol.expr.evaluateFeature(this.color_, feature);
|
var color = ol.expr.evaluateFeature(this.color_, feature);
|
||||||
goog.asserts.assertString(
|
goog.asserts.assertString(
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ goog.require('ol.style.Point');
|
|||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.style.Point}
|
* @extends {ol.style.Point}
|
||||||
* @param {ol.style.IconOptions} options Icon options.
|
* @param {olx.style.IconOptions} options Icon options.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
ol.style.Icon = function(options) {
|
ol.style.Icon = function(options) {
|
||||||
@@ -112,7 +112,7 @@ ol.style.Icon.prototype.createLiteral = function(featureOrType) {
|
|||||||
|
|
||||||
var literal = null;
|
var literal = null;
|
||||||
if (type === ol.geom.GeometryType.POINT ||
|
if (type === ol.geom.GeometryType.POINT ||
|
||||||
type === ol.geom.GeometryType.MULTIPOINT) {
|
type === ol.geom.GeometryType.MULTI_POINT) {
|
||||||
|
|
||||||
var url = ol.expr.evaluateFeature(this.url_, feature);
|
var url = ol.expr.evaluateFeature(this.url_, feature);
|
||||||
goog.asserts.assertString(url, 'url must be a string');
|
goog.asserts.assertString(url, 'url must be a string');
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ goog.require('ol.style.Symbolizer');
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param {ol.style.RuleOptions} options Rule options.
|
* @param {olx.style.RuleOptions} options Rule options.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
ol.style.Rule = function(options) {
|
ol.style.Rule = function(options) {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ goog.require('ol.style.Stroke');
|
|||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.style.Point}
|
* @extends {ol.style.Point}
|
||||||
* @param {ol.style.ShapeOptions} options Shape options.
|
* @param {olx.style.ShapeOptions} options Shape options.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
ol.style.Shape = function(options) {
|
ol.style.Shape = function(options) {
|
||||||
@@ -84,7 +84,7 @@ ol.style.Shape.prototype.createLiteral = function(featureOrType) {
|
|||||||
|
|
||||||
var literal = null;
|
var literal = null;
|
||||||
if (type === ol.geom.GeometryType.POINT ||
|
if (type === ol.geom.GeometryType.POINT ||
|
||||||
type === ol.geom.GeometryType.MULTIPOINT) {
|
type === ol.geom.GeometryType.MULTI_POINT) {
|
||||||
var size = Number(ol.expr.evaluateFeature(this.size_, feature));
|
var size = Number(ol.expr.evaluateFeature(this.size_, feature));
|
||||||
goog.asserts.assert(!isNaN(size), 'size must be a number');
|
goog.asserts.assert(!isNaN(size), 'size must be a number');
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ goog.require('ol.style.Symbolizer');
|
|||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.style.Symbolizer}
|
* @extends {ol.style.Symbolizer}
|
||||||
* @param {ol.style.StrokeOptions=} opt_options Stroke options.
|
* @param {olx.style.StrokeOptions=} opt_options Stroke options.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
ol.style.Stroke = function(opt_options) {
|
ol.style.Stroke = function(opt_options) {
|
||||||
@@ -93,8 +93,8 @@ ol.style.Stroke.prototype.createLiteral = function(featureOrType) {
|
|||||||
goog.asserts.assert(!isNaN(zIndex), 'zIndex must be a number');
|
goog.asserts.assert(!isNaN(zIndex), 'zIndex must be a number');
|
||||||
|
|
||||||
var literal = null;
|
var literal = null;
|
||||||
if (type === ol.geom.GeometryType.LINESTRING ||
|
if (type === ol.geom.GeometryType.LINE_STRING ||
|
||||||
type === ol.geom.GeometryType.MULTILINESTRING) {
|
type === ol.geom.GeometryType.MULTI_LINE_STRING) {
|
||||||
literal = new ol.style.LineLiteral({
|
literal = new ol.style.LineLiteral({
|
||||||
color: color,
|
color: color,
|
||||||
opacity: opacity,
|
opacity: opacity,
|
||||||
@@ -102,7 +102,7 @@ ol.style.Stroke.prototype.createLiteral = function(featureOrType) {
|
|||||||
zIndex: zIndex
|
zIndex: zIndex
|
||||||
});
|
});
|
||||||
} else if (type === ol.geom.GeometryType.POLYGON ||
|
} else if (type === ol.geom.GeometryType.POLYGON ||
|
||||||
type === ol.geom.GeometryType.MULTIPOLYGON) {
|
type === ol.geom.GeometryType.MULTI_POLYGON) {
|
||||||
literal = new ol.style.PolygonLiteral({
|
literal = new ol.style.PolygonLiteral({
|
||||||
strokeColor: color,
|
strokeColor: color,
|
||||||
strokeOpacity: opacity,
|
strokeOpacity: opacity,
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ goog.require('ol.style.TextLiteral');
|
|||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.style.Symbolizer}
|
* @extends {ol.style.Symbolizer}
|
||||||
* @param {ol.style.TextOptions} options Text options.
|
* @param {olx.style.TextOptions} options Text options.
|
||||||
*/
|
*/
|
||||||
ol.style.Text = function(options) {
|
ol.style.Text = function(options) {
|
||||||
|
|
||||||
|
|||||||
@@ -792,10 +792,10 @@ describe('ol.expr.lib', function() {
|
|||||||
]])
|
]])
|
||||||
});
|
});
|
||||||
|
|
||||||
var isPoint = parse('geometryType("point")');
|
var isPoint = parse('geometryType("Point")');
|
||||||
var isLine = parse('geometryType("linestring")');
|
var isLine = parse('geometryType("LineString")');
|
||||||
var isPoly = parse('geometryType("polygon")');
|
var isPoly = parse('geometryType("Polygon")');
|
||||||
var pointOrPoly = parse('geometryType("point") || geometryType("polygon")');
|
var pointOrPoly = parse('geometryType("Point") || geometryType("Polygon")');
|
||||||
|
|
||||||
it('distinguishes point features', function() {
|
it('distinguishes point features', function() {
|
||||||
expect(evaluate(isPoint, point)).to.be(true);
|
expect(evaluate(isPoint, point)).to.be(true);
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ describe('ol.interaction.Draw', function() {
|
|||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
map.addInteraction(new ol.interaction.Draw({
|
map.addInteraction(new ol.interaction.Draw({
|
||||||
layer: layer,
|
layer: layer,
|
||||||
type: ol.geom.GeometryType.MULTIPOINT
|
type: ol.geom.GeometryType.MULTI_POINT
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -127,7 +127,7 @@ describe('ol.interaction.Draw', function() {
|
|||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
map.addInteraction(new ol.interaction.Draw({
|
map.addInteraction(new ol.interaction.Draw({
|
||||||
layer: layer,
|
layer: layer,
|
||||||
type: ol.geom.GeometryType.LINESTRING
|
type: ol.geom.GeometryType.LINE_STRING
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -196,7 +196,7 @@ describe('ol.interaction.Draw', function() {
|
|||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
map.addInteraction(new ol.interaction.Draw({
|
map.addInteraction(new ol.interaction.Draw({
|
||||||
layer: layer,
|
layer: layer,
|
||||||
type: ol.geom.GeometryType.MULTILINESTRING
|
type: ol.geom.GeometryType.MULTI_LINE_STRING
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -279,7 +279,7 @@ describe('ol.interaction.Draw', function() {
|
|||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
map.addInteraction(new ol.interaction.Draw({
|
map.addInteraction(new ol.interaction.Draw({
|
||||||
layer: layer,
|
layer: layer,
|
||||||
type: ol.geom.GeometryType.MULTIPOLYGON
|
type: ol.geom.GeometryType.MULTI_POLYGON
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ describe('ol.parser.gpx', function() {
|
|||||||
feature = obj.features[1];
|
feature = obj.features[1];
|
||||||
geom = feature.getGeometry();
|
geom = feature.getGeometry();
|
||||||
var attributes = feature.getAttributes();
|
var attributes = feature.getAttributes();
|
||||||
expect(geom.getType()).to.eql(ol.geom.GeometryType.LINESTRING);
|
expect(geom.getType()).to.eql(ol.geom.GeometryType.LINE_STRING);
|
||||||
expect(geom.getCoordinates()).to.eql([[-0.1829991904, 51.3761803674],
|
expect(geom.getCoordinates()).to.eql([[-0.1829991904, 51.3761803674],
|
||||||
[-0.1758887005, 51.3697894659], [-0.1833202965, 51.3639790884],
|
[-0.1758887005, 51.3697894659], [-0.1833202965, 51.3639790884],
|
||||||
[-0.1751119509, 51.3567607069]]);
|
[-0.1751119509, 51.3567607069]]);
|
||||||
@@ -29,7 +29,7 @@ describe('ol.parser.gpx', function() {
|
|||||||
feature = obj.features[2];
|
feature = obj.features[2];
|
||||||
geom = feature.getGeometry();
|
geom = feature.getGeometry();
|
||||||
attributes = feature.getAttributes();
|
attributes = feature.getAttributes();
|
||||||
expect(geom.getType()).to.eql(ol.geom.GeometryType.LINESTRING);
|
expect(geom.getType()).to.eql(ol.geom.GeometryType.LINE_STRING);
|
||||||
expect(geom.getCoordinates()).to.eql([[-0.1721292044, 51.3768216433],
|
expect(geom.getCoordinates()).to.eql([[-0.1721292044, 51.3768216433],
|
||||||
[-0.1649230916, 51.370833767], [-0.1736741378, 51.3644368725],
|
[-0.1649230916, 51.370833767], [-0.1736741378, 51.3644368725],
|
||||||
[-0.166259525, 51.3576354272]]);
|
[-0.166259525, 51.3576354272]]);
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ describe('ol.parser.KML', function() {
|
|||||||
var stroke = symbolizers[0];
|
var stroke = symbolizers[0];
|
||||||
expect(stroke).to.be.a(ol.style.Stroke);
|
expect(stroke).to.be.a(ol.style.Stroke);
|
||||||
|
|
||||||
var literal = stroke.createLiteral(ol.geom.GeometryType.LINESTRING);
|
var literal = stroke.createLiteral(ol.geom.GeometryType.LINE_STRING);
|
||||||
expect(literal).to.be.a(ol.style.LineLiteral);
|
expect(literal).to.be.a(ol.style.LineLiteral);
|
||||||
expect(literal.color).to.eql('#ff0000');
|
expect(literal.color).to.eql('#ff0000');
|
||||||
expect(literal.opacity).to.eql(0.5294117647058824);
|
expect(literal.opacity).to.eql(0.5294117647058824);
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ describe('ol.parser.gml_v2', function() {
|
|||||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/point-coord.xml';
|
var url = 'spec/ol/parser/ogc/xml/gml_v2/point-coord.xml';
|
||||||
afterLoadXml(url, function(xml) {
|
afterLoadXml(url, function(xml) {
|
||||||
var obj = parser.read(xml);
|
var obj = parser.read(xml);
|
||||||
expect(obj.geometry.type).to.eql('point');
|
expect(obj.geometry.type).to.eql('Point');
|
||||||
expect(obj.geometry.coordinates).to.eql([1, 2]);
|
expect(obj.geometry.coordinates).to.eql([1, 2]);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
@@ -25,7 +25,7 @@ describe('ol.parser.gml_v2', function() {
|
|||||||
delete parser.srsName;
|
delete parser.srsName;
|
||||||
delete parser.axisOrientation;
|
delete parser.axisOrientation;
|
||||||
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
||||||
expect(obj.geometry.type).to.eql('point');
|
expect(obj.geometry.type).to.eql('Point');
|
||||||
expect(obj.geometry.coordinates).to.eql([1, 2]);
|
expect(obj.geometry.coordinates).to.eql([1, 2]);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
@@ -34,9 +34,9 @@ describe('ol.parser.gml_v2', function() {
|
|||||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/multipoint-coord.xml';
|
var url = 'spec/ol/parser/ogc/xml/gml_v2/multipoint-coord.xml';
|
||||||
afterLoadXml(url, function(xml) {
|
afterLoadXml(url, function(xml) {
|
||||||
var obj = parser.read(xml);
|
var obj = parser.read(xml);
|
||||||
expect(obj.geometry.type).to.eql('multipoint');
|
expect(obj.geometry.type).to.eql('MultiPoint');
|
||||||
expect(obj.geometry.parts.length).to.eql(3);
|
expect(obj.geometry.parts.length).to.eql(3);
|
||||||
expect(obj.geometry.parts[0].type).to.eql('point');
|
expect(obj.geometry.parts[0].type).to.eql('Point');
|
||||||
expect(obj.geometry.parts[0].coordinates).to.eql([1, 2]);
|
expect(obj.geometry.parts[0].coordinates).to.eql([1, 2]);
|
||||||
expect(obj.geometry.parts[1].coordinates).to.eql([2, 3]);
|
expect(obj.geometry.parts[1].coordinates).to.eql([2, 3]);
|
||||||
expect(obj.geometry.parts[2].coordinates).to.eql([3, 4]);
|
expect(obj.geometry.parts[2].coordinates).to.eql([3, 4]);
|
||||||
@@ -54,9 +54,9 @@ describe('ol.parser.gml_v2', function() {
|
|||||||
delete parser.srsName;
|
delete parser.srsName;
|
||||||
delete parser.axisOrientation;
|
delete parser.axisOrientation;
|
||||||
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
||||||
expect(obj.geometry.type).to.eql('multipoint');
|
expect(obj.geometry.type).to.eql('MultiPoint');
|
||||||
expect(obj.geometry.parts.length).to.eql(3);
|
expect(obj.geometry.parts.length).to.eql(3);
|
||||||
expect(obj.geometry.parts[0].type).to.eql('point');
|
expect(obj.geometry.parts[0].type).to.eql('Point');
|
||||||
expect(obj.geometry.parts[0].coordinates).to.eql([1, 2]);
|
expect(obj.geometry.parts[0].coordinates).to.eql([1, 2]);
|
||||||
expect(obj.geometry.parts[1].coordinates).to.eql([2, 3]);
|
expect(obj.geometry.parts[1].coordinates).to.eql([2, 3]);
|
||||||
expect(obj.geometry.parts[2].coordinates).to.eql([3, 4]);
|
expect(obj.geometry.parts[2].coordinates).to.eql([3, 4]);
|
||||||
@@ -67,7 +67,7 @@ describe('ol.parser.gml_v2', function() {
|
|||||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/linestring-coord.xml';
|
var url = 'spec/ol/parser/ogc/xml/gml_v2/linestring-coord.xml';
|
||||||
afterLoadXml(url, function(xml) {
|
afterLoadXml(url, function(xml) {
|
||||||
var obj = parser.read(xml);
|
var obj = parser.read(xml);
|
||||||
expect(obj.geometry.type).to.eql('linestring');
|
expect(obj.geometry.type).to.eql('LineString');
|
||||||
expect(obj.geometry.coordinates.length).to.eql(2);
|
expect(obj.geometry.coordinates.length).to.eql(2);
|
||||||
expect(obj.geometry.coordinates).to.eql([[1, 2], [3, 4]]);
|
expect(obj.geometry.coordinates).to.eql([[1, 2], [3, 4]]);
|
||||||
done();
|
done();
|
||||||
@@ -84,7 +84,7 @@ describe('ol.parser.gml_v2', function() {
|
|||||||
delete parser.srsName;
|
delete parser.srsName;
|
||||||
delete parser.axisOrientation;
|
delete parser.axisOrientation;
|
||||||
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
||||||
expect(obj.geometry.type).to.eql('linestring');
|
expect(obj.geometry.type).to.eql('LineString');
|
||||||
expect(obj.geometry.coordinates.length).to.eql(2);
|
expect(obj.geometry.coordinates.length).to.eql(2);
|
||||||
expect(obj.geometry.coordinates).to.eql([[1, 2], [3, 4]]);
|
expect(obj.geometry.coordinates).to.eql([[1, 2], [3, 4]]);
|
||||||
done();
|
done();
|
||||||
@@ -94,9 +94,9 @@ describe('ol.parser.gml_v2', function() {
|
|||||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/multilinestring-coord.xml';
|
var url = 'spec/ol/parser/ogc/xml/gml_v2/multilinestring-coord.xml';
|
||||||
afterLoadXml(url, function(xml) {
|
afterLoadXml(url, function(xml) {
|
||||||
var obj = parser.read(xml);
|
var obj = parser.read(xml);
|
||||||
expect(obj.geometry.type).to.eql('multilinestring');
|
expect(obj.geometry.type).to.eql('MultiLineString');
|
||||||
expect(obj.geometry.parts.length).to.eql(2);
|
expect(obj.geometry.parts.length).to.eql(2);
|
||||||
expect(obj.geometry.parts[0].type).to.eql('linestring');
|
expect(obj.geometry.parts[0].type).to.eql('LineString');
|
||||||
expect(obj.geometry.parts[0].coordinates).to.eql([[1, 2], [2, 3]]);
|
expect(obj.geometry.parts[0].coordinates).to.eql([[1, 2], [2, 3]]);
|
||||||
expect(obj.geometry.parts[1].coordinates).to.eql([[3, 4], [4, 5]]);
|
expect(obj.geometry.parts[1].coordinates).to.eql([[3, 4], [4, 5]]);
|
||||||
done();
|
done();
|
||||||
@@ -113,9 +113,9 @@ describe('ol.parser.gml_v2', function() {
|
|||||||
delete parser.srsName;
|
delete parser.srsName;
|
||||||
delete parser.axisOrientation;
|
delete parser.axisOrientation;
|
||||||
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
||||||
expect(obj.geometry.type).to.eql('multilinestring');
|
expect(obj.geometry.type).to.eql('MultiLineString');
|
||||||
expect(obj.geometry.parts.length).to.eql(2);
|
expect(obj.geometry.parts.length).to.eql(2);
|
||||||
expect(obj.geometry.parts[0].type).to.eql('linestring');
|
expect(obj.geometry.parts[0].type).to.eql('LineString');
|
||||||
expect(obj.geometry.parts[0].coordinates).to.eql([[1, 2], [2, 3]]);
|
expect(obj.geometry.parts[0].coordinates).to.eql([[1, 2], [2, 3]]);
|
||||||
expect(obj.geometry.parts[1].coordinates).to.eql([[3, 4], [4, 5]]);
|
expect(obj.geometry.parts[1].coordinates).to.eql([[3, 4], [4, 5]]);
|
||||||
done();
|
done();
|
||||||
@@ -125,7 +125,7 @@ describe('ol.parser.gml_v2', function() {
|
|||||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/polygon-coord.xml';
|
var url = 'spec/ol/parser/ogc/xml/gml_v2/polygon-coord.xml';
|
||||||
afterLoadXml(url, function(xml) {
|
afterLoadXml(url, function(xml) {
|
||||||
var obj = parser.read(xml);
|
var obj = parser.read(xml);
|
||||||
expect(obj.geometry.type).to.eql('polygon');
|
expect(obj.geometry.type).to.eql('Polygon');
|
||||||
expect(obj.geometry.coordinates.length).to.eql(3);
|
expect(obj.geometry.coordinates.length).to.eql(3);
|
||||||
expect(obj.geometry.coordinates[0].length).to.eql(4);
|
expect(obj.geometry.coordinates[0].length).to.eql(4);
|
||||||
expect(obj.geometry.coordinates[0]).to.eql([[1, 2], [3, 4],
|
expect(obj.geometry.coordinates[0]).to.eql([[1, 2], [3, 4],
|
||||||
@@ -148,7 +148,7 @@ describe('ol.parser.gml_v2', function() {
|
|||||||
delete parser.srsName;
|
delete parser.srsName;
|
||||||
delete parser.axisOrientation;
|
delete parser.axisOrientation;
|
||||||
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
||||||
expect(obj.geometry.type).to.eql('polygon');
|
expect(obj.geometry.type).to.eql('Polygon');
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -156,9 +156,9 @@ describe('ol.parser.gml_v2', function() {
|
|||||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/multipolygon-coord.xml';
|
var url = 'spec/ol/parser/ogc/xml/gml_v2/multipolygon-coord.xml';
|
||||||
afterLoadXml(url, function(xml) {
|
afterLoadXml(url, function(xml) {
|
||||||
var obj = parser.read(xml);
|
var obj = parser.read(xml);
|
||||||
expect(obj.geometry.type).to.eql('multipolygon');
|
expect(obj.geometry.type).to.eql('MultiPolygon');
|
||||||
expect(obj.geometry.parts.length).to.eql(2);
|
expect(obj.geometry.parts.length).to.eql(2);
|
||||||
expect(obj.geometry.parts[0].type).to.eql('polygon');
|
expect(obj.geometry.parts[0].type).to.eql('Polygon');
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -173,9 +173,9 @@ describe('ol.parser.gml_v2', function() {
|
|||||||
delete parser.srsName;
|
delete parser.srsName;
|
||||||
delete parser.axisOrientation;
|
delete parser.axisOrientation;
|
||||||
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
||||||
expect(obj.geometry.type).to.eql('multipolygon');
|
expect(obj.geometry.type).to.eql('MultiPolygon');
|
||||||
expect(obj.geometry.parts.length).to.eql(2);
|
expect(obj.geometry.parts.length).to.eql(2);
|
||||||
expect(obj.geometry.parts[0].type).to.eql('polygon');
|
expect(obj.geometry.parts[0].type).to.eql('Polygon');
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -192,11 +192,11 @@ describe('ol.parser.gml_v2', function() {
|
|||||||
delete p.srsName;
|
delete p.srsName;
|
||||||
delete p.axisOrientation;
|
delete p.axisOrientation;
|
||||||
expect(goog.dom.xml.loadXml(p.serialize(node))).to.xmleql(xml);
|
expect(goog.dom.xml.loadXml(p.serialize(node))).to.xmleql(xml);
|
||||||
expect(obj.geometry.type).to.eql('geometrycollection');
|
expect(obj.geometry.type).to.eql('GeometryCollection');
|
||||||
expect(obj.geometry.parts.length).to.eql(3);
|
expect(obj.geometry.parts.length).to.eql(3);
|
||||||
expect(obj.geometry.parts[0].type).to.eql('point');
|
expect(obj.geometry.parts[0].type).to.eql('Point');
|
||||||
expect(obj.geometry.parts[1].type).to.eql('linestring');
|
expect(obj.geometry.parts[1].type).to.eql('LineString');
|
||||||
expect(obj.geometry.parts[2].type).to.eql('polygon');
|
expect(obj.geometry.parts[2].type).to.eql('Polygon');
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -220,7 +220,7 @@ describe('ol.parser.gml_v2', function() {
|
|||||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/linearring-coord.xml';
|
var url = 'spec/ol/parser/ogc/xml/gml_v2/linearring-coord.xml';
|
||||||
afterLoadXml(url, function(xml) {
|
afterLoadXml(url, function(xml) {
|
||||||
var obj = parser.read(xml);
|
var obj = parser.read(xml);
|
||||||
expect(obj.geometry.type).to.eql('linearring');
|
expect(obj.geometry.type).to.eql('LinearRing');
|
||||||
expect(obj.geometry.coordinates).to.eql([[1, 2], [3, 4], [5, 6],
|
expect(obj.geometry.coordinates).to.eql([[1, 2], [3, 4], [5, 6],
|
||||||
[1, 2]]);
|
[1, 2]]);
|
||||||
done();
|
done();
|
||||||
@@ -237,7 +237,7 @@ describe('ol.parser.gml_v2', function() {
|
|||||||
delete parser.srsName;
|
delete parser.srsName;
|
||||||
delete parser.axisOrientation;
|
delete parser.axisOrientation;
|
||||||
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
||||||
expect(obj.geometry.type).to.eql('linearring');
|
expect(obj.geometry.type).to.eql('LinearRing');
|
||||||
expect(obj.geometry.coordinates).to.eql([[1, 2], [3, 4], [5, 6],
|
expect(obj.geometry.coordinates).to.eql([[1, 2], [3, 4], [5, 6],
|
||||||
[1, 2]]);
|
[1, 2]]);
|
||||||
done();
|
done();
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ describe('ol.parser.gml_v3', function() {
|
|||||||
delete parser.srsName;
|
delete parser.srsName;
|
||||||
delete parser.axisOrientation;
|
delete parser.axisOrientation;
|
||||||
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
||||||
expect(obj.geometry.type).to.eql('linearring');
|
expect(obj.geometry.type).to.eql('LinearRing');
|
||||||
expect(obj.geometry.coordinates).to.eql([[1, 2], [3, 4], [5, 6],
|
expect(obj.geometry.coordinates).to.eql([[1, 2], [3, 4], [5, 6],
|
||||||
[1, 2]]);
|
[1, 2]]);
|
||||||
done();
|
done();
|
||||||
@@ -41,7 +41,7 @@ describe('ol.parser.gml_v3', function() {
|
|||||||
delete parser.srsName;
|
delete parser.srsName;
|
||||||
delete parser.axisOrientation;
|
delete parser.axisOrientation;
|
||||||
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
||||||
expect(obj.geometry.type).to.eql('linestring');
|
expect(obj.geometry.type).to.eql('LineString');
|
||||||
expect(obj.geometry.coordinates).to.eql([[1, 2], [3, 4]]);
|
expect(obj.geometry.coordinates).to.eql([[1, 2], [3, 4]]);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
@@ -51,7 +51,7 @@ describe('ol.parser.gml_v3', function() {
|
|||||||
afterLoadXml(url, function(xml) {
|
afterLoadXml(url, function(xml) {
|
||||||
var obj = parser.read(xml);
|
var obj = parser.read(xml);
|
||||||
// no write test since simple features only does 2D
|
// no write test since simple features only does 2D
|
||||||
expect(obj.geometry.type).to.eql('linestring');
|
expect(obj.geometry.type).to.eql('LineString');
|
||||||
expect(obj.geometry.coordinates).to.eql([[1, 2, 3], [4, 5, 6]]);
|
expect(obj.geometry.coordinates).to.eql([[1, 2, 3], [4, 5, 6]]);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
@@ -68,7 +68,7 @@ describe('ol.parser.gml_v3', function() {
|
|||||||
delete p.srsName;
|
delete p.srsName;
|
||||||
delete p.axisOrientation;
|
delete p.axisOrientation;
|
||||||
expect(goog.dom.xml.loadXml(p.serialize(node))).to.xmleql(xml);
|
expect(goog.dom.xml.loadXml(p.serialize(node))).to.xmleql(xml);
|
||||||
expect(obj.geometry.type).to.eql('linestring');
|
expect(obj.geometry.type).to.eql('LineString');
|
||||||
expect(obj.geometry.coordinates).to.eql([[1, 2], [3, 4]]);
|
expect(obj.geometry.coordinates).to.eql([[1, 2], [3, 4]]);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
@@ -78,9 +78,9 @@ describe('ol.parser.gml_v3', function() {
|
|||||||
afterLoadXml(url, function(xml) {
|
afterLoadXml(url, function(xml) {
|
||||||
// no write test for plural, we only write singular
|
// no write test for plural, we only write singular
|
||||||
var obj = parser.read(xml);
|
var obj = parser.read(xml);
|
||||||
expect(obj.geometry.type).to.eql('multilinestring');
|
expect(obj.geometry.type).to.eql('MultiLineString');
|
||||||
expect(obj.geometry.parts.length).to.eql(2);
|
expect(obj.geometry.parts.length).to.eql(2);
|
||||||
expect(obj.geometry.parts[0].type).to.eql('linestring');
|
expect(obj.geometry.parts[0].type).to.eql('LineString');
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -96,9 +96,9 @@ describe('ol.parser.gml_v3', function() {
|
|||||||
delete p.srsName;
|
delete p.srsName;
|
||||||
delete p.axisOrientation;
|
delete p.axisOrientation;
|
||||||
expect(goog.dom.xml.loadXml(p.serialize(node))).to.xmleql(xml);
|
expect(goog.dom.xml.loadXml(p.serialize(node))).to.xmleql(xml);
|
||||||
expect(obj.geometry.type).to.eql('multilinestring');
|
expect(obj.geometry.type).to.eql('MultiLineString');
|
||||||
expect(obj.geometry.parts.length).to.eql(2);
|
expect(obj.geometry.parts.length).to.eql(2);
|
||||||
expect(obj.geometry.parts[0].type).to.eql('linestring');
|
expect(obj.geometry.parts[0].type).to.eql('LineString');
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -113,9 +113,9 @@ describe('ol.parser.gml_v3', function() {
|
|||||||
delete parser.srsName;
|
delete parser.srsName;
|
||||||
delete parser.axisOrientation;
|
delete parser.axisOrientation;
|
||||||
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
||||||
expect(obj.geometry.type).to.eql('multilinestring');
|
expect(obj.geometry.type).to.eql('MultiLineString');
|
||||||
expect(obj.geometry.parts.length).to.eql(2);
|
expect(obj.geometry.parts.length).to.eql(2);
|
||||||
expect(obj.geometry.parts[0].type).to.eql('linestring');
|
expect(obj.geometry.parts[0].type).to.eql('LineString');
|
||||||
expect(obj.geometry.parts[0].coordinates).to.eql([[1, 2], [2, 3]]);
|
expect(obj.geometry.parts[0].coordinates).to.eql([[1, 2], [2, 3]]);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
@@ -132,9 +132,9 @@ describe('ol.parser.gml_v3', function() {
|
|||||||
delete p.srsName;
|
delete p.srsName;
|
||||||
delete p.axisOrientation;
|
delete p.axisOrientation;
|
||||||
expect(goog.dom.xml.loadXml(p.serialize(node))).to.xmleql(xml);
|
expect(goog.dom.xml.loadXml(p.serialize(node))).to.xmleql(xml);
|
||||||
expect(obj.geometry.type).to.eql('multilinestring');
|
expect(obj.geometry.type).to.eql('MultiLineString');
|
||||||
expect(obj.geometry.parts.length).to.eql(2);
|
expect(obj.geometry.parts.length).to.eql(2);
|
||||||
expect(obj.geometry.parts[0].type).to.eql('linestring');
|
expect(obj.geometry.parts[0].type).to.eql('LineString');
|
||||||
expect(obj.geometry.parts[0].coordinates).to.eql([[1, 2], [2, 3]]);
|
expect(obj.geometry.parts[0].coordinates).to.eql([[1, 2], [2, 3]]);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
@@ -143,9 +143,9 @@ describe('ol.parser.gml_v3', function() {
|
|||||||
var url = 'spec/ol/parser/ogc/xml/gml_v3/multipoint-plural.xml';
|
var url = 'spec/ol/parser/ogc/xml/gml_v3/multipoint-plural.xml';
|
||||||
afterLoadXml(url, function(xml) {
|
afterLoadXml(url, function(xml) {
|
||||||
var obj = parser.read(xml);
|
var obj = parser.read(xml);
|
||||||
expect(obj.geometry.type).to.eql('multipoint');
|
expect(obj.geometry.type).to.eql('MultiPoint');
|
||||||
expect(obj.geometry.parts.length).to.eql(3);
|
expect(obj.geometry.parts.length).to.eql(3);
|
||||||
expect(obj.geometry.parts[0].type).to.eql('point');
|
expect(obj.geometry.parts[0].type).to.eql('Point');
|
||||||
expect(obj.geometry.parts[0].coordinates).to.eql([1, 2]);
|
expect(obj.geometry.parts[0].coordinates).to.eql([1, 2]);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
@@ -161,9 +161,9 @@ describe('ol.parser.gml_v3', function() {
|
|||||||
delete parser.srsName;
|
delete parser.srsName;
|
||||||
delete parser.axisOrientation;
|
delete parser.axisOrientation;
|
||||||
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
||||||
expect(obj.geometry.type).to.eql('multipoint');
|
expect(obj.geometry.type).to.eql('MultiPoint');
|
||||||
expect(obj.geometry.parts.length).to.eql(3);
|
expect(obj.geometry.parts.length).to.eql(3);
|
||||||
expect(obj.geometry.parts[0].type).to.eql('point');
|
expect(obj.geometry.parts[0].type).to.eql('Point');
|
||||||
expect(obj.geometry.parts[0].coordinates).to.eql([1, 2]);
|
expect(obj.geometry.parts[0].coordinates).to.eql([1, 2]);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
@@ -172,9 +172,9 @@ describe('ol.parser.gml_v3', function() {
|
|||||||
var url = 'spec/ol/parser/ogc/xml/gml_v3/multipolygon-plural.xml';
|
var url = 'spec/ol/parser/ogc/xml/gml_v3/multipolygon-plural.xml';
|
||||||
afterLoadXml(url, function(xml) {
|
afterLoadXml(url, function(xml) {
|
||||||
var obj = parser.read(xml);
|
var obj = parser.read(xml);
|
||||||
expect(obj.geometry.type).to.eql('multipolygon');
|
expect(obj.geometry.type).to.eql('MultiPolygon');
|
||||||
expect(obj.geometry.parts.length).to.eql(2);
|
expect(obj.geometry.parts.length).to.eql(2);
|
||||||
expect(obj.geometry.parts[0].type).to.eql('polygon');
|
expect(obj.geometry.parts[0].type).to.eql('Polygon');
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -190,9 +190,9 @@ describe('ol.parser.gml_v3', function() {
|
|||||||
delete p.srsName;
|
delete p.srsName;
|
||||||
delete p.axisOrientation;
|
delete p.axisOrientation;
|
||||||
expect(goog.dom.xml.loadXml(p.serialize(node))).to.xmleql(xml);
|
expect(goog.dom.xml.loadXml(p.serialize(node))).to.xmleql(xml);
|
||||||
expect(obj.geometry.type).to.eql('multipolygon');
|
expect(obj.geometry.type).to.eql('MultiPolygon');
|
||||||
expect(obj.geometry.parts.length).to.eql(2);
|
expect(obj.geometry.parts.length).to.eql(2);
|
||||||
expect(obj.geometry.parts[0].type).to.eql('polygon');
|
expect(obj.geometry.parts[0].type).to.eql('Polygon');
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -200,9 +200,9 @@ describe('ol.parser.gml_v3', function() {
|
|||||||
var url = 'spec/ol/parser/ogc/xml/gml_v3/multisurface-plural.xml';
|
var url = 'spec/ol/parser/ogc/xml/gml_v3/multisurface-plural.xml';
|
||||||
afterLoadXml(url, function(xml) {
|
afterLoadXml(url, function(xml) {
|
||||||
var obj = parser.read(xml);
|
var obj = parser.read(xml);
|
||||||
expect(obj.geometry.type).to.eql('multipolygon');
|
expect(obj.geometry.type).to.eql('MultiPolygon');
|
||||||
expect(obj.geometry.parts.length).to.eql(2);
|
expect(obj.geometry.parts.length).to.eql(2);
|
||||||
expect(obj.geometry.parts[0].type).to.eql('polygon');
|
expect(obj.geometry.parts[0].type).to.eql('Polygon');
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -217,9 +217,9 @@ describe('ol.parser.gml_v3', function() {
|
|||||||
delete parser.srsName;
|
delete parser.srsName;
|
||||||
delete parser.axisOrientation;
|
delete parser.axisOrientation;
|
||||||
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
||||||
expect(obj.geometry.type).to.eql('multipolygon');
|
expect(obj.geometry.type).to.eql('MultiPolygon');
|
||||||
expect(obj.geometry.parts.length).to.eql(2);
|
expect(obj.geometry.parts.length).to.eql(2);
|
||||||
expect(obj.geometry.parts[0].type).to.eql('polygon');
|
expect(obj.geometry.parts[0].type).to.eql('Polygon');
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -235,9 +235,9 @@ describe('ol.parser.gml_v3', function() {
|
|||||||
delete p.srsName;
|
delete p.srsName;
|
||||||
delete p.axisOrientation;
|
delete p.axisOrientation;
|
||||||
expect(goog.dom.xml.loadXml(p.serialize(node))).to.xmleql(xml);
|
expect(goog.dom.xml.loadXml(p.serialize(node))).to.xmleql(xml);
|
||||||
expect(obj.geometry.type).to.eql('multipolygon');
|
expect(obj.geometry.type).to.eql('MultiPolygon');
|
||||||
expect(obj.geometry.parts.length).to.eql(2);
|
expect(obj.geometry.parts.length).to.eql(2);
|
||||||
expect(obj.geometry.parts[0].type).to.eql('polygon');
|
expect(obj.geometry.parts[0].type).to.eql('Polygon');
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -252,7 +252,7 @@ describe('ol.parser.gml_v3', function() {
|
|||||||
delete parser.srsName;
|
delete parser.srsName;
|
||||||
delete parser.axisOrientation;
|
delete parser.axisOrientation;
|
||||||
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
||||||
expect(obj.geometry.type).to.eql('point');
|
expect(obj.geometry.type).to.eql('Point');
|
||||||
expect(obj.geometry.coordinates).to.eql([1, 2]);
|
expect(obj.geometry.coordinates).to.eql([1, 2]);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
@@ -268,7 +268,7 @@ describe('ol.parser.gml_v3', function() {
|
|||||||
delete parser.srsName;
|
delete parser.srsName;
|
||||||
delete parser.axisOrientation;
|
delete parser.axisOrientation;
|
||||||
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
||||||
expect(obj.geometry.type).to.eql('polygon');
|
expect(obj.geometry.type).to.eql('Polygon');
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -284,7 +284,7 @@ describe('ol.parser.gml_v3', function() {
|
|||||||
delete p.srsName;
|
delete p.srsName;
|
||||||
delete p.axisOrientation;
|
delete p.axisOrientation;
|
||||||
expect(goog.dom.xml.loadXml(p.serialize(node))).to.xmleql(xml);
|
expect(goog.dom.xml.loadXml(p.serialize(node))).to.xmleql(xml);
|
||||||
expect(obj.geometry.type).to.eql('polygon');
|
expect(obj.geometry.type).to.eql('Polygon');
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -40,13 +40,13 @@ describe('ol.parser.WKT', function() {
|
|||||||
it('LineString read / written correctly', function() {
|
it('LineString read / written correctly', function() {
|
||||||
var wkt = 'LINESTRING(30 10,10 30,40 40)';
|
var wkt = 'LINESTRING(30 10,10 30,40 40)';
|
||||||
var geom = parser.read(wkt);
|
var geom = parser.read(wkt);
|
||||||
expect(geom.getType()).to.eql(ol.geom.GeometryType.LINESTRING);
|
expect(geom.getType()).to.eql(ol.geom.GeometryType.LINE_STRING);
|
||||||
expect(geom.getCoordinates()).to.eql([[30, 10], [10, 30], [40, 40]]);
|
expect(geom.getCoordinates()).to.eql([[30, 10], [10, 30], [40, 40]]);
|
||||||
expect(parser.write(geom)).to.eql(wkt);
|
expect(parser.write(geom)).to.eql(wkt);
|
||||||
// test whitespace when reading
|
// test whitespace when reading
|
||||||
wkt = 'LINESTRING (30 10, 10 30, 40 40)';
|
wkt = 'LINESTRING (30 10, 10 30, 40 40)';
|
||||||
geom = parser.read(wkt);
|
geom = parser.read(wkt);
|
||||||
expect(geom.getType()).to.eql(ol.geom.GeometryType.LINESTRING);
|
expect(geom.getType()).to.eql(ol.geom.GeometryType.LINE_STRING);
|
||||||
expect(geom.getCoordinates()).to.eql([[30, 10], [10, 30], [40, 40]]);
|
expect(geom.getCoordinates()).to.eql([[30, 10], [10, 30], [40, 40]]);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -54,10 +54,10 @@ describe('ol.parser.WKT', function() {
|
|||||||
var wkt = 'MULTILINESTRING((10 10,20 20,10 40),' +
|
var wkt = 'MULTILINESTRING((10 10,20 20,10 40),' +
|
||||||
'(40 40,30 30,40 20,30 10))';
|
'(40 40,30 30,40 20,30 10))';
|
||||||
var geom = parser.read(wkt);
|
var geom = parser.read(wkt);
|
||||||
expect(geom.getType()).to.eql(ol.geom.GeometryType.MULTILINESTRING);
|
expect(geom.getType()).to.eql(ol.geom.GeometryType.MULTI_LINE_STRING);
|
||||||
var components = geom.getComponents();
|
var components = geom.getComponents();
|
||||||
expect(components.length).to.eql(2);
|
expect(components.length).to.eql(2);
|
||||||
expect(components[0].getType()).to.eql(ol.geom.GeometryType.LINESTRING);
|
expect(components[0].getType()).to.eql(ol.geom.GeometryType.LINE_STRING);
|
||||||
expect(components[0].getCoordinates()).to.eql(
|
expect(components[0].getCoordinates()).to.eql(
|
||||||
[[10, 10], [20, 20], [10, 40]]);
|
[[10, 10], [20, 20], [10, 40]]);
|
||||||
expect(parser.write(geom)).to.eql(wkt);
|
expect(parser.write(geom)).to.eql(wkt);
|
||||||
@@ -65,11 +65,11 @@ describe('ol.parser.WKT', function() {
|
|||||||
wkt = 'MULTILINESTRING ( (10 10, 20 20, 10 40), ' +
|
wkt = 'MULTILINESTRING ( (10 10, 20 20, 10 40), ' +
|
||||||
'(40 40, 30 30, 40 20, 30 10) )';
|
'(40 40, 30 30, 40 20, 30 10) )';
|
||||||
geom = parser.read(wkt);
|
geom = parser.read(wkt);
|
||||||
expect(geom.getType()).to.eql(ol.geom.GeometryType.MULTILINESTRING);
|
expect(geom.getType()).to.eql(ol.geom.GeometryType.MULTI_LINE_STRING);
|
||||||
components = geom.getComponents();
|
components = geom.getComponents();
|
||||||
expect(components.length).to.eql(2);
|
expect(components.length).to.eql(2);
|
||||||
expect(components[0].getType()).to.eql(
|
expect(components[0].getType()).to.eql(
|
||||||
ol.geom.GeometryType.LINESTRING);
|
ol.geom.GeometryType.LINE_STRING);
|
||||||
expect(components[0].getCoordinates()).to.eql(
|
expect(components[0].getCoordinates()).to.eql(
|
||||||
[[10, 10], [20, 20], [10, 40]]);
|
[[10, 10], [20, 20], [10, 40]]);
|
||||||
});
|
});
|
||||||
@@ -80,7 +80,7 @@ describe('ol.parser.WKT', function() {
|
|||||||
expect(geom.getType()).to.eql(ol.geom.GeometryType.POLYGON);
|
expect(geom.getType()).to.eql(ol.geom.GeometryType.POLYGON);
|
||||||
var rings = geom.getRings();
|
var rings = geom.getRings();
|
||||||
expect(rings.length).to.eql(1);
|
expect(rings.length).to.eql(1);
|
||||||
expect(rings[0].getType()).to.eql(ol.geom.GeometryType.LINEARRING);
|
expect(rings[0].getType()).to.eql(ol.geom.GeometryType.LINEAR_RING);
|
||||||
expect(rings[0].getCoordinates()).to.eql(
|
expect(rings[0].getCoordinates()).to.eql(
|
||||||
[[30, 10], [10, 20], [20, 40], [40, 40], [30, 10]]);
|
[[30, 10], [10, 20], [20, 40], [40, 40], [30, 10]]);
|
||||||
expect(parser.write(geom)).to.eql(wkt);
|
expect(parser.write(geom)).to.eql(wkt);
|
||||||
@@ -91,8 +91,8 @@ describe('ol.parser.WKT', function() {
|
|||||||
expect(geom.getType()).to.eql(ol.geom.GeometryType.POLYGON);
|
expect(geom.getType()).to.eql(ol.geom.GeometryType.POLYGON);
|
||||||
var rings = geom.getRings();
|
var rings = geom.getRings();
|
||||||
expect(rings.length).to.eql(2);
|
expect(rings.length).to.eql(2);
|
||||||
expect(rings[0].getType()).to.eql(ol.geom.GeometryType.LINEARRING);
|
expect(rings[0].getType()).to.eql(ol.geom.GeometryType.LINEAR_RING);
|
||||||
expect(rings[1].getType()).to.eql(ol.geom.GeometryType.LINEARRING);
|
expect(rings[1].getType()).to.eql(ol.geom.GeometryType.LINEAR_RING);
|
||||||
expect(rings[0].getCoordinates()).to.eql(
|
expect(rings[0].getCoordinates()).to.eql(
|
||||||
[[35, 10], [10, 20], [15, 40], [45, 45], [35, 10]]);
|
[[35, 10], [10, 20], [15, 40], [45, 45], [35, 10]]);
|
||||||
expect(rings[1].getCoordinates()).to.eql(
|
expect(rings[1].getCoordinates()).to.eql(
|
||||||
@@ -105,7 +105,7 @@ describe('ol.parser.WKT', function() {
|
|||||||
expect(geom.getType()).to.eql(ol.geom.GeometryType.POLYGON);
|
expect(geom.getType()).to.eql(ol.geom.GeometryType.POLYGON);
|
||||||
var rings = geom.getRings();
|
var rings = geom.getRings();
|
||||||
expect(rings.length).to.eql(1);
|
expect(rings.length).to.eql(1);
|
||||||
expect(rings[0].getType()).to.eql(ol.geom.GeometryType.LINEARRING);
|
expect(rings[0].getType()).to.eql(ol.geom.GeometryType.LINEAR_RING);
|
||||||
expect(rings[0].getCoordinates()).to.eql(
|
expect(rings[0].getCoordinates()).to.eql(
|
||||||
[[30, 10], [10, 20], [20, 40], [40, 40], [30, 10]]);
|
[[30, 10], [10, 20], [20, 40], [40, 40], [30, 10]]);
|
||||||
});
|
});
|
||||||
@@ -115,7 +115,7 @@ describe('ol.parser.WKT', function() {
|
|||||||
var wkt = 'MULTIPOLYGON(((40 40,45 30,20 45,40 40)),' +
|
var wkt = 'MULTIPOLYGON(((40 40,45 30,20 45,40 40)),' +
|
||||||
'((20 35,45 20,30 5,10 10,10 30,20 35),(30 20,20 25,20 15,30 20)))';
|
'((20 35,45 20,30 5,10 10,10 30,20 35),(30 20,20 25,20 15,30 20)))';
|
||||||
var geom = parser.read(wkt);
|
var geom = parser.read(wkt);
|
||||||
expect(geom.getType()).to.eql(ol.geom.GeometryType.MULTIPOLYGON);
|
expect(geom.getType()).to.eql(ol.geom.GeometryType.MULTI_POLYGON);
|
||||||
var components = geom.getComponents();
|
var components = geom.getComponents();
|
||||||
expect(components.length).to.eql(2);
|
expect(components.length).to.eql(2);
|
||||||
expect(components[0].getType()).to.eql(ol.geom.GeometryType.POLYGON);
|
expect(components[0].getType()).to.eql(ol.geom.GeometryType.POLYGON);
|
||||||
@@ -135,7 +135,7 @@ describe('ol.parser.WKT', function() {
|
|||||||
'( (20 35, 45 20,30 5,10 10,10 30,20 35), ' +
|
'( (20 35, 45 20,30 5,10 10,10 30,20 35), ' +
|
||||||
'( 30 20, 20 25,20 15 ,30 20 ) ))';
|
'( 30 20, 20 25,20 15 ,30 20 ) ))';
|
||||||
geom = parser.read(wkt);
|
geom = parser.read(wkt);
|
||||||
expect(geom.getType()).to.eql(ol.geom.GeometryType.MULTIPOLYGON);
|
expect(geom.getType()).to.eql(ol.geom.GeometryType.MULTI_POLYGON);
|
||||||
var components = geom.getComponents();
|
var components = geom.getComponents();
|
||||||
expect(components.length).to.eql(2);
|
expect(components.length).to.eql(2);
|
||||||
expect(components[0].getType()).to.eql(ol.geom.GeometryType.POLYGON);
|
expect(components[0].getType()).to.eql(ol.geom.GeometryType.POLYGON);
|
||||||
@@ -155,9 +155,9 @@ describe('ol.parser.WKT', function() {
|
|||||||
var geom = parser.read(wkt);
|
var geom = parser.read(wkt);
|
||||||
var components = geom.getComponents();
|
var components = geom.getComponents();
|
||||||
expect(components.length).to.eql(2);
|
expect(components.length).to.eql(2);
|
||||||
expect(geom.getType()).to.eql(ol.geom.GeometryType.GEOMETRYCOLLECTION);
|
expect(geom.getType()).to.eql(ol.geom.GeometryType.GEOMETRY_COLLECTION);
|
||||||
expect(components[0].getType()).to.eql(ol.geom.GeometryType.POINT);
|
expect(components[0].getType()).to.eql(ol.geom.GeometryType.POINT);
|
||||||
expect(components[1].getType()).to.eql(ol.geom.GeometryType.LINESTRING);
|
expect(components[1].getType()).to.eql(ol.geom.GeometryType.LINE_STRING);
|
||||||
expect(components[0].getCoordinates()).to.eql([4, 6]);
|
expect(components[0].getCoordinates()).to.eql([4, 6]);
|
||||||
expect(components[1].getCoordinates()).to.eql([[4, 6], [7, 10]]);
|
expect(components[1].getCoordinates()).to.eql([[4, 6], [7, 10]]);
|
||||||
expect(parser.write(geom)).to.eql(wkt);
|
expect(parser.write(geom)).to.eql(wkt);
|
||||||
@@ -166,10 +166,10 @@ describe('ol.parser.WKT', function() {
|
|||||||
geom = parser.read(wkt);
|
geom = parser.read(wkt);
|
||||||
components = geom.getComponents();
|
components = geom.getComponents();
|
||||||
expect(components.length).to.eql(2);
|
expect(components.length).to.eql(2);
|
||||||
expect(geom.getType()).to.eql(ol.geom.GeometryType.GEOMETRYCOLLECTION);
|
expect(geom.getType()).to.eql(ol.geom.GeometryType.GEOMETRY_COLLECTION);
|
||||||
expect(components[0].getType()).to.eql(ol.geom.GeometryType.POINT);
|
expect(components[0].getType()).to.eql(ol.geom.GeometryType.POINT);
|
||||||
expect(components[1].getType()).to.eql(
|
expect(components[1].getType()).to.eql(
|
||||||
ol.geom.GeometryType.LINESTRING);
|
ol.geom.GeometryType.LINE_STRING);
|
||||||
expect(components[0].getCoordinates()).to.eql([4, 6]);
|
expect(components[0].getCoordinates()).to.eql([4, 6]);
|
||||||
expect(components[1].getCoordinates()).to.eql([[4, 6], [7, 10]]);
|
expect(components[1].getCoordinates()).to.eql([[4, 6], [7, 10]]);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ describe('ol.style.Stroke', function() {
|
|||||||
it('applies the default values', function() {
|
it('applies the default values', function() {
|
||||||
var symbolizer = new ol.style.Stroke({});
|
var symbolizer = new ol.style.Stroke({});
|
||||||
|
|
||||||
var literal = symbolizer.createLiteral(ol.geom.GeometryType.LINESTRING);
|
var literal = symbolizer.createLiteral(ol.geom.GeometryType.LINE_STRING);
|
||||||
expect(literal).to.be.a(ol.style.LineLiteral);
|
expect(literal).to.be.a(ol.style.LineLiteral);
|
||||||
expect(literal.color).to.be('#696969');
|
expect(literal.color).to.be('#696969');
|
||||||
expect(literal.opacity).to.be(0.75);
|
expect(literal.opacity).to.be(0.75);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.AttributionOptions
|
* @typedef {Object} olx.AttributionOptions
|
||||||
* @property {string} html HTML markup for this attribution.
|
* @property {string} html HTML markup for this attribution.
|
||||||
* @property {Object.<string, Array.<ol.TileRange>>|undefined} tileRanges
|
* @property {Object.<string, Array.<ol.TileRange>>|undefined} tileRanges
|
||||||
* Tile ranges (FOR INTERNAL USE ONLY).
|
* Tile ranges (FOR INTERNAL USE ONLY).
|
||||||
@@ -7,13 +7,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.DeviceOrientationOptions
|
* @typedef {Object} olx.DeviceOrientationOptions
|
||||||
* @property {boolean|undefined} tracking Start tracking. Default is `false`.
|
* @property {boolean|undefined} tracking Start tracking. Default is `false`.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.GeolocationOptions
|
* @typedef {Object} olx.GeolocationOptions
|
||||||
* @property {boolean|undefined} tracking Start Tracking. Default is `false`.
|
* @property {boolean|undefined} tracking Start Tracking. Default is `false`.
|
||||||
* @property {GeolocationPositionOptions|undefined} trackingOptions Tracking options.
|
* @property {GeolocationPositionOptions|undefined} trackingOptions Tracking options.
|
||||||
* @property {ol.proj.ProjectionLike} projection Projection.
|
* @property {ol.proj.ProjectionLike} projection Projection.
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Object literal with config options for the map.
|
* Object literal with config options for the map.
|
||||||
* @typedef {Object} ol.MapOptions
|
* @typedef {Object} olx.MapOptions
|
||||||
* @property {ol.Collection|Array.<ol.control.Control>|undefined} controls
|
* @property {ol.Collection|Array.<ol.control.Control>|undefined} controls
|
||||||
* Controls initially added to the map.
|
* Controls initially added to the map.
|
||||||
* @property {ol.Collection|Array.<ol.interaction.Interaction>|undefined} interactions
|
* @property {ol.Collection|Array.<ol.interaction.Interaction>|undefined} interactions
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Object literal with config options for the overlay.
|
* Object literal with config options for the overlay.
|
||||||
* @typedef {Object} ol.OverlayOptions
|
* @typedef {Object} olx.OverlayOptions
|
||||||
* @property {Element|undefined} element The overlay element.
|
* @property {Element|undefined} element The overlay element.
|
||||||
* @property {ol.Coordinate|undefined} position The overlay position in map
|
* @property {ol.Coordinate|undefined} position The overlay position in map
|
||||||
* projection.
|
* projection.
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Object literal with config options for the Proj4js projection.
|
* Object literal with config options for the Proj4js projection.
|
||||||
* @typedef {Object} ol.Proj4jsProjectionOptions
|
* @typedef {Object} olx.Proj4jsProjectionOptions
|
||||||
* @property {string} code The SRS identifier code, e.g. `EPSG:31256`.
|
* @property {string} code The SRS identifier code, e.g. `EPSG:31256`.
|
||||||
* @property {ol.Extent|undefined} extent The validity extent for the SRS.
|
* @property {ol.Extent|undefined} extent The validity extent for the SRS.
|
||||||
* @property {boolean|undefined} global Whether the projection is valid for the
|
* @property {boolean|undefined} global Whether the projection is valid for the
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Object literal with config options for the projection.
|
* Object literal with config options for the projection.
|
||||||
* @typedef {Object} ol.ProjectionOptions
|
* @typedef {Object} olx.ProjectionOptions
|
||||||
* @property {string} code The SRS identifier code, e.g. `EPSG:4326`.
|
* @property {string} code The SRS identifier code, e.g. `EPSG:4326`.
|
||||||
* @property {ol.proj.Units} units Units.
|
* @property {ol.proj.Units} units Units.
|
||||||
* @property {ol.Extent|undefined} extent The validity extent for the SRS.
|
* @property {ol.Extent|undefined} extent The validity extent for the SRS.
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Object literal with config options for the view.
|
* Object literal with config options for the view.
|
||||||
* @typedef {Object} ol.View2DOptions
|
* @typedef {Object} olx.View2DOptions
|
||||||
* @property {ol.Coordinate|undefined} center The initial center for the view.
|
* @property {ol.Coordinate|undefined} center The initial center for the view.
|
||||||
* The coordinate system for the center is specified with the `projection`
|
* The coordinate system for the center is specified with the `projection`
|
||||||
* option. Default is `undefined`, and layer sources will not be fetched if
|
* option. Default is `undefined`, and layer sources will not be fetched if
|
||||||
@@ -122,7 +122,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.animation.BounceOptions
|
* @typedef {Object} olx.animation.BounceOptions
|
||||||
* @property {number} resolution The resolution to start the bounce from, typically `map.getView().getResolution()`.
|
* @property {number} resolution The resolution to start the bounce from, typically `map.getView().getResolution()`.
|
||||||
* @property {number|undefined} start The start time of the animation. Default is immediately.
|
* @property {number|undefined} start The start time of the animation. Default is immediately.
|
||||||
* @property {number|undefined} duration The duration of the animation in milliseconds. Default is `1000`.
|
* @property {number|undefined} duration The duration of the animation in milliseconds. Default is `1000`.
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.animation.PanOptions
|
* @typedef {Object} olx.animation.PanOptions
|
||||||
* @property {ol.Coordinate} source The location to start panning from, typically `map.getView().getCenter()`.
|
* @property {ol.Coordinate} source The location to start panning from, typically `map.getView().getCenter()`.
|
||||||
* @property {number|undefined} start The start time of the animation. Default is immediately.
|
* @property {number|undefined} start The start time of the animation. Default is immediately.
|
||||||
* @property {number|undefined} duration The duration of the animation in milliseconds. Default is `1000`.
|
* @property {number|undefined} duration The duration of the animation in milliseconds. Default is `1000`.
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.animation.RotateOptions
|
* @typedef {Object} olx.animation.RotateOptions
|
||||||
* @property {number} rotation The rotation to apply, in radians.
|
* @property {number} rotation The rotation to apply, in radians.
|
||||||
* @property {number|undefined} start The start time of the animation. Default is immediately.
|
* @property {number|undefined} start The start time of the animation. Default is immediately.
|
||||||
* @property {number|undefined} duration The duration of the animation in milliseconds. Default is `1000`.
|
* @property {number|undefined} duration The duration of the animation in milliseconds. Default is `1000`.
|
||||||
@@ -149,7 +149,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.animation.ZoomOptions
|
* @typedef {Object} olx.animation.ZoomOptions
|
||||||
* @property {number} resolution number The resolution to begin zooming from, typically `map.getView().getResolution()`.
|
* @property {number} resolution number The resolution to begin zooming from, typically `map.getView().getResolution()`.
|
||||||
* @property {number|undefined} start The start time of the animation. Default is immediately.
|
* @property {number|undefined} start The start time of the animation. Default is immediately.
|
||||||
* @property {number|undefined} duration The duration of the animation in milliseconds. Default is `1000`.
|
* @property {number|undefined} duration The duration of the animation in milliseconds. Default is `1000`.
|
||||||
@@ -158,33 +158,33 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.control.AttributionOptions
|
* @typedef {Object} olx.control.AttributionOptions
|
||||||
* @property {string|undefined} className CSS class name. Default is `ol-attribution`.
|
* @property {string|undefined} className CSS class name. Default is `ol-attribution`.
|
||||||
* @property {Element|undefined} target Target.
|
* @property {Element|undefined} target Target.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.control.ControlOptions
|
* @typedef {Object} olx.control.ControlOptions
|
||||||
* @property {Element|undefined} element Element.
|
* @property {Element|undefined} element Element.
|
||||||
* @property {Element|undefined} target Target.
|
* @property {Element|undefined} target Target.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.control.DefaultsOptions
|
* @typedef {Object} olx.control.DefaultsOptions
|
||||||
* @property {boolean|undefined} attribution Attribution.
|
* @property {boolean|undefined} attribution Attribution.
|
||||||
* @property {ol.control.AttributionOptions|undefined} attributionOptions
|
* @property {olx.control.AttributionOptions|undefined} attributionOptions
|
||||||
* Attribution options.
|
* Attribution options.
|
||||||
* @property {boolean|undefined} logo Logo.
|
* @property {boolean|undefined} logo Logo.
|
||||||
* @property {ol.control.LogoOptions|undefined} logoOptions Logo options.
|
* @property {olx.control.LogoOptions|undefined} logoOptions Logo options.
|
||||||
* @property {boolean|undefined} zoom Zoom.
|
* @property {boolean|undefined} zoom Zoom.
|
||||||
* @property {ol.control.ZoomOptions|undefined} zoomOptions Zoom options.
|
* @property {olx.control.ZoomOptions|undefined} zoomOptions Zoom options.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.control.FullScreenOptions
|
* @typedef {Object} olx.control.FullScreenOptions
|
||||||
* @property {string|undefined} className CSS class name. Default is `ol-full-screen`.
|
* @property {string|undefined} className CSS class name. Default is `ol-full-screen`.
|
||||||
* @property {boolean|undefined} keys Full keyboard access.
|
* @property {boolean|undefined} keys Full keyboard access.
|
||||||
* @property {Element|undefined} target Target.
|
* @property {Element|undefined} target Target.
|
||||||
@@ -192,14 +192,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.control.LogoOptions
|
* @typedef {Object} olx.control.LogoOptions
|
||||||
* @property {string|undefined} className CSS class name. Default is `ol-logo`.
|
* @property {string|undefined} className CSS class name. Default is `ol-logo`.
|
||||||
* @property {Element|undefined} target Target.
|
* @property {Element|undefined} target Target.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.control.MousePositionOptions
|
* @typedef {Object} olx.control.MousePositionOptions
|
||||||
* @property {string|undefined} className CSS class name. Default is `ol-mouse-position`.
|
* @property {string|undefined} className CSS class name. Default is `ol-mouse-position`.
|
||||||
* @property {ol.CoordinateFormatType|undefined} coordinateFormat Coordinate
|
* @property {ol.CoordinateFormatType|undefined} coordinateFormat Coordinate
|
||||||
* format.
|
* format.
|
||||||
@@ -211,7 +211,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.control.ScaleLineOptions
|
* @typedef {Object} olx.control.ScaleLineOptions
|
||||||
* @property {string|undefined} className CSS Class name. Default is `ol-scale-line`.
|
* @property {string|undefined} className CSS Class name. Default is `ol-scale-line`.
|
||||||
* @property {number|undefined} minWidth Minimum width in pixels.
|
* @property {number|undefined} minWidth Minimum width in pixels.
|
||||||
* @property {Element|undefined} target Target.
|
* @property {Element|undefined} target Target.
|
||||||
@@ -220,7 +220,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.control.ZoomOptions
|
* @typedef {Object} olx.control.ZoomOptions
|
||||||
* @property {number|undefined} duration Animation duration in milliseconds. Default is `250`.
|
* @property {number|undefined} duration Animation duration in milliseconds. Default is `250`.
|
||||||
* @property {string|undefined} className CSS class name. Default is `ol-zoom`.
|
* @property {string|undefined} className CSS class name. Default is `ol-zoom`.
|
||||||
* @property {number|undefined} delta The zoom delta applied on each click.
|
* @property {number|undefined} delta The zoom delta applied on each click.
|
||||||
@@ -229,7 +229,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.control.ZoomSliderOptions
|
* @typedef {Object} olx.control.ZoomSliderOptions
|
||||||
* @property {string|undefined} className CSS class name.
|
* @property {string|undefined} className CSS class name.
|
||||||
* @property {number|undefined} maxResolution Maximum resolution.
|
* @property {number|undefined} maxResolution Maximum resolution.
|
||||||
* @property {number|undefined} minResolution Minimum resolution.
|
* @property {number|undefined} minResolution Minimum resolution.
|
||||||
@@ -237,7 +237,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.control.ZoomToExtentOptions
|
* @typedef {Object} olx.control.ZoomToExtentOptions
|
||||||
* @property {string|undefined} className Class name. Default is `ol-zoom-extent`.
|
* @property {string|undefined} className Class name. Default is `ol-zoom-extent`.
|
||||||
* @property {Element|undefined} target Target.
|
* @property {Element|undefined} target Target.
|
||||||
* @property {ol.Extent|undefined} extent The extent to zoom to. If
|
* @property {ol.Extent|undefined} extent The extent to zoom to. If
|
||||||
@@ -246,12 +246,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.format.GeoJSONOptions
|
* @typedef {Object} olx.format.GeoJSONOptions
|
||||||
* @property {ol.proj.ProjectionLike} defaultProjection Default projection.
|
* @property {ol.proj.ProjectionLike} defaultProjection Default projection.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.interaction.DoubleClickZoomOptions
|
* @typedef {Object} olx.interaction.DoubleClickZoomOptions
|
||||||
* @property {number|undefined} duration Animation duration in milliseconds. Default is `250`.
|
* @property {number|undefined} duration Animation duration in milliseconds. Default is `250`.
|
||||||
* @property {number|undefined} delta The zoom delta applied on each double
|
* @property {number|undefined} delta The zoom delta applied on each double
|
||||||
* click, default is `1`.
|
* click, default is `1`.
|
||||||
@@ -259,7 +259,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.interaction.DragPanOptions
|
* @typedef {Object} olx.interaction.DragPanOptions
|
||||||
* @property {ol.Kinetic|undefined} kinetic Kinetic inertia to apply to the pan.
|
* @property {ol.Kinetic|undefined} kinetic Kinetic inertia to apply to the pan.
|
||||||
* @property {ol.events.ConditionType|undefined} condition A conditional
|
* @property {ol.events.ConditionType|undefined} condition A conditional
|
||||||
* modifier (i.e. Shift key) that determines if the interaction is active
|
* modifier (i.e. Shift key) that determines if the interaction is active
|
||||||
@@ -268,7 +268,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.interaction.DragRotateOptions
|
* @typedef {Object} olx.interaction.DragRotateOptions
|
||||||
* @property {ol.events.ConditionType|undefined} condition A conditional
|
* @property {ol.events.ConditionType|undefined} condition A conditional
|
||||||
* modifier (i.e. Shift key) that determines if the interaction is active
|
* modifier (i.e. Shift key) that determines if the interaction is active
|
||||||
* or not, default is both shift and alt keys.
|
* or not, default is both shift and alt keys.
|
||||||
@@ -276,7 +276,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.interaction.DragRotateAndZoomOptions
|
* @typedef {Object} olx.interaction.DragRotateAndZoomOptions
|
||||||
* @property {ol.events.ConditionType|undefined} condition A conditional
|
* @property {ol.events.ConditionType|undefined} condition A conditional
|
||||||
* modifier (i.e. Shift key) that determines if the interaction is active
|
* modifier (i.e. Shift key) that determines if the interaction is active
|
||||||
* or not, default is shify key.
|
* or not, default is shify key.
|
||||||
@@ -284,7 +284,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.interaction.DragZoomOptions
|
* @typedef {Object} olx.interaction.DragZoomOptions
|
||||||
* @property {ol.events.ConditionType|undefined} condition A conditional
|
* @property {ol.events.ConditionType|undefined} condition A conditional
|
||||||
* modifier (i.e. Shift key) that determines if the interaction is active
|
* modifier (i.e. Shift key) that determines if the interaction is active
|
||||||
* or not, default is shift key.
|
* or not, default is shift key.
|
||||||
@@ -293,7 +293,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Interactions for the map. Default is `true` for all options.
|
* Interactions for the map. Default is `true` for all options.
|
||||||
* @typedef {Object} ol.interaction.DefaultsOptions
|
* @typedef {Object} olx.interaction.DefaultsOptions
|
||||||
* @property {boolean|undefined} altShiftDragRotate Whether Alt-Shift-drag
|
* @property {boolean|undefined} altShiftDragRotate Whether Alt-Shift-drag
|
||||||
* rotate is desired.
|
* rotate is desired.
|
||||||
* @property {boolean|undefined} doubleClickZoom Whether double click zoom is
|
* @property {boolean|undefined} doubleClickZoom Whether double click zoom is
|
||||||
@@ -315,7 +315,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.interaction.KeyboardPanOptions
|
* @typedef {Object} olx.interaction.KeyboardPanOptions
|
||||||
* @property {ol.events.ConditionType|undefined} condition A conditional
|
* @property {ol.events.ConditionType|undefined} condition A conditional
|
||||||
* modifier (i.e. Shift key) that determines if the interaction is active
|
* modifier (i.e. Shift key) that determines if the interaction is active
|
||||||
* or not, default is no modifiers.
|
* or not, default is no modifiers.
|
||||||
@@ -325,7 +325,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.interaction.KeyboardZoomOptions
|
* @typedef {Object} olx.interaction.KeyboardZoomOptions
|
||||||
* @property {number|undefined} duration Animation duration in milliseconds. Default is `100`.
|
* @property {number|undefined} duration Animation duration in milliseconds. Default is `100`.
|
||||||
* @property {ol.events.ConditionType|undefined} condition A conditional
|
* @property {ol.events.ConditionType|undefined} condition A conditional
|
||||||
* modifier (i.e. Shift key) that determines if the interaction is active
|
* modifier (i.e. Shift key) that determines if the interaction is active
|
||||||
@@ -335,33 +335,33 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.interaction.MouseWheelZoomOptions
|
* @typedef {Object} olx.interaction.MouseWheelZoomOptions
|
||||||
* @property {number|undefined} duration Animation duration in milliseconds. Default is `250`.
|
* @property {number|undefined} duration Animation duration in milliseconds. Default is `250`.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.interaction.TouchPanOptions
|
* @typedef {Object} olx.interaction.TouchPanOptions
|
||||||
* @property {ol.Kinetic|undefined} kinetic Kinetic inertia to apply to the
|
* @property {ol.Kinetic|undefined} kinetic Kinetic inertia to apply to the
|
||||||
* pan.
|
* pan.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.interaction.TouchRotateOptions
|
* @typedef {Object} olx.interaction.TouchRotateOptions
|
||||||
* @property {number|undefined} threshold Minimal angle in radians to start a rotation.
|
* @property {number|undefined} threshold Minimal angle in radians to start a rotation.
|
||||||
* Default is `0.3`.
|
* Default is `0.3`.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.interaction.TouchZoomOptions
|
* @typedef {Object} olx.interaction.TouchZoomOptions
|
||||||
* @property {number|undefined} duration Animation duration in milliseconds. Default is `400`.
|
* @property {number|undefined} duration Animation duration in milliseconds. Default is `400`.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.layer.BaseOptions
|
* @typedef {Object} olx.layer.BaseOptions
|
||||||
* @property {number|undefined} brightness Brightness. Default is `0`.
|
* @property {number|undefined} brightness Brightness. Default is `0`.
|
||||||
* @property {number|undefined} contrast Contrast. Default is `1`.
|
* @property {number|undefined} contrast Contrast. Default is `1`.
|
||||||
* @property {number|undefined} hue Hue. Default is `0`.
|
* @property {number|undefined} hue Hue. Default is `0`.
|
||||||
@@ -376,7 +376,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.layer.LayerOptions
|
* @typedef {Object} olx.layer.LayerOptions
|
||||||
* @property {number|undefined} brightness Brightness. Default is `0`.
|
* @property {number|undefined} brightness Brightness. Default is `0`.
|
||||||
* @property {number|undefined} contrast Contrast. Default is `1`.
|
* @property {number|undefined} contrast Contrast. Default is `1`.
|
||||||
* @property {number|undefined} hue Hue. Default is `0`.
|
* @property {number|undefined} hue Hue. Default is `0`.
|
||||||
@@ -392,7 +392,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.layer.GroupOptions
|
* @typedef {Object} olx.layer.GroupOptions
|
||||||
* @property {number|undefined} brightness Brightness. Default is `0`.
|
* @property {number|undefined} brightness Brightness. Default is `0`.
|
||||||
* @property {number|undefined} contrast Contrast. Default is `1`.
|
* @property {number|undefined} contrast Contrast. Default is `1`.
|
||||||
* @property {number|undefined} hue Hue. Default is `0`.
|
* @property {number|undefined} hue Hue. Default is `0`.
|
||||||
@@ -408,7 +408,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.layer.TileOptions
|
* @typedef {Object} olx.layer.TileOptions
|
||||||
* @property {number|undefined} brightness Brightness. Default is `0`.
|
* @property {number|undefined} brightness Brightness. Default is `0`.
|
||||||
* @property {number|undefined} contrast Contrast. Default is `1`.
|
* @property {number|undefined} contrast Contrast. Default is `1`.
|
||||||
* @property {number|undefined} hue Hue. Default is `0`.
|
* @property {number|undefined} hue Hue. Default is `0`.
|
||||||
@@ -425,7 +425,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.layer.VectorOptions
|
* @typedef {Object} olx.layer.VectorOptions
|
||||||
* @property {number|undefined} brightness Brightness.
|
* @property {number|undefined} brightness Brightness.
|
||||||
* @property {number|undefined} contrast Contrast.
|
* @property {number|undefined} contrast Contrast.
|
||||||
* @property {number|undefined} hue Hue.
|
* @property {number|undefined} hue Hue.
|
||||||
@@ -438,10 +438,11 @@
|
|||||||
* @property {ol.source.Vector} source Source.
|
* @property {ol.source.Vector} source Source.
|
||||||
* @property {ol.style.StyleFunction|undefined} styleFunction Style function.
|
* @property {ol.style.StyleFunction|undefined} styleFunction Style function.
|
||||||
* @property {boolean|undefined} visible Visibility. Default is `true` (visible).
|
* @property {boolean|undefined} visible Visibility. Default is `true` (visible).
|
||||||
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.parser.WFSWriteGetFeatureOptions
|
* @typedef {Object} olx.parser.WFSWriteGetFeatureOptions
|
||||||
* @property {string} featureNS The namespace URI used for features.
|
* @property {string} featureNS The namespace URI used for features.
|
||||||
* @property {string} featurePrefix The prefix for the feature namespace.
|
* @property {string} featurePrefix The prefix for the feature namespace.
|
||||||
* @property {Array.<string>} featureTypes The feature type names.
|
* @property {Array.<string>} featureTypes The feature type names.
|
||||||
@@ -454,7 +455,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.parser.WFSWriteTransactionOptions
|
* @typedef {Object} olx.parser.WFSWriteTransactionOptions
|
||||||
* @property {string} featureNS The namespace URI used for features.
|
* @property {string} featureNS The namespace URI used for features.
|
||||||
* @property {string} featurePrefix The prefix for the feature namespace.
|
* @property {string} featurePrefix The prefix for the feature namespace.
|
||||||
* @property {string} featureType The feature type name.
|
* @property {string} featureType The feature type name.
|
||||||
@@ -466,7 +467,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.source.BingMapsOptions
|
* @typedef {Object} olx.source.BingMapsOptions
|
||||||
* @property {string|undefined} culture Culture code. Default is `en-us`.
|
* @property {string|undefined} culture Culture code. Default is `en-us`.
|
||||||
* @property {string} key Bing Maps API key. Get yours at
|
* @property {string} key Bing Maps API key. Get yours at
|
||||||
* http://bingmapsportal.com/.
|
* http://bingmapsportal.com/.
|
||||||
@@ -477,7 +478,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.source.GeoJSONOptions
|
* @typedef {Object} olx.source.GeoJSONOptions
|
||||||
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
|
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
|
||||||
* @property {ol.proj.ProjectionLike} defaultProjection Default projection.
|
* @property {ol.proj.ProjectionLike} defaultProjection Default projection.
|
||||||
* @property {ol.Extent|undefined} extent Extent.
|
* @property {ol.Extent|undefined} extent Extent.
|
||||||
@@ -490,7 +491,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.source.MapGuideOptions
|
* @typedef {Object} olx.source.MapGuideOptions
|
||||||
* @property {string|undefined} url The mapagent url.
|
* @property {string|undefined} url The mapagent url.
|
||||||
* @property {number|undefined} metersPerUnit The meters-per-unit value.
|
* @property {number|undefined} metersPerUnit The meters-per-unit value.
|
||||||
* @property {ol.Extent|undefined} extent Extent..
|
* @property {ol.Extent|undefined} extent Extent..
|
||||||
@@ -506,14 +507,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.source.MapQuestOptions
|
* @typedef {Object} olx.source.MapQuestOptions
|
||||||
* @property {ol.TileLoadFunctionType|undefined} tileLoadFunction Optional
|
* @property {ol.TileLoadFunctionType|undefined} tileLoadFunction Optional
|
||||||
* function to load a tile given a URL.
|
* function to load a tile given a URL.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.source.TileDebugOptions
|
* @typedef {Object} olx.source.TileDebugOptions
|
||||||
* @property {ol.Extent|undefined} extent Extent.
|
* @property {ol.Extent|undefined} extent Extent.
|
||||||
* @property {ol.proj.ProjectionLike} projection Projection.
|
* @property {ol.proj.ProjectionLike} projection Projection.
|
||||||
* @property {ol.tilegrid.TileGrid|undefined} tileGrid Tile grid.
|
* @property {ol.tilegrid.TileGrid|undefined} tileGrid Tile grid.
|
||||||
@@ -521,7 +522,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.source.OSMOptions
|
* @typedef {Object} olx.source.OSMOptions
|
||||||
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
|
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
|
||||||
* @property {number|undefined} maxZoom Max zoom.
|
* @property {number|undefined} maxZoom Max zoom.
|
||||||
* @property {ol.TileLoadFunctionType|undefined} tileLoadFunction Optional
|
* @property {ol.TileLoadFunctionType|undefined} tileLoadFunction Optional
|
||||||
@@ -533,7 +534,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.source.ImageWMSOptions
|
* @typedef {Object} olx.source.ImageWMSOptions
|
||||||
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
|
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
|
||||||
* @property {null|string|undefined} crossOrigin crossOrigin setting for image
|
* @property {null|string|undefined} crossOrigin crossOrigin setting for image
|
||||||
* requests.
|
* requests.
|
||||||
@@ -553,7 +554,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.source.StamenOptions
|
* @typedef {Object} olx.source.StamenOptions
|
||||||
* @property {string} layer Layer.
|
* @property {string} layer Layer.
|
||||||
* @property {number|undefined} minZoom Minimum zoom.
|
* @property {number|undefined} minZoom Minimum zoom.
|
||||||
* @property {number|undefined} maxZoom Maximum zoom.
|
* @property {number|undefined} maxZoom Maximum zoom.
|
||||||
@@ -566,7 +567,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.source.ImageStaticOptions
|
* @typedef {Object} olx.source.ImageStaticOptions
|
||||||
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
|
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
|
||||||
* @property {null|string|undefined} crossOrigin crossOrigin setting for image
|
* @property {null|string|undefined} crossOrigin crossOrigin setting for image
|
||||||
* requests.
|
* requests.
|
||||||
@@ -579,7 +580,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.source.TileJSONOptions
|
* @typedef {Object} olx.source.TileJSONOptions
|
||||||
* @property {null|string|undefined} crossOrigin crossOrigin setting for image
|
* @property {null|string|undefined} crossOrigin crossOrigin setting for image
|
||||||
* requests.
|
* requests.
|
||||||
* @property {ol.TileLoadFunctionType|undefined} tileLoadFunction Optional
|
* @property {ol.TileLoadFunctionType|undefined} tileLoadFunction Optional
|
||||||
@@ -589,7 +590,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.source.TileWMSOptions
|
* @typedef {Object} olx.source.TileWMSOptions
|
||||||
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
|
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
|
||||||
* @property {Object.<string,*>} params WMS request parameters. At least a
|
* @property {Object.<string,*>} params WMS request parameters. At least a
|
||||||
* `LAYERS` param is required. `STYLES` is `` by default. `VERSION` is
|
* `LAYERS` param is required. `STYLES` is `` by default. `VERSION` is
|
||||||
@@ -598,6 +599,15 @@
|
|||||||
* @property {null|string|undefined} crossOrigin crossOrigin setting for image
|
* @property {null|string|undefined} crossOrigin crossOrigin setting for image
|
||||||
* requests.
|
* requests.
|
||||||
* @property {ol.Extent|undefined} extent Extent.
|
* @property {ol.Extent|undefined} extent Extent.
|
||||||
|
* @property {number|undefined} gutter The size in pixels of the
|
||||||
|
* gutter around image tiles to ignore. By setting this property to a
|
||||||
|
* non-zero value, images will be requested that are wider and taller than
|
||||||
|
* the tile size by a value of `2 x gutter`. Defaults to zero. Using a
|
||||||
|
* non-zero value allows artifacts of rendering at tile edges to be ignored. If
|
||||||
|
* you control the WMS service it is recommended to address "artifacts at tile
|
||||||
|
* edges" issues by properly configuring the WMS service. For example, MapServer
|
||||||
|
* has a `tile_map_edge_buffer` configuration parameter for this. See
|
||||||
|
* http://mapserver.org/output/tile_mode.html.
|
||||||
* @property {string|undefined} logo Logo.
|
* @property {string|undefined} logo Logo.
|
||||||
* @property {ol.tilegrid.TileGrid|undefined} tileGrid Tile grid.
|
* @property {ol.tilegrid.TileGrid|undefined} tileGrid Tile grid.
|
||||||
* @property {number|undefined} maxZoom Maximum zoom.
|
* @property {number|undefined} maxZoom Maximum zoom.
|
||||||
@@ -611,7 +621,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.source.VectorOptions
|
* @typedef {Object} olx.source.VectorOptions
|
||||||
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
|
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
|
||||||
* @property {ol.Extent|undefined} extent Extent.
|
* @property {ol.Extent|undefined} extent Extent.
|
||||||
* @property {Array.<ol.Feature>|undefined} features Features.
|
* @property {Array.<ol.Feature>|undefined} features Features.
|
||||||
@@ -621,7 +631,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.source.VectorFileOptions
|
* @typedef {Object} olx.source.VectorFileOptions
|
||||||
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
|
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
|
||||||
* @property {Document|undefined} doc Document.
|
* @property {Document|undefined} doc Document.
|
||||||
* @property {ol.Extent|undefined} extent Extent.
|
* @property {ol.Extent|undefined} extent Extent.
|
||||||
@@ -635,7 +645,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.source.WMTSOptions
|
* @typedef {Object} olx.source.WMTSOptions
|
||||||
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
|
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
|
||||||
* @property {string|null|undefined} crossOrigin crossOrigin setting for image
|
* @property {string|null|undefined} crossOrigin crossOrigin setting for image
|
||||||
* requests.
|
* requests.
|
||||||
@@ -660,7 +670,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.source.XYZOptions
|
* @typedef {Object} olx.source.XYZOptions
|
||||||
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
|
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
|
||||||
* @property {null|string|undefined} crossOrigin Cross origin setting for image
|
* @property {null|string|undefined} crossOrigin Cross origin setting for image
|
||||||
* requests.
|
* requests.
|
||||||
@@ -681,13 +691,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.style.FillOptions
|
* @typedef {Object} olx.style.FillOptions
|
||||||
* @property {ol.Color|string|undefined} color Color.
|
* @property {ol.Color|string|undefined} color Color.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.style.ImageOptions
|
* @typedef {Object} olx.style.ImageOptions
|
||||||
* @property {ol.Pixel} anchor Anchor.
|
* @property {ol.Pixel} anchor Anchor.
|
||||||
* @property {null|string|undefined} crossOrigin crossOrigin setting for image.
|
* @property {null|string|undefined} crossOrigin crossOrigin setting for image.
|
||||||
* @property {HTMLCanvasElement|HTMLVideoElement|Image|undefined} image Image.
|
* @property {HTMLCanvasElement|HTMLVideoElement|Image|undefined} image Image.
|
||||||
@@ -702,7 +712,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.style.StrokeOptions
|
* @typedef {Object} olx.style.StrokeOptions
|
||||||
* @property {ol.Color|string|undefined} color Color.
|
* @property {ol.Color|string|undefined} color Color.
|
||||||
* @property {string|undefined} lineCap Line cap style: `butt`, `round`, or `square`. Default is `butt`.
|
* @property {string|undefined} lineCap Line cap style: `butt`, `round`, or `square`. Default is `butt`.
|
||||||
* @property {string|undefined} lineJoin Line join style: `bevel`, `round`, or `miter`. Default is `miter`.
|
* @property {string|undefined} lineJoin Line join style: `bevel`, `round`, or `miter`. Default is `miter`.
|
||||||
@@ -713,7 +723,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.style.TextOptions
|
* @typedef {Object} olx.style.TextOptions
|
||||||
* @property {string|undefined} font Font.
|
* @property {string|undefined} font Font.
|
||||||
* @property {number|undefined} rotation Rotation.
|
* @property {number|undefined} rotation Rotation.
|
||||||
* @property {string|undefined} text Text.
|
* @property {string|undefined} text Text.
|
||||||
@@ -725,7 +735,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.style.StyleOptions
|
* @typedef {Object} olx.style.StyleOptions
|
||||||
* @property {ol.style.Fill|undefined} fill Fill style.
|
* @property {ol.style.Fill|undefined} fill Fill style.
|
||||||
* @property {ol.style.Image|undefined} image Image style.
|
* @property {ol.style.Image|undefined} image Image style.
|
||||||
* @property {ol.style.Stroke|undefined} stroke Stroke style.
|
* @property {ol.style.Stroke|undefined} stroke Stroke style.
|
||||||
@@ -735,7 +745,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.tilegrid.TileGridOptions
|
* @typedef {Object} olx.tilegrid.TileGridOptions
|
||||||
* @property {number|undefined} minZoom Minimum zoom.
|
* @property {number|undefined} minZoom Minimum zoom.
|
||||||
* @property {ol.Coordinate|undefined} origin Origin.
|
* @property {ol.Coordinate|undefined} origin Origin.
|
||||||
* @property {Array.<ol.Coordinate>|undefined} origins Origins.
|
* @property {Array.<ol.Coordinate>|undefined} origins Origins.
|
||||||
@@ -746,7 +756,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.tilegrid.WMTSOptions
|
* @typedef {Object} olx.tilegrid.WMTSOptions
|
||||||
* @property {ol.Coordinate|undefined} origin Origin.
|
* @property {ol.Coordinate|undefined} origin Origin.
|
||||||
* @property {Array.<ol.Coordinate>|undefined} origins Origins.
|
* @property {Array.<ol.Coordinate>|undefined} origins Origins.
|
||||||
* @property {!Array.<number>} resolutions Resolutions.
|
* @property {!Array.<number>} resolutions Resolutions.
|
||||||
@@ -757,7 +767,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.tilegrid.XYZOptions
|
* @typedef {Object} olx.tilegrid.XYZOptions
|
||||||
* @property {number} maxZoom Maximum zoom.
|
* @property {number} maxZoom Maximum zoom.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@exportFunction ol.animation.bounce ol.animation.BounceOptions ol.PreRenderFunction
|
@exportSymbol ol.animation.bounce ol.animation.bounce
|
||||||
@exportFunction ol.animation.pan ol.animation.PanOptions ol.PreRenderFunction
|
@exportSymbol ol.animation.pan ol.animation.pan
|
||||||
@exportFunction ol.animation.rotate ol.animation.RotateOptions ol.PreRenderFunction
|
@exportSymbol ol.animation.rotate ol.animation.rotate
|
||||||
@exportFunction ol.animation.zoom ol.animation.ZoomOptions ol.PreRenderFunction
|
@exportSymbol ol.animation.zoom ol.animation.zoom
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ goog.require('ol.easing');
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.animation.BounceOptions} options Bounce options.
|
* @param {olx.animation.BounceOptions} options Bounce options.
|
||||||
* @return {ol.PreRenderFunction} Pre-render function.
|
* @return {ol.PreRenderFunction} Pre-render function.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
@@ -43,7 +43,7 @@ ol.animation.bounce = function(options) {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.animation.PanOptions} options Pan options.
|
* @param {olx.animation.PanOptions} options Pan options.
|
||||||
* @return {ol.PreRenderFunction} Pre-render function.
|
* @return {ol.PreRenderFunction} Pre-render function.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
@@ -82,7 +82,7 @@ ol.animation.pan = function(options) {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.animation.RotateOptions} options Rotate options.
|
* @param {olx.animation.RotateOptions} options Rotate options.
|
||||||
* @return {ol.PreRenderFunction} Pre-render function.
|
* @return {ol.PreRenderFunction} Pre-render function.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
@@ -119,7 +119,7 @@ ol.animation.rotate = function(options) {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.animation.ZoomOptions} options Zoom options.
|
* @param {olx.animation.ZoomOptions} options Zoom options.
|
||||||
* @return {ol.PreRenderFunction} Pre-render function.
|
* @return {ol.PreRenderFunction} Pre-render function.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
@exportClass ol.Attribution ol.AttributionOptions
|
@exportSymbol ol.Attribution
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ goog.require('ol.TileRange');
|
|||||||
* ..
|
* ..
|
||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param {ol.AttributionOptions} options Attribution options.
|
* @param {olx.AttributionOptions} options Attribution options.
|
||||||
* @struct
|
* @struct
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
@exportClass ol.control.Attribution ol.control.AttributionOptions
|
@exportSymbol ol.control.Attribution
|
||||||
@exportProperty ol.control.Attribution.prototype.setMap
|
@exportProperty ol.control.Attribution.prototype.setMap
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ goog.require('ol.css');
|
|||||||
* be changed by using a css selector for `.ol-attribution`.
|
* be changed by using a css selector for `.ol-attribution`.
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.control.Control}
|
* @extends {ol.control.Control}
|
||||||
* @param {ol.control.AttributionOptions=} opt_options Attribution options.
|
* @param {olx.control.AttributionOptions=} opt_options Attribution options.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
ol.control.Attribution = function(opt_options) {
|
ol.control.Attribution = function(opt_options) {
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
@exportClass ol.control.Control ol.control.ControlOptions
|
@exportSymbol ol.control.Control
|
||||||
@exportProperty ol.control.Control.prototype.getMap
|
@exportProperty ol.control.Control.prototype.getMap
|
||||||
@exportProperty ol.control.Control.prototype.setMap
|
@exportProperty ol.control.Control.prototype.setMap
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ goog.require('ol.Object');
|
|||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.Object}
|
* @extends {ol.Object}
|
||||||
* @implements {oli.control.Control}
|
* @implements {oli.control.Control}
|
||||||
* @param {ol.control.ControlOptions} options Control options.
|
* @param {olx.control.ControlOptions} options Control options.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
ol.control.Control = function(options) {
|
ol.control.Control = function(options) {
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
@exportFunction ol.control.defaults ol.control.DefaultsOptions ol.Collection
|
@exportSymbol ol.control.defaults ol.control.defaults
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ goog.require('ol.control.Zoom');
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.control.DefaultsOptions=} opt_options Defaults options.
|
* @param {olx.control.DefaultsOptions=} opt_options Defaults options.
|
||||||
* @return {ol.Collection} Controls.
|
* @return {ol.Collection} Controls.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
@exportClass ol.control.FullScreen ol.control.FullScreenOptions
|
@exportSymbol ol.control.FullScreen
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ goog.require('ol.css');
|
|||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.control.Control}
|
* @extends {ol.control.Control}
|
||||||
* @param {ol.control.FullScreenOptions=} opt_options Options.
|
* @param {olx.control.FullScreenOptions=} opt_options Options.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
ol.control.FullScreen = function(opt_options) {
|
ol.control.FullScreen = function(opt_options) {
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
@exportClass ol.control.Logo ol.control.LogoOptions
|
@exportSymbol ol.control.Logo
|
||||||
@exportProperty ol.control.Logo.prototype.setMap
|
@exportProperty ol.control.Logo.prototype.setMap
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ goog.require('ol.css');
|
|||||||
* be styled by using a css selector for `.ol-logo`.
|
* be styled by using a css selector for `.ol-logo`.
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.control.Control}
|
* @extends {ol.control.Control}
|
||||||
* @param {ol.control.LogoOptions=} opt_options Logo options.
|
* @param {olx.control.LogoOptions=} opt_options Logo options.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
ol.control.Logo = function(opt_options) {
|
ol.control.Logo = function(opt_options) {
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
@exportClass ol.control.MousePosition ol.control.MousePositionOptions
|
@exportSymbol ol.control.MousePosition
|
||||||
@exportProperty ol.control.MousePosition.prototype.setMap
|
@exportProperty ol.control.MousePosition.prototype.setMap
|
||||||
|
|||||||
@@ -36,7 +36,8 @@ ol.control.MousePositionProperty = {
|
|||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.control.Control}
|
* @extends {ol.control.Control}
|
||||||
* @param {ol.control.MousePositionOptions=} opt_options Mouse position options.
|
* @param {olx.control.MousePositionOptions=} opt_options Mouse position
|
||||||
|
* options.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
* @todo observable projection {ol.proj.Projection} the projection to report
|
* @todo observable projection {ol.proj.Projection} the projection to report
|
||||||
* mouse position in
|
* mouse position in
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@exportClass ol.control.ScaleLine ol.control.ScaleLineOptions
|
@exportSymbol ol.control.ScaleLine
|
||||||
@exportProperty ol.control.ScaleLine.prototype.setMap
|
@exportProperty ol.control.ScaleLine.prototype.setMap
|
||||||
|
|
||||||
@exportSymbol ol.control.ScaleLineUnits
|
@exportSymbol ol.control.ScaleLineUnits
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ ol.control.ScaleLineUnits = {
|
|||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.control.Control}
|
* @extends {ol.control.Control}
|
||||||
* @param {ol.control.ScaleLineOptions=} opt_options Scale line options.
|
* @param {olx.control.ScaleLineOptions=} opt_options Scale line options.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
* @todo observable units {ol.control.ScaleLineUnits} the units to use in the
|
* @todo observable units {ol.control.ScaleLineUnits} the units to use in the
|
||||||
* scale line
|
* scale line
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
@exportClass ol.control.Zoom ol.control.ZoomOptions
|
@exportSymbol ol.control.Zoom
|
||||||
@exportProperty ol.control.Zoom.prototype.setMap
|
@exportProperty ol.control.Zoom.prototype.setMap
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ goog.require('ol.easing');
|
|||||||
* use css selectors `.ol-zoom-in` and `.ol-zoom-out`.
|
* use css selectors `.ol-zoom-in` and `.ol-zoom-out`.
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.control.Control}
|
* @extends {ol.control.Control}
|
||||||
* @param {ol.control.ZoomOptions=} opt_options Zoom options.
|
* @param {olx.control.ZoomOptions=} opt_options Zoom options.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
ol.control.Zoom = function(opt_options) {
|
ol.control.Zoom = function(opt_options) {
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
@exportClass ol.control.ZoomSlider ol.control.ZoomSliderOptions
|
@exportSymbol ol.control.ZoomSlider
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ ol.control.ZOOMSLIDER_ANIMATION_DURATION = 200;
|
|||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.control.Control}
|
* @extends {ol.control.Control}
|
||||||
* @param {ol.control.ZoomSliderOptions=} opt_options Zoom slider options.
|
* @param {olx.control.ZoomSliderOptions=} opt_options Zoom slider options.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
ol.control.ZoomSlider = function(opt_options) {
|
ol.control.ZoomSlider = function(opt_options) {
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
@exportClass ol.control.ZoomToExtent ol.control.ZoomToExtentOptions
|
@exportSymbol ol.control.ZoomToExtent
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ goog.require('ol.css');
|
|||||||
* css selector `.ol-zoom-extent`.
|
* css selector `.ol-zoom-extent`.
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.control.Control}
|
* @extends {ol.control.Control}
|
||||||
* @param {ol.control.ZoomToExtentOptions=} opt_options Options.
|
* @param {olx.control.ZoomToExtentOptions=} opt_options Options.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
ol.control.ZoomToExtent = function(opt_options) {
|
ol.control.ZoomToExtent = function(opt_options) {
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
@exportClass ol.DeviceOrientation ol.DeviceOrientationOptions
|
@exportSymbol ol.DeviceOrientation
|
||||||
@exportSymbol ol.DeviceOrientation.SUPPORTED ol.DeviceOrientation.SUPPORTED
|
@exportSymbol ol.DeviceOrientation.SUPPORTED ol.DeviceOrientation.SUPPORTED
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ ol.DeviceOrientationProperty = {
|
|||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.Object}
|
* @extends {ol.Object}
|
||||||
* @param {ol.DeviceOrientationOptions=} opt_options Options.
|
* @param {olx.DeviceOrientationOptions=} opt_options Options.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
* @todo observable alpha {number} readonly the euler angle in radians of the
|
* @todo observable alpha {number} readonly the euler angle in radians of the
|
||||||
* device from the standard X axis
|
* device from the standard X axis
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
@exportClass ol.format.GeoJSON ol.format.GeoJSONOptions
|
@exportSymbol ol.format.GeoJSON
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ goog.require('ol.proj');
|
|||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.format.JSON}
|
* @extends {ol.format.JSON}
|
||||||
* @param {ol.format.GeoJSONOptions=} opt_options Options.
|
* @param {olx.format.GeoJSONOptions=} opt_options Options.
|
||||||
*/
|
*/
|
||||||
ol.format.GeoJSON = function(opt_options) {
|
ol.format.GeoJSON = function(opt_options) {
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
@exportClass ol.Geolocation ol.GeolocationOptions
|
@exportSymbol ol.Geolocation
|
||||||
@exportSymbol ol.Geolocation.SUPPORTED ol.Geolocation.SUPPORTED
|
@exportSymbol ol.Geolocation.SUPPORTED ol.Geolocation.SUPPORTED
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ ol.GeolocationProperty = {
|
|||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.Object}
|
* @extends {ol.Object}
|
||||||
* @param {ol.GeolocationOptions=} opt_options Options.
|
* @param {olx.GeolocationOptions=} opt_options Options.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
* @todo observable accuracy {number} readonly the accuracy of the position
|
* @todo observable accuracy {number} readonly the accuracy of the position
|
||||||
* measurement
|
* measurement
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
@exportClass ol.interaction.DoubleClickZoom ol.interaction.DoubleClickZoomOptions
|
@exportSymbol ol.interaction.DoubleClickZoom
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ goog.require('ol.interaction.Interaction');
|
|||||||
*
|
*
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.interaction.Interaction}
|
* @extends {ol.interaction.Interaction}
|
||||||
* @param {ol.interaction.DoubleClickZoomOptions=} opt_options Options.
|
* @param {olx.interaction.DoubleClickZoomOptions=} opt_options Options.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
ol.interaction.DoubleClickZoom = function(opt_options) {
|
ol.interaction.DoubleClickZoom = function(opt_options) {
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
@exportClass ol.interaction.DragPan ol.interaction.DragPanOptions
|
@exportSymbol ol.interaction.DragPan
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ goog.require('ol.interaction.Drag');
|
|||||||
* Allows the user to pan the map by clickng and dragging.
|
* Allows the user to pan the map by clickng and dragging.
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.interaction.Drag}
|
* @extends {ol.interaction.Drag}
|
||||||
* @param {ol.interaction.DragPanOptions=} opt_options Options.
|
* @param {olx.interaction.DragPanOptions=} opt_options Options.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
ol.interaction.DragPan = function(opt_options) {
|
ol.interaction.DragPan = function(opt_options) {
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
@exportClass ol.interaction.DragRotate ol.interaction.DragRotateOptions
|
@exportSymbol ol.interaction.DragRotate
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
@exportClass ol.interaction.DragRotateAndZoom ol.interaction.DragRotateAndZoomOptions
|
@exportSymbol ol.interaction.DragRotateAndZoom
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ ol.interaction.DRAGROTATEANDZOOM_ANIMATION_DURATION = 400;
|
|||||||
* This interaction is not included in the default interactions.
|
* This interaction is not included in the default interactions.
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.interaction.Drag}
|
* @extends {ol.interaction.Drag}
|
||||||
* @param {ol.interaction.DragRotateAndZoomOptions=} opt_options Options.
|
* @param {olx.interaction.DragRotateAndZoomOptions=} opt_options Options.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
ol.interaction.DragRotateAndZoom = function(opt_options) {
|
ol.interaction.DragRotateAndZoom = function(opt_options) {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ ol.interaction.DRAGROTATE_ANIMATION_DURATION = 250;
|
|||||||
* it to when the alt and shift keys are held down.
|
* it to when the alt and shift keys are held down.
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.interaction.Drag}
|
* @extends {ol.interaction.Drag}
|
||||||
* @param {ol.interaction.DragRotateOptions=} opt_options Options.
|
* @param {olx.interaction.DragRotateOptions=} opt_options Options.
|
||||||
*/
|
*/
|
||||||
ol.interaction.DragRotate = function(opt_options) {
|
ol.interaction.DragRotate = function(opt_options) {
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
@exportClass ol.interaction.DragZoom ol.interaction.DragZoomOptions
|
@exportSymbol ol.interaction.DragZoom
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ ol.SHIFT_DRAG_ZOOM_HYSTERESIS_PIXELS_SQUARED =
|
|||||||
* it to when the shift key is held down.
|
* it to when the shift key is held down.
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.interaction.Drag}
|
* @extends {ol.interaction.Drag}
|
||||||
* @param {ol.interaction.DragZoomOptions=} opt_options Options.
|
* @param {olx.interaction.DragZoomOptions=} opt_options Options.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
ol.interaction.DragZoom = function(opt_options) {
|
ol.interaction.DragZoom = function(opt_options) {
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
@exportFunction ol.interaction.defaults ol.interaction.DefaultsOptions ol.Collection
|
@exportSymbol ol.interaction.defaults ol.interaction.defaults
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ goog.require('ol.interaction.TouchZoom');
|
|||||||
* {@link ol.interaction} instances and insert them into an
|
* {@link ol.interaction} instances and insert them into an
|
||||||
* {@link ol.Collection} in the order you want before creating your ol.Map
|
* {@link ol.Collection} in the order you want before creating your ol.Map
|
||||||
* instance.
|
* instance.
|
||||||
* @param {ol.interaction.DefaultsOptions=} opt_options Defaults options.
|
* @param {olx.interaction.DefaultsOptions=} opt_options Defaults options.
|
||||||
* @return {ol.Collection} A collection of interactions to be used with
|
* @return {ol.Collection} A collection of interactions to be used with
|
||||||
* the ol.Map constructor's interactions option.
|
* the ol.Map constructor's interactions option.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
@exportClass ol.interaction.KeyboardPan ol.interaction.KeyboardPanOptions
|
@exportSymbol ol.interaction.KeyboardPan
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ ol.interaction.KEYBOARD_PAN_DURATION = 100;
|
|||||||
* Allows the user to pan the map using keyboard arrows.
|
* Allows the user to pan the map using keyboard arrows.
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.interaction.Interaction}
|
* @extends {ol.interaction.Interaction}
|
||||||
* @param {ol.interaction.KeyboardPanOptions=} opt_options Options.
|
* @param {olx.interaction.KeyboardPanOptions=} opt_options Options.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
ol.interaction.KeyboardPan = function(opt_options) {
|
ol.interaction.KeyboardPan = function(opt_options) {
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
@exportClass ol.interaction.KeyboardZoom ol.interaction.KeyboardZoomOptions
|
@exportSymbol ol.interaction.KeyboardZoom
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ goog.require('ol.interaction.Interaction');
|
|||||||
/**
|
/**
|
||||||
* Allows the user to zoom the map using keyboard + and -.
|
* Allows the user to zoom the map using keyboard + and -.
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param {ol.interaction.KeyboardZoomOptions=} opt_options Options.
|
* @param {olx.interaction.KeyboardZoomOptions=} opt_options Options.
|
||||||
* @extends {ol.interaction.Interaction}
|
* @extends {ol.interaction.Interaction}
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ ol.interaction.MOUSEWHEELZOOM_TIMEOUT_DURATION = 80;
|
|||||||
* Allows the user to zoom the map by scrolling the mouse wheel.
|
* Allows the user to zoom the map by scrolling the mouse wheel.
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.interaction.Interaction}
|
* @extends {ol.interaction.Interaction}
|
||||||
* @param {ol.interaction.MouseWheelZoomOptions=} opt_options Options.
|
* @param {olx.interaction.MouseWheelZoomOptions=} opt_options Options.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
ol.interaction.MouseWheelZoom = function(opt_options) {
|
ol.interaction.MouseWheelZoom = function(opt_options) {
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
@exportClass ol.interaction.TouchPan ol.interaction.TouchPanOptions
|
@exportSymbol ol.interaction.TouchPan
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ goog.require('ol.interaction.Touch');
|
|||||||
* on a touch screen.
|
* on a touch screen.
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.interaction.Touch}
|
* @extends {ol.interaction.Touch}
|
||||||
* @param {ol.interaction.TouchPanOptions=} opt_options Options.
|
* @param {olx.interaction.TouchPanOptions=} opt_options Options.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
ol.interaction.TouchPan = function(opt_options) {
|
ol.interaction.TouchPan = function(opt_options) {
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
@exportClass ol.interaction.TouchRotate ol.interaction.TouchRotateOptions
|
@exportSymbol ol.interaction.TouchRotate
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ ol.interaction.TOUCHROTATE_ANIMATION_DURATION = 250;
|
|||||||
* on a touch screen.
|
* on a touch screen.
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.interaction.Touch}
|
* @extends {ol.interaction.Touch}
|
||||||
* @param {ol.interaction.TouchRotateOptions=} opt_options Options.
|
* @param {olx.interaction.TouchRotateOptions=} opt_options Options.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
ol.interaction.TouchRotate = function(opt_options) {
|
ol.interaction.TouchRotate = function(opt_options) {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ goog.require('ol.interaction.Touch');
|
|||||||
* on a touch screen.
|
* on a touch screen.
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.interaction.Touch}
|
* @extends {ol.interaction.Touch}
|
||||||
* @param {ol.interaction.TouchZoomOptions=} opt_options Options.
|
* @param {olx.interaction.TouchZoomOptions=} opt_options Options.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
ol.interaction.TouchZoom = function(opt_options) {
|
ol.interaction.TouchZoom = function(opt_options) {
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
@exportClass ol.layer.Image ol.layer.LayerOptions
|
@exportSymbol ol.layer.Image
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ goog.require('ol.source.Image');
|
|||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.layer.Layer}
|
* @extends {ol.layer.Layer}
|
||||||
* @param {ol.layer.LayerOptions} options Layer options.
|
* @param {olx.layer.LayerOptions} options Layer options.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
*/
|
*/
|
||||||
ol.layer.Image = function(options) {
|
ol.layer.Image = function(options) {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ goog.require('ol.source.Source');
|
|||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.layer.Base}
|
* @extends {ol.layer.Base}
|
||||||
* @param {ol.layer.LayerOptions} options Layer options.
|
* @param {olx.layer.LayerOptions} options Layer options.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
* @todo observable brightness {number} the brightness of the layer
|
* @todo observable brightness {number} the brightness of the layer
|
||||||
* @todo observable contrast {number} the contrast of the layer
|
* @todo observable contrast {number} the contrast of the layer
|
||||||
@@ -25,7 +25,7 @@ goog.require('ol.source.Source');
|
|||||||
*/
|
*/
|
||||||
ol.layer.Layer = function(options) {
|
ol.layer.Layer = function(options) {
|
||||||
|
|
||||||
var baseOptions = /** @type {ol.layer.LayerOptions} */
|
var baseOptions = /** @type {olx.layer.LayerOptions} */
|
||||||
(goog.object.clone(options));
|
(goog.object.clone(options));
|
||||||
delete baseOptions.source;
|
delete baseOptions.source;
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ ol.layer.LayerState;
|
|||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.Object}
|
* @extends {ol.Object}
|
||||||
* @param {ol.layer.BaseOptions} options Layer options.
|
* @param {olx.layer.BaseOptions} options Layer options.
|
||||||
*/
|
*/
|
||||||
ol.layer.Base = function(options) {
|
ol.layer.Base = function(options) {
|
||||||
|
|
||||||
@@ -71,22 +71,6 @@ ol.layer.Base = function(options) {
|
|||||||
values.minResolution : 0;
|
values.minResolution : 0;
|
||||||
|
|
||||||
this.setValues(values);
|
this.setValues(values);
|
||||||
|
|
||||||
goog.events.listen(this, [
|
|
||||||
ol.Object.getChangeEventType(ol.layer.LayerProperty.BRIGHTNESS),
|
|
||||||
ol.Object.getChangeEventType(ol.layer.LayerProperty.CONTRAST),
|
|
||||||
ol.Object.getChangeEventType(ol.layer.LayerProperty.HUE),
|
|
||||||
ol.Object.getChangeEventType(ol.layer.LayerProperty.OPACITY),
|
|
||||||
ol.Object.getChangeEventType(ol.layer.LayerProperty.SATURATION),
|
|
||||||
ol.Object.getChangeEventType(ol.layer.LayerProperty.MAX_RESOLUTION),
|
|
||||||
ol.Object.getChangeEventType(ol.layer.LayerProperty.MIN_RESOLUTION)
|
|
||||||
],
|
|
||||||
this.handleLayerChange, false, this);
|
|
||||||
|
|
||||||
goog.events.listen(this,
|
|
||||||
ol.Object.getChangeEventType(ol.layer.LayerProperty.VISIBLE),
|
|
||||||
this.handleLayerVisibleChange, false, this);
|
|
||||||
|
|
||||||
};
|
};
|
||||||
goog.inherits(ol.layer.Base, ol.Object);
|
goog.inherits(ol.layer.Base, ol.Object);
|
||||||
|
|
||||||
@@ -251,26 +235,6 @@ goog.exportProperty(
|
|||||||
ol.layer.Base.prototype.getVisible);
|
ol.layer.Base.prototype.getVisible);
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @protected
|
|
||||||
*/
|
|
||||||
ol.layer.Base.prototype.handleLayerChange = function() {
|
|
||||||
if (this.getVisible() && this.getSourceState() == ol.source.State.READY) {
|
|
||||||
this.dispatchChangeEvent();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @protected
|
|
||||||
*/
|
|
||||||
ol.layer.Base.prototype.handleLayerVisibleChange = function() {
|
|
||||||
if (this.getSourceState() == ol.source.State.READY) {
|
|
||||||
this.dispatchChangeEvent();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adjust the layer brightness. A value of -1 will render the layer completely
|
* Adjust the layer brightness. A value of -1 will render the layer completely
|
||||||
* black. A value of 0 will leave the brightness unchanged. A value of 1 will
|
* black. A value of 0 will leave the brightness unchanged. A value of 1 will
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
@exportClass ol.layer.Group ol.layer.GroupOptions
|
@exportSymbol ol.layer.Group
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ ol.layer.GroupProperty = {
|
|||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.layer.Base}
|
* @extends {ol.layer.Base}
|
||||||
* @param {ol.layer.GroupOptions=} opt_options Layer options.
|
* @param {olx.layer.GroupOptions=} opt_options Layer options.
|
||||||
* @todo stability experimental
|
* @todo stability experimental
|
||||||
* @todo observable layers {ol.Collection} collection of layers that are part
|
* @todo observable layers {ol.Collection} collection of layers that are part
|
||||||
* of this group
|
* of this group
|
||||||
@@ -34,7 +34,7 @@ ol.layer.GroupProperty = {
|
|||||||
ol.layer.Group = function(opt_options) {
|
ol.layer.Group = function(opt_options) {
|
||||||
|
|
||||||
var options = goog.isDef(opt_options) ? opt_options : {};
|
var options = goog.isDef(opt_options) ? opt_options : {};
|
||||||
var baseOptions = /** @type {ol.layer.GroupOptions} */
|
var baseOptions = /** @type {olx.layer.GroupOptions} */
|
||||||
(goog.object.clone(options));
|
(goog.object.clone(options));
|
||||||
delete baseOptions.layers;
|
delete baseOptions.layers;
|
||||||
|
|
||||||
@@ -70,23 +70,15 @@ goog.inherits(ol.layer.Group, ol.layer.Base);
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.layer.Group.prototype.handleLayerChange = function() {
|
ol.layer.Group.prototype.handleLayerChange_ = function() {
|
||||||
if (this.getVisible()) {
|
if (this.getVisible()) {
|
||||||
this.dispatchChangeEvent();
|
this.dispatchChangeEvent();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @inheritDoc
|
|
||||||
*/
|
|
||||||
ol.layer.Group.prototype.handleLayerVisibleChange = function() {
|
|
||||||
this.dispatchChangeEvent();
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {goog.events.Event} event Event.
|
* @param {goog.events.Event} event Event.
|
||||||
* @private
|
* @private
|
||||||
@@ -113,7 +105,7 @@ ol.layer.Group.prototype.handleLayersChanged_ = function(event) {
|
|||||||
layer = layersArray[i];
|
layer = layersArray[i];
|
||||||
this.listenerKeys_[goog.getUid(layer).toString()] =
|
this.listenerKeys_[goog.getUid(layer).toString()] =
|
||||||
goog.events.listen(layer, goog.events.EventType.CHANGE,
|
goog.events.listen(layer, goog.events.EventType.CHANGE,
|
||||||
this.handleLayerChange, false, this);
|
this.handleLayerChange_, false, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,7 +120,7 @@ ol.layer.Group.prototype.handleLayersChanged_ = function(event) {
|
|||||||
ol.layer.Group.prototype.handleLayersAdd_ = function(collectionEvent) {
|
ol.layer.Group.prototype.handleLayersAdd_ = function(collectionEvent) {
|
||||||
var layer = /** @type {ol.layer.Base} */ (collectionEvent.getElement());
|
var layer = /** @type {ol.layer.Base} */ (collectionEvent.getElement());
|
||||||
this.listenerKeys_[goog.getUid(layer).toString()] = goog.events.listen(
|
this.listenerKeys_[goog.getUid(layer).toString()] = goog.events.listen(
|
||||||
layer, goog.events.EventType.CHANGE, this.handleLayerChange, false,
|
layer, goog.events.EventType.CHANGE, this.handleLayerChange_, false,
|
||||||
this);
|
this);
|
||||||
this.dispatchChangeEvent();
|
this.dispatchChangeEvent();
|
||||||
};
|
};
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user