Prefer single line assignment to 80 character limit
This commit is contained in:
2
Makefile
2
Makefile
@@ -235,7 +235,7 @@ build/timestamps/gjslint-timestamp: $(SRC_JS) $(SPEC_JS) $(SPEC_RENDERING_JS) \
|
|||||||
$(EXAMPLES_JS)
|
$(EXAMPLES_JS)
|
||||||
@mkdir -p $(@D)
|
@mkdir -p $(@D)
|
||||||
@echo "Running gjslint..."
|
@echo "Running gjslint..."
|
||||||
@gjslint --jslint_error=all --custom_jsdoc_tags=event,fires,function,classdesc,api,observable --strict $?
|
@gjslint --jslint_error=all --disable 0110 --custom_jsdoc_tags=event,fires,function,classdesc,api,observable --strict $?
|
||||||
@touch $@
|
@touch $@
|
||||||
|
|
||||||
$(BUILD_HOSTED_EXAMPLES_JS): $(BUILD_HOSTED)/examples/%.js: build/examples/%.js
|
$(BUILD_HOSTED_EXAMPLES_JS): $(BUILD_HOSTED)/examples/%.js: build/examples/%.js
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
"install": "node tasks/install.js",
|
"install": "node tasks/install.js",
|
||||||
"postinstall": "closure-util update",
|
"postinstall": "closure-util update",
|
||||||
"start": "node tasks/serve.js",
|
"start": "node tasks/serve.js",
|
||||||
"pretest": "eslint tasks test",
|
"pretest": "eslint tasks test src",
|
||||||
"test": "node tasks/test.js",
|
"test": "node tasks/test.js",
|
||||||
"debug-server": "node tasks/serve-lib.js"
|
"debug-server": "node tasks/serve-lib.js"
|
||||||
},
|
},
|
||||||
@@ -84,8 +84,7 @@
|
|||||||
},
|
},
|
||||||
"rules": {
|
"rules": {
|
||||||
"no-constant-condition": 0,
|
"no-constant-condition": 0,
|
||||||
"no-multiple-empty-lines": [2, {"max": 3, "maxEOF": 1}],
|
"no-multiple-empty-lines": [2, {"max": 3, "maxEOF": 1}]
|
||||||
"indent": 0
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ext": [
|
"ext": [
|
||||||
|
|||||||
@@ -59,8 +59,7 @@ ol.Attribution.prototype.getHTML = function() {
|
|||||||
* @param {!ol.proj.Projection} projection Projection.
|
* @param {!ol.proj.Projection} projection Projection.
|
||||||
* @return {boolean} Intersects any tile range.
|
* @return {boolean} Intersects any tile range.
|
||||||
*/
|
*/
|
||||||
ol.Attribution.prototype.intersectsAnyTileRange =
|
ol.Attribution.prototype.intersectsAnyTileRange = function(tileRanges, tileGrid, projection) {
|
||||||
function(tileRanges, tileGrid, projection) {
|
|
||||||
if (!this.tileRanges_) {
|
if (!this.tileRanges_) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,8 +14,7 @@ goog.require('ol.RotationConstraintType');
|
|||||||
* @param {ol.RotationConstraintType} rotationConstraint
|
* @param {ol.RotationConstraintType} rotationConstraint
|
||||||
* Rotation constraint.
|
* Rotation constraint.
|
||||||
*/
|
*/
|
||||||
ol.Constraints =
|
ol.Constraints = function(centerConstraint, resolutionConstraint, rotationConstraint) {
|
||||||
function(centerConstraint, resolutionConstraint, rotationConstraint) {
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {ol.CenterConstraintType}
|
* @type {ol.CenterConstraintType}
|
||||||
|
|||||||
@@ -301,8 +301,7 @@ ol.extent.createOrUpdateFromCoordinates = function(coordinates, opt_extent) {
|
|||||||
* @param {ol.Extent=} opt_extent Extent.
|
* @param {ol.Extent=} opt_extent Extent.
|
||||||
* @return {ol.Extent} Extent.
|
* @return {ol.Extent} Extent.
|
||||||
*/
|
*/
|
||||||
ol.extent.createOrUpdateFromFlatCoordinates =
|
ol.extent.createOrUpdateFromFlatCoordinates = function(flatCoordinates, offset, end, stride, opt_extent) {
|
||||||
function(flatCoordinates, offset, end, stride, opt_extent) {
|
|
||||||
var extent = ol.extent.createOrUpdateEmpty(opt_extent);
|
var extent = ol.extent.createOrUpdateEmpty(opt_extent);
|
||||||
return ol.extent.extendFlatCoordinates(
|
return ol.extent.extendFlatCoordinates(
|
||||||
extent, flatCoordinates, offset, end, stride);
|
extent, flatCoordinates, offset, end, stride);
|
||||||
@@ -411,8 +410,7 @@ ol.extent.extendCoordinates = function(extent, coordinates) {
|
|||||||
* @param {number} stride Stride.
|
* @param {number} stride Stride.
|
||||||
* @return {ol.Extent} Extent.
|
* @return {ol.Extent} Extent.
|
||||||
*/
|
*/
|
||||||
ol.extent.extendFlatCoordinates =
|
ol.extent.extendFlatCoordinates = function(extent, flatCoordinates, offset, end, stride) {
|
||||||
function(extent, flatCoordinates, offset, end, stride) {
|
|
||||||
for (; offset < end; offset += stride) {
|
for (; offset < end; offset += stride) {
|
||||||
ol.extent.extendXY(
|
ol.extent.extendXY(
|
||||||
extent, flatCoordinates[offset], flatCoordinates[offset + 1]);
|
extent, flatCoordinates[offset], flatCoordinates[offset + 1]);
|
||||||
@@ -572,8 +570,7 @@ ol.extent.getEnlargedArea = function(extent1, extent2) {
|
|||||||
* @param {ol.Extent=} opt_extent Destination extent.
|
* @param {ol.Extent=} opt_extent Destination extent.
|
||||||
* @return {ol.Extent} Extent.
|
* @return {ol.Extent} Extent.
|
||||||
*/
|
*/
|
||||||
ol.extent.getForViewAndSize =
|
ol.extent.getForViewAndSize = function(center, resolution, rotation, size, opt_extent) {
|
||||||
function(center, resolution, rotation, size, opt_extent) {
|
|
||||||
var dx = resolution * size[0] / 2;
|
var dx = resolution * size[0] / 2;
|
||||||
var dy = resolution * size[1] / 2;
|
var dy = resolution * size[1] / 2;
|
||||||
var cosRotation = Math.cos(rotation);
|
var cosRotation = Math.cos(rotation);
|
||||||
|
|||||||
@@ -353,8 +353,7 @@ ol.format.EsriJSON.writePolygonGeometry_ = function(geometry, opt_options) {
|
|||||||
* @private
|
* @private
|
||||||
* @return {EsriJSONPolyline} EsriJSON geometry.
|
* @return {EsriJSONPolyline} EsriJSON geometry.
|
||||||
*/
|
*/
|
||||||
ol.format.EsriJSON.writeMultiLineStringGeometry_ =
|
ol.format.EsriJSON.writeMultiLineStringGeometry_ = function(geometry, opt_options) {
|
||||||
function(geometry, opt_options) {
|
|
||||||
goog.asserts.assertInstanceof(geometry, ol.geom.MultiLineString,
|
goog.asserts.assertInstanceof(geometry, ol.geom.MultiLineString,
|
||||||
'geometry should be an ol.geom.MultiLineString');
|
'geometry should be an ol.geom.MultiLineString');
|
||||||
var hasZM = ol.format.EsriJSON.getHasZM_(geometry);
|
var hasZM = ol.format.EsriJSON.getHasZM_(geometry);
|
||||||
@@ -688,8 +687,7 @@ ol.format.EsriJSON.prototype.writeFeatures;
|
|||||||
* @return {Object} EsriJSON Object.
|
* @return {Object} EsriJSON Object.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.format.EsriJSON.prototype.writeFeaturesObject =
|
ol.format.EsriJSON.prototype.writeFeaturesObject = function(features, opt_options) {
|
||||||
function(features, opt_options) {
|
|
||||||
opt_options = this.adaptOptions(opt_options);
|
opt_options = this.adaptOptions(opt_options);
|
||||||
var objects = [];
|
var objects = [];
|
||||||
var i, ii;
|
var i, ii;
|
||||||
|
|||||||
@@ -243,8 +243,7 @@ ol.format.GeoJSON.writeLineStringGeometry_ = function(geometry, opt_options) {
|
|||||||
* @private
|
* @private
|
||||||
* @return {GeoJSONGeometry} GeoJSON geometry.
|
* @return {GeoJSONGeometry} GeoJSON geometry.
|
||||||
*/
|
*/
|
||||||
ol.format.GeoJSON.writeMultiLineStringGeometry_ =
|
ol.format.GeoJSON.writeMultiLineStringGeometry_ = function(geometry, opt_options) {
|
||||||
function(geometry, opt_options) {
|
|
||||||
goog.asserts.assertInstanceof(geometry, ol.geom.MultiLineString,
|
goog.asserts.assertInstanceof(geometry, ol.geom.MultiLineString,
|
||||||
'geometry should be an ol.geom.MultiLineString');
|
'geometry should be an ol.geom.MultiLineString');
|
||||||
return /** @type {GeoJSONGeometry} */ ({
|
return /** @type {GeoJSONGeometry} */ ({
|
||||||
@@ -572,8 +571,7 @@ ol.format.GeoJSON.prototype.writeFeatures;
|
|||||||
* @return {GeoJSONFeatureCollection} GeoJSON Object.
|
* @return {GeoJSONFeatureCollection} GeoJSON Object.
|
||||||
* @api stable
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.format.GeoJSON.prototype.writeFeaturesObject =
|
ol.format.GeoJSON.prototype.writeFeaturesObject = function(features, opt_options) {
|
||||||
function(features, opt_options) {
|
|
||||||
opt_options = this.adaptOptions(opt_options);
|
opt_options = this.adaptOptions(opt_options);
|
||||||
var objects = [];
|
var objects = [];
|
||||||
var i, ii;
|
var i, ii;
|
||||||
|
|||||||
@@ -120,8 +120,7 @@ ol.format.GML2.prototype.readBox_ = function(node, objectStack) {
|
|||||||
* @param {Array.<*>} objectStack Object stack.
|
* @param {Array.<*>} objectStack Object stack.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.format.GML2.prototype.innerBoundaryIsParser_ =
|
ol.format.GML2.prototype.innerBoundaryIsParser_ = function(node, objectStack) {
|
||||||
function(node, objectStack) {
|
|
||||||
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
|
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
|
||||||
'node.nodeType should be ELEMENT');
|
'node.nodeType should be ELEMENT');
|
||||||
goog.asserts.assert(node.localName == 'innerBoundaryIs',
|
goog.asserts.assert(node.localName == 'innerBoundaryIs',
|
||||||
@@ -146,8 +145,7 @@ ol.format.GML2.prototype.innerBoundaryIsParser_ =
|
|||||||
* @param {Array.<*>} objectStack Object stack.
|
* @param {Array.<*>} objectStack Object stack.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.format.GML2.prototype.outerBoundaryIsParser_ =
|
ol.format.GML2.prototype.outerBoundaryIsParser_ = function(node, objectStack) {
|
||||||
function(node, objectStack) {
|
|
||||||
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
|
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
|
||||||
'node.nodeType should be ELEMENT');
|
'node.nodeType should be ELEMENT');
|
||||||
goog.asserts.assert(node.localName == 'outerBoundaryIs',
|
goog.asserts.assert(node.localName == 'outerBoundaryIs',
|
||||||
|
|||||||
@@ -224,8 +224,7 @@ ol.format.GML3.prototype.readPolygonPatch_ = function(node, objectStack) {
|
|||||||
* @private
|
* @private
|
||||||
* @return {Array.<number>|undefined} flat coordinates.
|
* @return {Array.<number>|undefined} flat coordinates.
|
||||||
*/
|
*/
|
||||||
ol.format.GML3.prototype.readLineStringSegment_ =
|
ol.format.GML3.prototype.readLineStringSegment_ = function(node, objectStack) {
|
||||||
function(node, objectStack) {
|
|
||||||
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
|
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
|
||||||
'node.nodeType should be ELEMENT');
|
'node.nodeType should be ELEMENT');
|
||||||
goog.asserts.assert(node.localName == 'LineStringSegment',
|
goog.asserts.assert(node.localName == 'LineStringSegment',
|
||||||
@@ -758,8 +757,7 @@ ol.format.GML3.prototype.writeEnvelope = function(node, extent, objectStack) {
|
|||||||
* @param {Array.<*>} objectStack Node stack.
|
* @param {Array.<*>} objectStack Node stack.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.format.GML3.prototype.writeLinearRing_ =
|
ol.format.GML3.prototype.writeLinearRing_ = function(node, geometry, objectStack) {
|
||||||
function(node, geometry, objectStack) {
|
|
||||||
var context = objectStack[objectStack.length - 1];
|
var context = objectStack[objectStack.length - 1];
|
||||||
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
|
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
|
||||||
var srsName = context['srsName'];
|
var srsName = context['srsName'];
|
||||||
@@ -779,8 +777,7 @@ ol.format.GML3.prototype.writeLinearRing_ =
|
|||||||
* @return {Node} Node.
|
* @return {Node} Node.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.format.GML3.prototype.RING_NODE_FACTORY_ =
|
ol.format.GML3.prototype.RING_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
|
||||||
function(value, objectStack, opt_nodeName) {
|
|
||||||
var context = objectStack[objectStack.length - 1];
|
var context = objectStack[objectStack.length - 1];
|
||||||
var parentNode = context.node;
|
var parentNode = context.node;
|
||||||
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
|
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
|
||||||
@@ -799,8 +796,7 @@ ol.format.GML3.prototype.RING_NODE_FACTORY_ =
|
|||||||
* @param {Array.<*>} objectStack Node stack.
|
* @param {Array.<*>} objectStack Node stack.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.format.GML3.prototype.writeSurfaceOrPolygon_ =
|
ol.format.GML3.prototype.writeSurfaceOrPolygon_ = function(node, geometry, objectStack) {
|
||||||
function(node, geometry, objectStack) {
|
|
||||||
var context = objectStack[objectStack.length - 1];
|
var context = objectStack[objectStack.length - 1];
|
||||||
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
|
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
|
||||||
var srsName = context['srsName'];
|
var srsName = context['srsName'];
|
||||||
@@ -829,8 +825,7 @@ ol.format.GML3.prototype.writeSurfaceOrPolygon_ =
|
|||||||
* @param {Array.<*>} objectStack Node stack.
|
* @param {Array.<*>} objectStack Node stack.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.format.GML3.prototype.writeCurveOrLineString_ =
|
ol.format.GML3.prototype.writeCurveOrLineString_ = function(node, geometry, objectStack) {
|
||||||
function(node, geometry, objectStack) {
|
|
||||||
var context = objectStack[objectStack.length - 1];
|
var context = objectStack[objectStack.length - 1];
|
||||||
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
|
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
|
||||||
var srsName = context['srsName'];
|
var srsName = context['srsName'];
|
||||||
@@ -857,8 +852,7 @@ ol.format.GML3.prototype.writeCurveOrLineString_ =
|
|||||||
* @param {Array.<*>} objectStack Node stack.
|
* @param {Array.<*>} objectStack Node stack.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.format.GML3.prototype.writeMultiSurfaceOrPolygon_ =
|
ol.format.GML3.prototype.writeMultiSurfaceOrPolygon_ = function(node, geometry, objectStack) {
|
||||||
function(node, geometry, objectStack) {
|
|
||||||
var context = objectStack[objectStack.length - 1];
|
var context = objectStack[objectStack.length - 1];
|
||||||
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
|
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
|
||||||
var srsName = context['srsName'];
|
var srsName = context['srsName'];
|
||||||
@@ -902,8 +896,7 @@ ol.format.GML3.prototype.writeMultiPoint_ = function(node, geometry,
|
|||||||
* @param {Array.<*>} objectStack Node stack.
|
* @param {Array.<*>} objectStack Node stack.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.format.GML3.prototype.writeMultiCurveOrLineString_ =
|
ol.format.GML3.prototype.writeMultiCurveOrLineString_ = function(node, geometry, objectStack) {
|
||||||
function(node, geometry, objectStack) {
|
|
||||||
var context = objectStack[objectStack.length - 1];
|
var context = objectStack[objectStack.length - 1];
|
||||||
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
|
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
|
||||||
var srsName = context['srsName'];
|
var srsName = context['srsName'];
|
||||||
@@ -938,8 +931,7 @@ ol.format.GML3.prototype.writeRing_ = function(node, ring, objectStack) {
|
|||||||
* @param {Array.<*>} objectStack Node stack.
|
* @param {Array.<*>} objectStack Node stack.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.format.GML3.prototype.writeSurfaceOrPolygonMember_ =
|
ol.format.GML3.prototype.writeSurfaceOrPolygonMember_ = function(node, polygon, objectStack) {
|
||||||
function(node, polygon, objectStack) {
|
|
||||||
var context = objectStack[objectStack.length - 1];
|
var context = objectStack[objectStack.length - 1];
|
||||||
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
|
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
|
||||||
var child = this.GEOMETRY_NODE_FACTORY_(
|
var child = this.GEOMETRY_NODE_FACTORY_(
|
||||||
@@ -957,8 +949,7 @@ ol.format.GML3.prototype.writeSurfaceOrPolygonMember_ =
|
|||||||
* @param {Array.<*>} objectStack Node stack.
|
* @param {Array.<*>} objectStack Node stack.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.format.GML3.prototype.writePointMember_ =
|
ol.format.GML3.prototype.writePointMember_ = function(node, point, objectStack) {
|
||||||
function(node, point, objectStack) {
|
|
||||||
var child = ol.xml.createElementNS(node.namespaceURI, 'Point');
|
var child = ol.xml.createElementNS(node.namespaceURI, 'Point');
|
||||||
node.appendChild(child);
|
node.appendChild(child);
|
||||||
this.writePoint_(child, point, objectStack);
|
this.writePoint_(child, point, objectStack);
|
||||||
@@ -971,8 +962,7 @@ ol.format.GML3.prototype.writePointMember_ =
|
|||||||
* @param {Array.<*>} objectStack Node stack.
|
* @param {Array.<*>} objectStack Node stack.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.format.GML3.prototype.writeLineStringOrCurveMember_ =
|
ol.format.GML3.prototype.writeLineStringOrCurveMember_ = function(node, line, objectStack) {
|
||||||
function(node, line, objectStack) {
|
|
||||||
var context = objectStack[objectStack.length - 1];
|
var context = objectStack[objectStack.length - 1];
|
||||||
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
|
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
|
||||||
var child = this.GEOMETRY_NODE_FACTORY_(line, objectStack);
|
var child = this.GEOMETRY_NODE_FACTORY_(line, objectStack);
|
||||||
@@ -989,8 +979,7 @@ ol.format.GML3.prototype.writeLineStringOrCurveMember_ =
|
|||||||
* @param {Array.<*>} objectStack Node stack.
|
* @param {Array.<*>} objectStack Node stack.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.format.GML3.prototype.writeSurfacePatches_ =
|
ol.format.GML3.prototype.writeSurfacePatches_ = function(node, polygon, objectStack) {
|
||||||
function(node, polygon, objectStack) {
|
|
||||||
var child = ol.xml.createElementNS(node.namespaceURI, 'PolygonPatch');
|
var child = ol.xml.createElementNS(node.namespaceURI, 'PolygonPatch');
|
||||||
node.appendChild(child);
|
node.appendChild(child);
|
||||||
this.writeSurfaceOrPolygon_(child, polygon, objectStack);
|
this.writeSurfaceOrPolygon_(child, polygon, objectStack);
|
||||||
@@ -1003,8 +992,7 @@ ol.format.GML3.prototype.writeSurfacePatches_ =
|
|||||||
* @param {Array.<*>} objectStack Node stack.
|
* @param {Array.<*>} objectStack Node stack.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.format.GML3.prototype.writeCurveSegments_ =
|
ol.format.GML3.prototype.writeCurveSegments_ = function(node, line, objectStack) {
|
||||||
function(node, line, objectStack) {
|
|
||||||
var child = ol.xml.createElementNS(node.namespaceURI,
|
var child = ol.xml.createElementNS(node.namespaceURI,
|
||||||
'LineStringSegment');
|
'LineStringSegment');
|
||||||
node.appendChild(child);
|
node.appendChild(child);
|
||||||
@@ -1017,8 +1005,7 @@ ol.format.GML3.prototype.writeCurveSegments_ =
|
|||||||
* @param {ol.geom.Geometry|ol.Extent} geometry Geometry.
|
* @param {ol.geom.Geometry|ol.Extent} geometry Geometry.
|
||||||
* @param {Array.<*>} objectStack Node stack.
|
* @param {Array.<*>} objectStack Node stack.
|
||||||
*/
|
*/
|
||||||
ol.format.GML3.prototype.writeGeometryElement =
|
ol.format.GML3.prototype.writeGeometryElement = function(node, geometry, objectStack) {
|
||||||
function(node, geometry, objectStack) {
|
|
||||||
var context = objectStack[objectStack.length - 1];
|
var context = objectStack[objectStack.length - 1];
|
||||||
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
|
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
|
||||||
var item = goog.object.clone(context);
|
var item = goog.object.clone(context);
|
||||||
@@ -1049,8 +1036,7 @@ ol.format.GML3.prototype.writeGeometryElement =
|
|||||||
* @param {ol.Feature} feature Feature.
|
* @param {ol.Feature} feature Feature.
|
||||||
* @param {Array.<*>} objectStack Node stack.
|
* @param {Array.<*>} objectStack Node stack.
|
||||||
*/
|
*/
|
||||||
ol.format.GML3.prototype.writeFeatureElement =
|
ol.format.GML3.prototype.writeFeatureElement = function(node, feature, objectStack) {
|
||||||
function(node, feature, objectStack) {
|
|
||||||
var fid = feature.getId();
|
var fid = feature.getId();
|
||||||
if (fid) {
|
if (fid) {
|
||||||
node.setAttribute('fid', fid);
|
node.setAttribute('fid', fid);
|
||||||
@@ -1099,8 +1085,7 @@ ol.format.GML3.prototype.writeFeatureElement =
|
|||||||
* @param {Array.<*>} objectStack Node stack.
|
* @param {Array.<*>} objectStack Node stack.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.format.GML3.prototype.writeFeatureMembers_ =
|
ol.format.GML3.prototype.writeFeatureMembers_ = function(node, features, objectStack) {
|
||||||
function(node, features, objectStack) {
|
|
||||||
var context = objectStack[objectStack.length - 1];
|
var context = objectStack[objectStack.length - 1];
|
||||||
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
|
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
|
||||||
var featureType = context['featureType'];
|
var featureType = context['featureType'];
|
||||||
@@ -1225,8 +1210,7 @@ ol.format.GML3.MULTIGEOMETRY_TO_MEMBER_NODENAME_ = {
|
|||||||
* @return {Node|undefined} Node.
|
* @return {Node|undefined} Node.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.format.GML3.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_ =
|
ol.format.GML3.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
|
||||||
function(value, objectStack, opt_nodeName) {
|
|
||||||
var parentNode = objectStack[objectStack.length - 1].node;
|
var parentNode = objectStack[objectStack.length - 1].node;
|
||||||
goog.asserts.assert(ol.xml.isNode(parentNode),
|
goog.asserts.assert(ol.xml.isNode(parentNode),
|
||||||
'parentNode should be a node');
|
'parentNode should be a node');
|
||||||
@@ -1243,8 +1227,7 @@ ol.format.GML3.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_ =
|
|||||||
* @return {Node|undefined} Node.
|
* @return {Node|undefined} Node.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.format.GML3.prototype.GEOMETRY_NODE_FACTORY_ =
|
ol.format.GML3.prototype.GEOMETRY_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
|
||||||
function(value, objectStack, opt_nodeName) {
|
|
||||||
var context = objectStack[objectStack.length - 1];
|
var context = objectStack[objectStack.length - 1];
|
||||||
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
|
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
|
||||||
var multiSurface = context['multiSurface'];
|
var multiSurface = context['multiSurface'];
|
||||||
|
|||||||
@@ -340,8 +340,7 @@ ol.format.GMLBase.prototype.pointMemberParser_ = function(node, objectStack) {
|
|||||||
* @param {Array.<*>} objectStack Object stack.
|
* @param {Array.<*>} objectStack Object stack.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.format.GMLBase.prototype.lineStringMemberParser_ =
|
ol.format.GMLBase.prototype.lineStringMemberParser_ = function(node, objectStack) {
|
||||||
function(node, objectStack) {
|
|
||||||
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
|
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
|
||||||
'node.nodeType should be ELEMENT');
|
'node.nodeType should be ELEMENT');
|
||||||
goog.asserts.assert(node.localName == 'lineStringMember' ||
|
goog.asserts.assert(node.localName == 'lineStringMember' ||
|
||||||
@@ -357,8 +356,7 @@ ol.format.GMLBase.prototype.lineStringMemberParser_ =
|
|||||||
* @param {Array.<*>} objectStack Object stack.
|
* @param {Array.<*>} objectStack Object stack.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.format.GMLBase.prototype.polygonMemberParser_ =
|
ol.format.GMLBase.prototype.polygonMemberParser_ = function(node, objectStack) {
|
||||||
function(node, objectStack) {
|
|
||||||
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
|
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
|
||||||
'node.nodeType should be ELEMENT');
|
'node.nodeType should be ELEMENT');
|
||||||
goog.asserts.assert(node.localName == 'polygonMember' ||
|
goog.asserts.assert(node.localName == 'polygonMember' ||
|
||||||
@@ -472,8 +470,7 @@ ol.format.GMLBase.prototype.readPolygon = function(node, objectStack) {
|
|||||||
* @private
|
* @private
|
||||||
* @return {Array.<number>} Flat coordinates.
|
* @return {Array.<number>} Flat coordinates.
|
||||||
*/
|
*/
|
||||||
ol.format.GMLBase.prototype.readFlatCoordinatesFromNode_ =
|
ol.format.GMLBase.prototype.readFlatCoordinatesFromNode_ = function(node, objectStack) {
|
||||||
function(node, objectStack) {
|
|
||||||
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
|
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
|
||||||
'node.nodeType should be ELEMENT');
|
'node.nodeType should be ELEMENT');
|
||||||
return /** @type {Array.<number>} */ (ol.xml.pushParseAndPop(
|
return /** @type {Array.<number>} */ (ol.xml.pushParseAndPop(
|
||||||
@@ -583,8 +580,7 @@ ol.format.GMLBase.prototype.RING_PARSERS = Object({
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.format.GMLBase.prototype.readGeometryFromNode =
|
ol.format.GMLBase.prototype.readGeometryFromNode = function(node, opt_options) {
|
||||||
function(node, opt_options) {
|
|
||||||
var geometry = this.readGeometryElement(node,
|
var geometry = this.readGeometryElement(node,
|
||||||
[this.getReadOptions(node, opt_options ? opt_options : {})]);
|
[this.getReadOptions(node, opt_options ? opt_options : {})]);
|
||||||
return geometry ? geometry : null;
|
return geometry ? geometry : null;
|
||||||
@@ -606,8 +602,7 @@ ol.format.GMLBase.prototype.readFeatures;
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.format.GMLBase.prototype.readFeaturesFromNode =
|
ol.format.GMLBase.prototype.readFeaturesFromNode = function(node, opt_options) {
|
||||||
function(node, opt_options) {
|
|
||||||
var options = {
|
var options = {
|
||||||
featureType: this.featureType,
|
featureType: this.featureType,
|
||||||
featureNS: this.featureNS
|
featureNS: this.featureNS
|
||||||
|
|||||||
@@ -2137,8 +2137,7 @@ ol.format.KML.writeColorTextNode_ = function(node, color) {
|
|||||||
* @param {Array.<*>} objectStack Object stack.
|
* @param {Array.<*>} objectStack Object stack.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.format.KML.writeCoordinatesTextNode_ =
|
ol.format.KML.writeCoordinatesTextNode_ = function(node, coordinates, objectStack) {
|
||||||
function(node, coordinates, objectStack) {
|
|
||||||
var context = objectStack[objectStack.length - 1];
|
var context = objectStack[objectStack.length - 1];
|
||||||
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
|
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
|
||||||
|
|
||||||
@@ -2322,8 +2321,7 @@ ol.format.KML.writeLineStyle_ = function(node, style, objectStack) {
|
|||||||
* @param {Array.<*>} objectStack Object stack.
|
* @param {Array.<*>} objectStack Object stack.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.format.KML.writeMultiGeometry_ =
|
ol.format.KML.writeMultiGeometry_ = function(node, geometry, objectStack) {
|
||||||
function(node, geometry, objectStack) {
|
|
||||||
goog.asserts.assert(
|
goog.asserts.assert(
|
||||||
(geometry instanceof ol.geom.MultiPoint) ||
|
(geometry instanceof ol.geom.MultiPoint) ||
|
||||||
(geometry instanceof ol.geom.MultiLineString) ||
|
(geometry instanceof ol.geom.MultiLineString) ||
|
||||||
@@ -2605,8 +2603,7 @@ ol.format.KML.ICON_SEQUENCE_ = ol.xml.makeStructureNS(
|
|||||||
ol.format.KML.NAMESPACE_URIS_, [
|
ol.format.KML.NAMESPACE_URIS_, [
|
||||||
'href'
|
'href'
|
||||||
],
|
],
|
||||||
ol.xml.makeStructureNS(
|
ol.xml.makeStructureNS(ol.format.KML.GX_NAMESPACE_URIS_, [
|
||||||
ol.format.KML.GX_NAMESPACE_URIS_, [
|
|
||||||
'x', 'y', 'w', 'h'
|
'x', 'y', 'w', 'h'
|
||||||
]));
|
]));
|
||||||
|
|
||||||
|
|||||||
@@ -301,8 +301,7 @@ ol.format.Polyline.prototype.readFeatures;
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.format.Polyline.prototype.readFeaturesFromText =
|
ol.format.Polyline.prototype.readFeaturesFromText = function(text, opt_options) {
|
||||||
function(text, opt_options) {
|
|
||||||
var feature = this.readFeatureFromText(text, opt_options);
|
var feature = this.readFeatureFromText(text, opt_options);
|
||||||
return [feature];
|
return [feature];
|
||||||
};
|
};
|
||||||
@@ -323,8 +322,7 @@ ol.format.Polyline.prototype.readGeometry;
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.format.Polyline.prototype.readGeometryFromText =
|
ol.format.Polyline.prototype.readGeometryFromText = function(text, opt_options) {
|
||||||
function(text, opt_options) {
|
|
||||||
var stride = ol.geom.SimpleGeometry.getStrideForLayout(this.geometryLayout_);
|
var stride = ol.geom.SimpleGeometry.getStrideForLayout(this.geometryLayout_);
|
||||||
var flatCoordinates = ol.format.Polyline.decodeDeltas(
|
var flatCoordinates = ol.format.Polyline.decodeDeltas(
|
||||||
text, stride, this.factor_);
|
text, stride, this.factor_);
|
||||||
@@ -368,8 +366,7 @@ ol.format.Polyline.prototype.writeFeatureText = function(feature, opt_options) {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.format.Polyline.prototype.writeFeaturesText =
|
ol.format.Polyline.prototype.writeFeaturesText = function(features, opt_options) {
|
||||||
function(features, opt_options) {
|
|
||||||
goog.asserts.assert(features.length == 1,
|
goog.asserts.assert(features.length == 1,
|
||||||
'features array should have 1 item');
|
'features array should have 1 item');
|
||||||
return this.writeFeatureText(features[0], opt_options);
|
return this.writeFeatureText(features[0], opt_options);
|
||||||
@@ -391,8 +388,7 @@ ol.format.Polyline.prototype.writeGeometry;
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.format.Polyline.prototype.writeGeometryText =
|
ol.format.Polyline.prototype.writeGeometryText = function(geometry, opt_options) {
|
||||||
function(geometry, opt_options) {
|
|
||||||
goog.asserts.assertInstanceof(geometry, ol.geom.LineString,
|
goog.asserts.assertInstanceof(geometry, ol.geom.LineString,
|
||||||
'geometry should be an ol.geom.LineString');
|
'geometry should be an ol.geom.LineString');
|
||||||
geometry = /** @type {ol.geom.LineString} */
|
geometry = /** @type {ol.geom.LineString} */
|
||||||
|
|||||||
@@ -192,8 +192,7 @@ ol.format.WFS.prototype.readFeatureCollectionMetadata = function(source) {
|
|||||||
* @return {ol.format.WFS.FeatureCollectionMetadata|undefined}
|
* @return {ol.format.WFS.FeatureCollectionMetadata|undefined}
|
||||||
* FeatureCollection metadata.
|
* FeatureCollection metadata.
|
||||||
*/
|
*/
|
||||||
ol.format.WFS.prototype.readFeatureCollectionMetadataFromDocument =
|
ol.format.WFS.prototype.readFeatureCollectionMetadataFromDocument = function(doc) {
|
||||||
function(doc) {
|
|
||||||
goog.asserts.assert(doc.nodeType == goog.dom.NodeType.DOCUMENT,
|
goog.asserts.assert(doc.nodeType == goog.dom.NodeType.DOCUMENT,
|
||||||
'doc.nodeType should be DOCUMENT');
|
'doc.nodeType should be DOCUMENT');
|
||||||
for (var n = doc.firstChild; n; n = n.nextSibling) {
|
for (var n = doc.firstChild; n; n = n.nextSibling) {
|
||||||
|
|||||||
@@ -131,8 +131,7 @@ ol.format.WMSCapabilities.readBoundingBox_ = function(node, objectStack) {
|
|||||||
* @param {Array.<*>} objectStack Object stack.
|
* @param {Array.<*>} objectStack Object stack.
|
||||||
* @return {ol.Extent|undefined} Bounding box object.
|
* @return {ol.Extent|undefined} Bounding box object.
|
||||||
*/
|
*/
|
||||||
ol.format.WMSCapabilities.readEXGeographicBoundingBox_ =
|
ol.format.WMSCapabilities.readEXGeographicBoundingBox_ = function(node, objectStack) {
|
||||||
function(node, objectStack) {
|
|
||||||
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
|
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
|
||||||
'node.nodeType should be ELEMENT');
|
'node.nodeType should be ELEMENT');
|
||||||
goog.asserts.assert(node.localName == 'EX_GeographicBoundingBox',
|
goog.asserts.assert(node.localName == 'EX_GeographicBoundingBox',
|
||||||
@@ -201,8 +200,7 @@ ol.format.WMSCapabilities.readService_ = function(node, objectStack) {
|
|||||||
* @private
|
* @private
|
||||||
* @return {Object|undefined} Contact information object.
|
* @return {Object|undefined} Contact information object.
|
||||||
*/
|
*/
|
||||||
ol.format.WMSCapabilities.readContactInformation_ =
|
ol.format.WMSCapabilities.readContactInformation_ = function(node, objectStack) {
|
||||||
function(node, objectStack) {
|
|
||||||
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
|
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
|
||||||
'node.nodeType shpuld be ELEMENT');
|
'node.nodeType shpuld be ELEMENT');
|
||||||
goog.asserts.assert(node.localName == 'ContactInformation',
|
goog.asserts.assert(node.localName == 'ContactInformation',
|
||||||
@@ -219,8 +217,7 @@ ol.format.WMSCapabilities.readContactInformation_ =
|
|||||||
* @private
|
* @private
|
||||||
* @return {Object|undefined} Contact person object.
|
* @return {Object|undefined} Contact person object.
|
||||||
*/
|
*/
|
||||||
ol.format.WMSCapabilities.readContactPersonPrimary_ =
|
ol.format.WMSCapabilities.readContactPersonPrimary_ = function(node, objectStack) {
|
||||||
function(node, objectStack) {
|
|
||||||
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
|
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
|
||||||
'node.nodeType should be ELEMENT');
|
'node.nodeType should be ELEMENT');
|
||||||
goog.asserts.assert(node.localName == 'ContactPersonPrimary',
|
goog.asserts.assert(node.localName == 'ContactPersonPrimary',
|
||||||
@@ -237,8 +234,7 @@ ol.format.WMSCapabilities.readContactPersonPrimary_ =
|
|||||||
* @private
|
* @private
|
||||||
* @return {Object|undefined} Contact address object.
|
* @return {Object|undefined} Contact address object.
|
||||||
*/
|
*/
|
||||||
ol.format.WMSCapabilities.readContactAddress_ =
|
ol.format.WMSCapabilities.readContactAddress_ = function(node, objectStack) {
|
||||||
function(node, objectStack) {
|
|
||||||
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
|
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
|
||||||
'node.nodeType should be ELEMENT');
|
'node.nodeType should be ELEMENT');
|
||||||
goog.asserts.assert(node.localName == 'ContactAddress',
|
goog.asserts.assert(node.localName == 'ContactAddress',
|
||||||
@@ -396,8 +392,7 @@ ol.format.WMSCapabilities.readDimension_ = function(node, objectStack) {
|
|||||||
* @param {Array.<*>} objectStack Object stack.
|
* @param {Array.<*>} objectStack Object stack.
|
||||||
* @return {Object|undefined} Online resource object.
|
* @return {Object|undefined} Online resource object.
|
||||||
*/
|
*/
|
||||||
ol.format.WMSCapabilities.readFormatOnlineresource_ =
|
ol.format.WMSCapabilities.readFormatOnlineresource_ = function(node, objectStack) {
|
||||||
function(node, objectStack) {
|
|
||||||
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
|
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
|
||||||
'node.nodeType should be ELEMENT');
|
'node.nodeType should be ELEMENT');
|
||||||
return ol.xml.pushParseAndPop(
|
return ol.xml.pushParseAndPop(
|
||||||
@@ -473,8 +468,7 @@ ol.format.WMSCapabilities.readOperationType_ = function(node, objectStack) {
|
|||||||
* @param {Array.<*>} objectStack Object stack.
|
* @param {Array.<*>} objectStack Object stack.
|
||||||
* @return {Object|undefined} Online resource object.
|
* @return {Object|undefined} Online resource object.
|
||||||
*/
|
*/
|
||||||
ol.format.WMSCapabilities.readSizedFormatOnlineresource_ =
|
ol.format.WMSCapabilities.readSizedFormatOnlineresource_ = function(node, objectStack) {
|
||||||
function(node, objectStack) {
|
|
||||||
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
|
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
|
||||||
'node.nodeType should be ELEMENT');
|
'node.nodeType should be ELEMENT');
|
||||||
var formatOnlineresource =
|
var formatOnlineresource =
|
||||||
|
|||||||
@@ -61,8 +61,7 @@ ol.format.WMSGetFeatureInfo.layerIdentifier_ = '_layer';
|
|||||||
* @return {Array.<ol.Feature>} Features.
|
* @return {Array.<ol.Feature>} Features.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.format.WMSGetFeatureInfo.prototype.readFeatures_ =
|
ol.format.WMSGetFeatureInfo.prototype.readFeatures_ = function(node, objectStack) {
|
||||||
function(node, objectStack) {
|
|
||||||
|
|
||||||
node.namespaceURI = this.featureNS_;
|
node.namespaceURI = this.featureNS_;
|
||||||
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
|
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
|
||||||
@@ -134,8 +133,7 @@ ol.format.WMSGetFeatureInfo.prototype.readFeatures;
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.format.WMSGetFeatureInfo.prototype.readFeaturesFromNode =
|
ol.format.WMSGetFeatureInfo.prototype.readFeaturesFromNode = function(node, opt_options) {
|
||||||
function(node, opt_options) {
|
|
||||||
var options = {
|
var options = {
|
||||||
'featureType': this.featureType,
|
'featureType': this.featureType,
|
||||||
'featureNS': this.featureNS
|
'featureNS': this.featureNS
|
||||||
|
|||||||
@@ -165,8 +165,7 @@ ol.format.XSD.writeDecimalTextNode = function(node, decimal) {
|
|||||||
* @param {Node} node Node to append a TextNode with the decimal to.
|
* @param {Node} node Node to append a TextNode with the decimal to.
|
||||||
* @param {number} nonNegativeInteger Non negative integer.
|
* @param {number} nonNegativeInteger Non negative integer.
|
||||||
*/
|
*/
|
||||||
ol.format.XSD.writeNonNegativeIntegerTextNode =
|
ol.format.XSD.writeNonNegativeIntegerTextNode = function(node, nonNegativeInteger) {
|
||||||
function(node, nonNegativeInteger) {
|
|
||||||
goog.asserts.assert(nonNegativeInteger >= 0, 'value should be more than 0');
|
goog.asserts.assert(nonNegativeInteger >= 0, 'value should be more than 0');
|
||||||
goog.asserts.assert(nonNegativeInteger == (nonNegativeInteger | 0),
|
goog.asserts.assert(nonNegativeInteger == (nonNegativeInteger | 0),
|
||||||
'value should be an integer value');
|
'value should be an integer value');
|
||||||
|
|||||||
@@ -44,8 +44,7 @@ ol.geom.Circle.prototype.clone = function() {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.geom.Circle.prototype.closestPointXY =
|
ol.geom.Circle.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
|
||||||
function(x, y, closestPoint, minSquaredDistance) {
|
|
||||||
var flatCoordinates = this.flatCoordinates;
|
var flatCoordinates = this.flatCoordinates;
|
||||||
var dx = x - flatCoordinates[0];
|
var dx = x - flatCoordinates[0];
|
||||||
var dy = y - flatCoordinates[1];
|
var dy = y - flatCoordinates[1];
|
||||||
@@ -187,8 +186,7 @@ ol.geom.Circle.prototype.setCenter = function(center) {
|
|||||||
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.geom.Circle.prototype.setCenterAndRadius =
|
ol.geom.Circle.prototype.setCenterAndRadius = function(center, radius, opt_layout) {
|
||||||
function(center, radius, opt_layout) {
|
|
||||||
if (!center) {
|
if (!center) {
|
||||||
this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null);
|
this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null);
|
||||||
} else {
|
} else {
|
||||||
@@ -215,8 +213,7 @@ ol.geom.Circle.prototype.setCenterAndRadius =
|
|||||||
* @param {ol.geom.GeometryLayout} layout Layout.
|
* @param {ol.geom.GeometryLayout} layout Layout.
|
||||||
* @param {Array.<number>} flatCoordinates Flat coordinates.
|
* @param {Array.<number>} flatCoordinates Flat coordinates.
|
||||||
*/
|
*/
|
||||||
ol.geom.Circle.prototype.setFlatCoordinates =
|
ol.geom.Circle.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
|
||||||
function(layout, flatCoordinates) {
|
|
||||||
this.setFlatCoordinatesInternal(layout, flatCoordinates);
|
this.setFlatCoordinatesInternal(layout, flatCoordinates);
|
||||||
this.changed();
|
this.changed();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -30,8 +30,7 @@ ol.geom.flat.area.linearRing = function(flatCoordinates, offset, end, stride) {
|
|||||||
* @param {number} stride Stride.
|
* @param {number} stride Stride.
|
||||||
* @return {number} Area.
|
* @return {number} Area.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.area.linearRings =
|
ol.geom.flat.area.linearRings = function(flatCoordinates, offset, ends, stride) {
|
||||||
function(flatCoordinates, offset, ends, stride) {
|
|
||||||
var area = 0;
|
var area = 0;
|
||||||
var i, ii;
|
var i, ii;
|
||||||
for (i = 0, ii = ends.length; i < ii; ++i) {
|
for (i = 0, ii = ends.length; i < ii; ++i) {
|
||||||
@@ -50,8 +49,7 @@ ol.geom.flat.area.linearRings =
|
|||||||
* @param {number} stride Stride.
|
* @param {number} stride Stride.
|
||||||
* @return {number} Area.
|
* @return {number} Area.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.area.linearRingss =
|
ol.geom.flat.area.linearRingss = function(flatCoordinates, offset, endss, stride) {
|
||||||
function(flatCoordinates, offset, endss, stride) {
|
|
||||||
var area = 0;
|
var area = 0;
|
||||||
var i, ii;
|
var i, ii;
|
||||||
for (i = 0, ii = endss.length; i < ii; ++i) {
|
for (i = 0, ii = endss.length; i < ii; ++i) {
|
||||||
|
|||||||
@@ -10,8 +10,7 @@ goog.require('ol.extent');
|
|||||||
* @param {number} stride Stride.
|
* @param {number} stride Stride.
|
||||||
* @return {Array.<number>} Flat centers.
|
* @return {Array.<number>} Flat centers.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.center.linearRingss =
|
ol.geom.flat.center.linearRingss = function(flatCoordinates, offset, endss, stride) {
|
||||||
function(flatCoordinates, offset, endss, stride) {
|
|
||||||
var flatCenters = [];
|
var flatCenters = [];
|
||||||
var i, ii;
|
var i, ii;
|
||||||
var extent = ol.extent.createEmpty();
|
var extent = ol.extent.createEmpty();
|
||||||
|
|||||||
@@ -17,8 +17,7 @@ goog.require('ol.math');
|
|||||||
* @param {number} y Y.
|
* @param {number} y Y.
|
||||||
* @param {Array.<number>} closestPoint Closest point.
|
* @param {Array.<number>} closestPoint Closest point.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.closest.point =
|
ol.geom.flat.closest.point = function(flatCoordinates, offset1, offset2, stride, x, y, closestPoint) {
|
||||||
function(flatCoordinates, offset1, offset2, stride, x, y, closestPoint) {
|
|
||||||
var x1 = flatCoordinates[offset1];
|
var x1 = flatCoordinates[offset1];
|
||||||
var y1 = flatCoordinates[offset1 + 1];
|
var y1 = flatCoordinates[offset1 + 1];
|
||||||
var dx = flatCoordinates[offset2] - x1;
|
var dx = flatCoordinates[offset2] - x1;
|
||||||
@@ -58,8 +57,7 @@ ol.geom.flat.closest.point =
|
|||||||
* @param {number} maxSquaredDelta Max squared delta.
|
* @param {number} maxSquaredDelta Max squared delta.
|
||||||
* @return {number} Max squared delta.
|
* @return {number} Max squared delta.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.closest.getMaxSquaredDelta =
|
ol.geom.flat.closest.getMaxSquaredDelta = function(flatCoordinates, offset, end, stride, maxSquaredDelta) {
|
||||||
function(flatCoordinates, offset, end, stride, maxSquaredDelta) {
|
|
||||||
var x1 = flatCoordinates[offset];
|
var x1 = flatCoordinates[offset];
|
||||||
var y1 = flatCoordinates[offset + 1];
|
var y1 = flatCoordinates[offset + 1];
|
||||||
for (offset += stride; offset < end; offset += stride) {
|
for (offset += stride; offset < end; offset += stride) {
|
||||||
@@ -84,8 +82,7 @@ ol.geom.flat.closest.getMaxSquaredDelta =
|
|||||||
* @param {number} maxSquaredDelta Max squared delta.
|
* @param {number} maxSquaredDelta Max squared delta.
|
||||||
* @return {number} Max squared delta.
|
* @return {number} Max squared delta.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.closest.getsMaxSquaredDelta =
|
ol.geom.flat.closest.getsMaxSquaredDelta = function(flatCoordinates, offset, ends, stride, maxSquaredDelta) {
|
||||||
function(flatCoordinates, offset, ends, stride, maxSquaredDelta) {
|
|
||||||
var i, ii;
|
var i, ii;
|
||||||
for (i = 0, ii = ends.length; i < ii; ++i) {
|
for (i = 0, ii = ends.length; i < ii; ++i) {
|
||||||
var end = ends[i];
|
var end = ends[i];
|
||||||
@@ -105,8 +102,7 @@ ol.geom.flat.closest.getsMaxSquaredDelta =
|
|||||||
* @param {number} maxSquaredDelta Max squared delta.
|
* @param {number} maxSquaredDelta Max squared delta.
|
||||||
* @return {number} Max squared delta.
|
* @return {number} Max squared delta.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.closest.getssMaxSquaredDelta =
|
ol.geom.flat.closest.getssMaxSquaredDelta = function(flatCoordinates, offset, endss, stride, maxSquaredDelta) {
|
||||||
function(flatCoordinates, offset, endss, stride, maxSquaredDelta) {
|
|
||||||
var i, ii;
|
var i, ii;
|
||||||
for (i = 0, ii = endss.length; i < ii; ++i) {
|
for (i = 0, ii = endss.length; i < ii; ++i) {
|
||||||
var ends = endss[i];
|
var ends = endss[i];
|
||||||
|
|||||||
@@ -12,8 +12,7 @@ goog.require('ol.extent');
|
|||||||
* @param {ol.Extent} extent Extent.
|
* @param {ol.Extent} extent Extent.
|
||||||
* @return {boolean} Contains extent.
|
* @return {boolean} Contains extent.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.contains.linearRingContainsExtent =
|
ol.geom.flat.contains.linearRingContainsExtent = function(flatCoordinates, offset, end, stride, extent) {
|
||||||
function(flatCoordinates, offset, end, stride, extent) {
|
|
||||||
var outside = ol.extent.forEachCorner(extent,
|
var outside = ol.extent.forEachCorner(extent,
|
||||||
/**
|
/**
|
||||||
* @param {ol.Coordinate} coordinate Coordinate.
|
* @param {ol.Coordinate} coordinate Coordinate.
|
||||||
@@ -35,8 +34,7 @@ ol.geom.flat.contains.linearRingContainsExtent =
|
|||||||
* @param {number} y Y.
|
* @param {number} y Y.
|
||||||
* @return {boolean} Contains (x, y).
|
* @return {boolean} Contains (x, y).
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.contains.linearRingContainsXY =
|
ol.geom.flat.contains.linearRingContainsXY = function(flatCoordinates, offset, end, stride, x, y) {
|
||||||
function(flatCoordinates, offset, end, stride, x, y) {
|
|
||||||
// http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html
|
// http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html
|
||||||
var contains = false;
|
var contains = false;
|
||||||
var x1 = flatCoordinates[end - stride];
|
var x1 = flatCoordinates[end - stride];
|
||||||
@@ -65,8 +63,7 @@ ol.geom.flat.contains.linearRingContainsXY =
|
|||||||
* @param {number} y Y.
|
* @param {number} y Y.
|
||||||
* @return {boolean} Contains (x, y).
|
* @return {boolean} Contains (x, y).
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.contains.linearRingsContainsXY =
|
ol.geom.flat.contains.linearRingsContainsXY = function(flatCoordinates, offset, ends, stride, x, y) {
|
||||||
function(flatCoordinates, offset, ends, stride, x, y) {
|
|
||||||
goog.asserts.assert(ends.length > 0, 'ends should not be an empty array');
|
goog.asserts.assert(ends.length > 0, 'ends should not be an empty array');
|
||||||
if (ends.length === 0) {
|
if (ends.length === 0) {
|
||||||
return false;
|
return false;
|
||||||
@@ -95,8 +92,7 @@ ol.geom.flat.contains.linearRingsContainsXY =
|
|||||||
* @param {number} y Y.
|
* @param {number} y Y.
|
||||||
* @return {boolean} Contains (x, y).
|
* @return {boolean} Contains (x, y).
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.contains.linearRingssContainsXY =
|
ol.geom.flat.contains.linearRingssContainsXY = function(flatCoordinates, offset, endss, stride, x, y) {
|
||||||
function(flatCoordinates, offset, endss, stride, x, y) {
|
|
||||||
goog.asserts.assert(endss.length > 0, 'endss should not be an empty array');
|
goog.asserts.assert(endss.length > 0, 'endss should not be an empty array');
|
||||||
if (endss.length === 0) {
|
if (endss.length === 0) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -10,8 +10,7 @@ goog.require('goog.asserts');
|
|||||||
* @param {number} stride Stride.
|
* @param {number} stride Stride.
|
||||||
* @return {number} offset Offset.
|
* @return {number} offset Offset.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.deflate.coordinate =
|
ol.geom.flat.deflate.coordinate = function(flatCoordinates, offset, coordinate, stride) {
|
||||||
function(flatCoordinates, offset, coordinate, stride) {
|
|
||||||
goog.asserts.assert(coordinate.length == stride,
|
goog.asserts.assert(coordinate.length == stride,
|
||||||
'length of the coordinate array should match stride');
|
'length of the coordinate array should match stride');
|
||||||
var i, ii;
|
var i, ii;
|
||||||
@@ -29,8 +28,7 @@ ol.geom.flat.deflate.coordinate =
|
|||||||
* @param {number} stride Stride.
|
* @param {number} stride Stride.
|
||||||
* @return {number} offset Offset.
|
* @return {number} offset Offset.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.deflate.coordinates =
|
ol.geom.flat.deflate.coordinates = function(flatCoordinates, offset, coordinates, stride) {
|
||||||
function(flatCoordinates, offset, coordinates, stride) {
|
|
||||||
var i, ii;
|
var i, ii;
|
||||||
for (i = 0, ii = coordinates.length; i < ii; ++i) {
|
for (i = 0, ii = coordinates.length; i < ii; ++i) {
|
||||||
var coordinate = coordinates[i];
|
var coordinate = coordinates[i];
|
||||||
@@ -53,8 +51,7 @@ ol.geom.flat.deflate.coordinates =
|
|||||||
* @param {Array.<number>=} opt_ends Ends.
|
* @param {Array.<number>=} opt_ends Ends.
|
||||||
* @return {Array.<number>} Ends.
|
* @return {Array.<number>} Ends.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.deflate.coordinatess =
|
ol.geom.flat.deflate.coordinatess = function(flatCoordinates, offset, coordinatess, stride, opt_ends) {
|
||||||
function(flatCoordinates, offset, coordinatess, stride, opt_ends) {
|
|
||||||
var ends = opt_ends ? opt_ends : [];
|
var ends = opt_ends ? opt_ends : [];
|
||||||
var i = 0;
|
var i = 0;
|
||||||
var j, jj;
|
var j, jj;
|
||||||
@@ -77,8 +74,7 @@ ol.geom.flat.deflate.coordinatess =
|
|||||||
* @param {Array.<Array.<number>>=} opt_endss Endss.
|
* @param {Array.<Array.<number>>=} opt_endss Endss.
|
||||||
* @return {Array.<Array.<number>>} Endss.
|
* @return {Array.<Array.<number>>} Endss.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.deflate.coordinatesss =
|
ol.geom.flat.deflate.coordinatesss = function(flatCoordinates, offset, coordinatesss, stride, opt_endss) {
|
||||||
function(flatCoordinates, offset, coordinatesss, stride, opt_endss) {
|
|
||||||
var endss = opt_endss ? opt_endss : [];
|
var endss = opt_endss ? opt_endss : [];
|
||||||
var i = 0;
|
var i = 0;
|
||||||
var j, jj;
|
var j, jj;
|
||||||
|
|||||||
@@ -12,8 +12,7 @@ goog.require('goog.asserts');
|
|||||||
* @param {number=} opt_destOffset Destination offset.
|
* @param {number=} opt_destOffset Destination offset.
|
||||||
* @return {Array.<number>} Flat coordinates.
|
* @return {Array.<number>} Flat coordinates.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.flip.flipXY =
|
ol.geom.flat.flip.flipXY = function(flatCoordinates, offset, end, stride, opt_dest, opt_destOffset) {
|
||||||
function(flatCoordinates, offset, end, stride, opt_dest, opt_destOffset) {
|
|
||||||
var dest, destOffset;
|
var dest, destOffset;
|
||||||
if (opt_dest !== undefined) {
|
if (opt_dest !== undefined) {
|
||||||
dest = opt_dest;
|
dest = opt_dest;
|
||||||
|
|||||||
@@ -14,8 +14,7 @@ goog.require('ol.proj');
|
|||||||
* @param {number} squaredTolerance Squared tolerance.
|
* @param {number} squaredTolerance Squared tolerance.
|
||||||
* @return {Array.<number>} Flat coordinates.
|
* @return {Array.<number>} Flat coordinates.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.geodesic.line_ =
|
ol.geom.flat.geodesic.line_ = function(interpolate, transform, squaredTolerance) {
|
||||||
function(interpolate, transform, squaredTolerance) {
|
|
||||||
// FIXME reduce garbage generation
|
// FIXME reduce garbage generation
|
||||||
// FIXME optimize stack operations
|
// FIXME optimize stack operations
|
||||||
|
|
||||||
@@ -141,8 +140,7 @@ ol.geom.flat.geodesic.greatCircleArc = function(
|
|||||||
* @param {number} squaredTolerance Squared tolerance.
|
* @param {number} squaredTolerance Squared tolerance.
|
||||||
* @return {Array.<number>} Flat coordinates.
|
* @return {Array.<number>} Flat coordinates.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.geodesic.meridian =
|
ol.geom.flat.geodesic.meridian = function(lon, lat1, lat2, projection, squaredTolerance) {
|
||||||
function(lon, lat1, lat2, projection, squaredTolerance) {
|
|
||||||
var epsg4326Projection = ol.proj.get('EPSG:4326');
|
var epsg4326Projection = ol.proj.get('EPSG:4326');
|
||||||
return ol.geom.flat.geodesic.line_(
|
return ol.geom.flat.geodesic.line_(
|
||||||
/**
|
/**
|
||||||
@@ -165,8 +163,7 @@ ol.geom.flat.geodesic.meridian =
|
|||||||
* @param {number} squaredTolerance Squared tolerance.
|
* @param {number} squaredTolerance Squared tolerance.
|
||||||
* @return {Array.<number>} Flat coordinates.
|
* @return {Array.<number>} Flat coordinates.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.geodesic.parallel =
|
ol.geom.flat.geodesic.parallel = function(lat, lon1, lon2, projection, squaredTolerance) {
|
||||||
function(lat, lon1, lon2, projection, squaredTolerance) {
|
|
||||||
var epsg4326Projection = ol.proj.get('EPSG:4326');
|
var epsg4326Projection = ol.proj.get('EPSG:4326');
|
||||||
return ol.geom.flat.geodesic.line_(
|
return ol.geom.flat.geodesic.line_(
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -9,8 +9,7 @@ goog.provide('ol.geom.flat.inflate');
|
|||||||
* @param {Array.<ol.Coordinate>=} opt_coordinates Coordinates.
|
* @param {Array.<ol.Coordinate>=} opt_coordinates Coordinates.
|
||||||
* @return {Array.<ol.Coordinate>} Coordinates.
|
* @return {Array.<ol.Coordinate>} Coordinates.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.inflate.coordinates =
|
ol.geom.flat.inflate.coordinates = function(flatCoordinates, offset, end, stride, opt_coordinates) {
|
||||||
function(flatCoordinates, offset, end, stride, opt_coordinates) {
|
|
||||||
var coordinates = opt_coordinates !== undefined ? opt_coordinates : [];
|
var coordinates = opt_coordinates !== undefined ? opt_coordinates : [];
|
||||||
var i = 0;
|
var i = 0;
|
||||||
var j;
|
var j;
|
||||||
@@ -30,8 +29,7 @@ ol.geom.flat.inflate.coordinates =
|
|||||||
* @param {Array.<Array.<ol.Coordinate>>=} opt_coordinatess Coordinatess.
|
* @param {Array.<Array.<ol.Coordinate>>=} opt_coordinatess Coordinatess.
|
||||||
* @return {Array.<Array.<ol.Coordinate>>} Coordinatess.
|
* @return {Array.<Array.<ol.Coordinate>>} Coordinatess.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.inflate.coordinatess =
|
ol.geom.flat.inflate.coordinatess = function(flatCoordinates, offset, ends, stride, opt_coordinatess) {
|
||||||
function(flatCoordinates, offset, ends, stride, opt_coordinatess) {
|
|
||||||
var coordinatess = opt_coordinatess !== undefined ? opt_coordinatess : [];
|
var coordinatess = opt_coordinatess !== undefined ? opt_coordinatess : [];
|
||||||
var i = 0;
|
var i = 0;
|
||||||
var j, jj;
|
var j, jj;
|
||||||
@@ -55,8 +53,7 @@ ol.geom.flat.inflate.coordinatess =
|
|||||||
* Coordinatesss.
|
* Coordinatesss.
|
||||||
* @return {Array.<Array.<Array.<ol.Coordinate>>>} Coordinatesss.
|
* @return {Array.<Array.<Array.<ol.Coordinate>>>} Coordinatesss.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.inflate.coordinatesss =
|
ol.geom.flat.inflate.coordinatesss = function(flatCoordinates, offset, endss, stride, opt_coordinatesss) {
|
||||||
function(flatCoordinates, offset, endss, stride, opt_coordinatesss) {
|
|
||||||
var coordinatesss = opt_coordinatesss !== undefined ? opt_coordinatesss : [];
|
var coordinatesss = opt_coordinatesss !== undefined ? opt_coordinatesss : [];
|
||||||
var i = 0;
|
var i = 0;
|
||||||
var j, jj;
|
var j, jj;
|
||||||
|
|||||||
@@ -78,8 +78,7 @@ ol.geom.flat.interiorpoint.linearRings = function(flatCoordinates, offset,
|
|||||||
* @param {Array.<number>} flatCenters Flat centers.
|
* @param {Array.<number>} flatCenters Flat centers.
|
||||||
* @return {Array.<number>} Interior points.
|
* @return {Array.<number>} Interior points.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.interiorpoint.linearRingss =
|
ol.geom.flat.interiorpoint.linearRingss = function(flatCoordinates, offset, endss, stride, flatCenters) {
|
||||||
function(flatCoordinates, offset, endss, stride, flatCenters) {
|
|
||||||
goog.asserts.assert(2 * endss.length == flatCenters.length,
|
goog.asserts.assert(2 * endss.length == flatCenters.length,
|
||||||
'endss.length times 2 should be flatCenters.length');
|
'endss.length times 2 should be flatCenters.length');
|
||||||
var interiorPoints = [];
|
var interiorPoints = [];
|
||||||
|
|||||||
@@ -14,8 +14,7 @@ goog.require('goog.math');
|
|||||||
* @param {Array.<number>=} opt_dest Destination.
|
* @param {Array.<number>=} opt_dest Destination.
|
||||||
* @return {Array.<number>} Destination.
|
* @return {Array.<number>} Destination.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.interpolate.lineString =
|
ol.geom.flat.interpolate.lineString = function(flatCoordinates, offset, end, stride, fraction, opt_dest) {
|
||||||
function(flatCoordinates, offset, end, stride, fraction, opt_dest) {
|
|
||||||
// FIXME interpolate extra dimensions
|
// FIXME interpolate extra dimensions
|
||||||
goog.asserts.assert(0 <= fraction && fraction <= 1,
|
goog.asserts.assert(0 <= fraction && fraction <= 1,
|
||||||
'fraction should be in between 0 and 1');
|
'fraction should be in between 0 and 1');
|
||||||
@@ -80,8 +79,7 @@ ol.geom.flat.interpolate.lineString =
|
|||||||
* @param {boolean} extrapolate Extrapolate.
|
* @param {boolean} extrapolate Extrapolate.
|
||||||
* @return {ol.Coordinate} Coordinate.
|
* @return {ol.Coordinate} Coordinate.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.lineStringCoordinateAtM =
|
ol.geom.flat.lineStringCoordinateAtM = function(flatCoordinates, offset, end, stride, m, extrapolate) {
|
||||||
function(flatCoordinates, offset, end, stride, m, extrapolate) {
|
|
||||||
if (end == offset) {
|
if (end == offset) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,8 +14,7 @@ goog.require('ol.geom.flat.segments');
|
|||||||
* @param {ol.Extent} extent Extent.
|
* @param {ol.Extent} extent Extent.
|
||||||
* @return {boolean} True if the geometry and the extent intersect.
|
* @return {boolean} True if the geometry and the extent intersect.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.intersectsextent.lineString =
|
ol.geom.flat.intersectsextent.lineString = function(flatCoordinates, offset, end, stride, extent) {
|
||||||
function(flatCoordinates, offset, end, stride, extent) {
|
|
||||||
var coordinatesExtent = ol.extent.extendFlatCoordinates(
|
var coordinatesExtent = ol.extent.extendFlatCoordinates(
|
||||||
ol.extent.createEmpty(), flatCoordinates, offset, end, stride);
|
ol.extent.createEmpty(), flatCoordinates, offset, end, stride);
|
||||||
if (!ol.extent.intersects(extent, coordinatesExtent)) {
|
if (!ol.extent.intersects(extent, coordinatesExtent)) {
|
||||||
@@ -53,8 +52,7 @@ ol.geom.flat.intersectsextent.lineString =
|
|||||||
* @param {ol.Extent} extent Extent.
|
* @param {ol.Extent} extent Extent.
|
||||||
* @return {boolean} True if the geometry and the extent intersect.
|
* @return {boolean} True if the geometry and the extent intersect.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.intersectsextent.lineStrings =
|
ol.geom.flat.intersectsextent.lineStrings = function(flatCoordinates, offset, ends, stride, extent) {
|
||||||
function(flatCoordinates, offset, ends, stride, extent) {
|
|
||||||
var i, ii;
|
var i, ii;
|
||||||
for (i = 0, ii = ends.length; i < ii; ++i) {
|
for (i = 0, ii = ends.length; i < ii; ++i) {
|
||||||
if (ol.geom.flat.intersectsextent.lineString(
|
if (ol.geom.flat.intersectsextent.lineString(
|
||||||
@@ -75,8 +73,7 @@ ol.geom.flat.intersectsextent.lineStrings =
|
|||||||
* @param {ol.Extent} extent Extent.
|
* @param {ol.Extent} extent Extent.
|
||||||
* @return {boolean} True if the geometry and the extent intersect.
|
* @return {boolean} True if the geometry and the extent intersect.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.intersectsextent.linearRing =
|
ol.geom.flat.intersectsextent.linearRing = function(flatCoordinates, offset, end, stride, extent) {
|
||||||
function(flatCoordinates, offset, end, stride, extent) {
|
|
||||||
if (ol.geom.flat.intersectsextent.lineString(
|
if (ol.geom.flat.intersectsextent.lineString(
|
||||||
flatCoordinates, offset, end, stride, extent)) {
|
flatCoordinates, offset, end, stride, extent)) {
|
||||||
return true;
|
return true;
|
||||||
@@ -109,8 +106,7 @@ ol.geom.flat.intersectsextent.linearRing =
|
|||||||
* @param {ol.Extent} extent Extent.
|
* @param {ol.Extent} extent Extent.
|
||||||
* @return {boolean} True if the geometry and the extent intersect.
|
* @return {boolean} True if the geometry and the extent intersect.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.intersectsextent.linearRings =
|
ol.geom.flat.intersectsextent.linearRings = function(flatCoordinates, offset, ends, stride, extent) {
|
||||||
function(flatCoordinates, offset, ends, stride, extent) {
|
|
||||||
goog.asserts.assert(ends.length > 0, 'ends should not be an empty array');
|
goog.asserts.assert(ends.length > 0, 'ends should not be an empty array');
|
||||||
if (!ol.geom.flat.intersectsextent.linearRing(
|
if (!ol.geom.flat.intersectsextent.linearRing(
|
||||||
flatCoordinates, offset, ends[0], stride, extent)) {
|
flatCoordinates, offset, ends[0], stride, extent)) {
|
||||||
@@ -138,8 +134,7 @@ ol.geom.flat.intersectsextent.linearRings =
|
|||||||
* @param {ol.Extent} extent Extent.
|
* @param {ol.Extent} extent Extent.
|
||||||
* @return {boolean} True if the geometry and the extent intersect.
|
* @return {boolean} True if the geometry and the extent intersect.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.intersectsextent.linearRingss =
|
ol.geom.flat.intersectsextent.linearRingss = function(flatCoordinates, offset, endss, stride, extent) {
|
||||||
function(flatCoordinates, offset, endss, stride, extent) {
|
|
||||||
goog.asserts.assert(endss.length > 0, 'endss should not be an empty array');
|
goog.asserts.assert(endss.length > 0, 'endss should not be an empty array');
|
||||||
var i, ii;
|
var i, ii;
|
||||||
for (i = 0, ii = endss.length; i < ii; ++i) {
|
for (i = 0, ii = endss.length; i < ii; ++i) {
|
||||||
|
|||||||
@@ -8,8 +8,7 @@ goog.provide('ol.geom.flat.length');
|
|||||||
* @param {number} stride Stride.
|
* @param {number} stride Stride.
|
||||||
* @return {number} Length.
|
* @return {number} Length.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.length.lineString =
|
ol.geom.flat.length.lineString = function(flatCoordinates, offset, end, stride) {
|
||||||
function(flatCoordinates, offset, end, stride) {
|
|
||||||
var x1 = flatCoordinates[offset];
|
var x1 = flatCoordinates[offset];
|
||||||
var y1 = flatCoordinates[offset + 1];
|
var y1 = flatCoordinates[offset + 1];
|
||||||
var length = 0;
|
var length = 0;
|
||||||
@@ -32,8 +31,7 @@ ol.geom.flat.length.lineString =
|
|||||||
* @param {number} stride Stride.
|
* @param {number} stride Stride.
|
||||||
* @return {number} Perimeter.
|
* @return {number} Perimeter.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.length.linearRing =
|
ol.geom.flat.length.linearRing = function(flatCoordinates, offset, end, stride) {
|
||||||
function(flatCoordinates, offset, end, stride) {
|
|
||||||
var perimeter =
|
var perimeter =
|
||||||
ol.geom.flat.length.lineString(flatCoordinates, offset, end, stride);
|
ol.geom.flat.length.lineString(flatCoordinates, offset, end, stride);
|
||||||
var dx = flatCoordinates[end - stride] - flatCoordinates[offset];
|
var dx = flatCoordinates[end - stride] - flatCoordinates[offset];
|
||||||
|
|||||||
@@ -11,8 +11,7 @@ goog.require('ol.geom.flat.reverse');
|
|||||||
* @param {number} stride Stride.
|
* @param {number} stride Stride.
|
||||||
* @return {boolean} Is clockwise.
|
* @return {boolean} Is clockwise.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.orient.linearRingIsClockwise =
|
ol.geom.flat.orient.linearRingIsClockwise = function(flatCoordinates, offset, end, stride) {
|
||||||
function(flatCoordinates, offset, end, stride) {
|
|
||||||
// http://tinyurl.com/clockwise-method
|
// http://tinyurl.com/clockwise-method
|
||||||
// https://github.com/OSGeo/gdal/blob/trunk/gdal/ogr/ogrlinearring.cpp
|
// https://github.com/OSGeo/gdal/blob/trunk/gdal/ogr/ogrlinearring.cpp
|
||||||
var edge = 0;
|
var edge = 0;
|
||||||
@@ -42,8 +41,7 @@ ol.geom.flat.orient.linearRingIsClockwise =
|
|||||||
* (counter-clockwise exterior ring and clockwise interior rings).
|
* (counter-clockwise exterior ring and clockwise interior rings).
|
||||||
* @return {boolean} Rings are correctly oriented.
|
* @return {boolean} Rings are correctly oriented.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.orient.linearRingsAreOriented =
|
ol.geom.flat.orient.linearRingsAreOriented = function(flatCoordinates, offset, ends, stride, opt_right) {
|
||||||
function(flatCoordinates, offset, ends, stride, opt_right) {
|
|
||||||
var right = opt_right !== undefined ? opt_right : false;
|
var right = opt_right !== undefined ? opt_right : false;
|
||||||
var i, ii;
|
var i, ii;
|
||||||
for (i = 0, ii = ends.length; i < ii; ++i) {
|
for (i = 0, ii = ends.length; i < ii; ++i) {
|
||||||
@@ -78,8 +76,7 @@ ol.geom.flat.orient.linearRingsAreOriented =
|
|||||||
* (counter-clockwise exterior ring and clockwise interior rings).
|
* (counter-clockwise exterior ring and clockwise interior rings).
|
||||||
* @return {boolean} Rings are correctly oriented.
|
* @return {boolean} Rings are correctly oriented.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.orient.linearRingssAreOriented =
|
ol.geom.flat.orient.linearRingssAreOriented = function(flatCoordinates, offset, endss, stride, opt_right) {
|
||||||
function(flatCoordinates, offset, endss, stride, opt_right) {
|
|
||||||
var i, ii;
|
var i, ii;
|
||||||
for (i = 0, ii = endss.length; i < ii; ++i) {
|
for (i = 0, ii = endss.length; i < ii; ++i) {
|
||||||
if (!ol.geom.flat.orient.linearRingsAreOriented(
|
if (!ol.geom.flat.orient.linearRingsAreOriented(
|
||||||
@@ -104,8 +101,7 @@ ol.geom.flat.orient.linearRingssAreOriented =
|
|||||||
* @param {boolean=} opt_right Follow the right-hand rule for orientation.
|
* @param {boolean=} opt_right Follow the right-hand rule for orientation.
|
||||||
* @return {number} End.
|
* @return {number} End.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.orient.orientLinearRings =
|
ol.geom.flat.orient.orientLinearRings = function(flatCoordinates, offset, ends, stride, opt_right) {
|
||||||
function(flatCoordinates, offset, ends, stride, opt_right) {
|
|
||||||
var right = opt_right !== undefined ? opt_right : false;
|
var right = opt_right !== undefined ? opt_right : false;
|
||||||
var i, ii;
|
var i, ii;
|
||||||
for (i = 0, ii = ends.length; i < ii; ++i) {
|
for (i = 0, ii = ends.length; i < ii; ++i) {
|
||||||
@@ -137,8 +133,7 @@ ol.geom.flat.orient.orientLinearRings =
|
|||||||
* @param {boolean=} opt_right Follow the right-hand rule for orientation.
|
* @param {boolean=} opt_right Follow the right-hand rule for orientation.
|
||||||
* @return {number} End.
|
* @return {number} End.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.orient.orientLinearRingss =
|
ol.geom.flat.orient.orientLinearRingss = function(flatCoordinates, offset, endss, stride, opt_right) {
|
||||||
function(flatCoordinates, offset, endss, stride, opt_right) {
|
|
||||||
var i, ii;
|
var i, ii;
|
||||||
for (i = 0, ii = endss.length; i < ii; ++i) {
|
for (i = 0, ii = endss.length; i < ii; ++i) {
|
||||||
offset = ol.geom.flat.orient.orientLinearRings(
|
offset = ol.geom.flat.orient.orientLinearRings(
|
||||||
|
|||||||
@@ -7,8 +7,7 @@ goog.provide('ol.geom.flat.reverse');
|
|||||||
* @param {number} end End.
|
* @param {number} end End.
|
||||||
* @param {number} stride Stride.
|
* @param {number} stride Stride.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.reverse.coordinates =
|
ol.geom.flat.reverse.coordinates = function(flatCoordinates, offset, end, stride) {
|
||||||
function(flatCoordinates, offset, end, stride) {
|
|
||||||
while (offset < end - stride) {
|
while (offset < end - stride) {
|
||||||
var i;
|
var i;
|
||||||
for (i = 0; i < stride; ++i) {
|
for (i = 0; i < stride; ++i) {
|
||||||
|
|||||||
@@ -16,8 +16,7 @@ goog.provide('ol.geom.flat.segments');
|
|||||||
* @return {T|boolean} Value.
|
* @return {T|boolean} Value.
|
||||||
* @template T,S
|
* @template T,S
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.segments.forEach =
|
ol.geom.flat.segments.forEach = function(flatCoordinates, offset, end, stride, callback, opt_this) {
|
||||||
function(flatCoordinates, offset, end, stride, callback, opt_this) {
|
|
||||||
var point1 = [flatCoordinates[offset], flatCoordinates[offset + 1]];
|
var point1 = [flatCoordinates[offset], flatCoordinates[offset + 1]];
|
||||||
var point2 = [];
|
var point2 = [];
|
||||||
var ret;
|
var ret;
|
||||||
|
|||||||
@@ -12,8 +12,7 @@ goog.require('goog.vec.Mat4');
|
|||||||
* @param {Array.<number>=} opt_dest Destination.
|
* @param {Array.<number>=} opt_dest Destination.
|
||||||
* @return {Array.<number>} Transformed coordinates.
|
* @return {Array.<number>} Transformed coordinates.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.transform.transform2D =
|
ol.geom.flat.transform.transform2D = function(flatCoordinates, offset, end, stride, transform, opt_dest) {
|
||||||
function(flatCoordinates, offset, end, stride, transform, opt_dest) {
|
|
||||||
var m00 = goog.vec.Mat4.getElement(transform, 0, 0);
|
var m00 = goog.vec.Mat4.getElement(transform, 0, 0);
|
||||||
var m10 = goog.vec.Mat4.getElement(transform, 1, 0);
|
var m10 = goog.vec.Mat4.getElement(transform, 1, 0);
|
||||||
var m01 = goog.vec.Mat4.getElement(transform, 0, 1);
|
var m01 = goog.vec.Mat4.getElement(transform, 0, 1);
|
||||||
@@ -46,8 +45,7 @@ ol.geom.flat.transform.transform2D =
|
|||||||
* @param {Array.<number>=} opt_dest Destination.
|
* @param {Array.<number>=} opt_dest Destination.
|
||||||
* @return {Array.<number>} Transformed coordinates.
|
* @return {Array.<number>} Transformed coordinates.
|
||||||
*/
|
*/
|
||||||
ol.geom.flat.transform.translate =
|
ol.geom.flat.transform.translate = function(flatCoordinates, offset, end, stride, deltaX, deltaY, opt_dest) {
|
||||||
function(flatCoordinates, offset, end, stride, deltaX, deltaY, opt_dest) {
|
|
||||||
var dest = opt_dest ? opt_dest : [];
|
var dest = opt_dest ? opt_dest : [];
|
||||||
var i = 0;
|
var i = 0;
|
||||||
var j, k;
|
var j, k;
|
||||||
|
|||||||
@@ -95,8 +95,7 @@ ol.geom.GeometryCollection.prototype.clone = function() {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.geom.GeometryCollection.prototype.closestPointXY =
|
ol.geom.GeometryCollection.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
|
||||||
function(x, y, closestPoint, minSquaredDistance) {
|
|
||||||
if (minSquaredDistance <
|
if (minSquaredDistance <
|
||||||
ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
|
ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
|
||||||
return minSquaredDistance;
|
return minSquaredDistance;
|
||||||
@@ -160,8 +159,7 @@ ol.geom.GeometryCollection.prototype.getGeometriesArray = function() {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.geom.GeometryCollection.prototype.getSimplifiedGeometry =
|
ol.geom.GeometryCollection.prototype.getSimplifiedGeometry = function(squaredTolerance) {
|
||||||
function(squaredTolerance) {
|
|
||||||
if (this.simplifiedGeometryRevision != this.getRevision()) {
|
if (this.simplifiedGeometryRevision != this.getRevision()) {
|
||||||
goog.object.clear(this.simplifiedGeometryCache);
|
goog.object.clear(this.simplifiedGeometryCache);
|
||||||
this.simplifiedGeometryMaxMinSquaredTolerance = 0;
|
this.simplifiedGeometryMaxMinSquaredTolerance = 0;
|
||||||
|
|||||||
@@ -60,8 +60,7 @@ ol.geom.LinearRing.prototype.clone = function() {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.geom.LinearRing.prototype.closestPointXY =
|
ol.geom.LinearRing.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
|
||||||
function(x, y, closestPoint, minSquaredDistance) {
|
|
||||||
if (minSquaredDistance <
|
if (minSquaredDistance <
|
||||||
ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
|
ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
|
||||||
return minSquaredDistance;
|
return minSquaredDistance;
|
||||||
@@ -102,8 +101,7 @@ ol.geom.LinearRing.prototype.getCoordinates = function() {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.geom.LinearRing.prototype.getSimplifiedGeometryInternal =
|
ol.geom.LinearRing.prototype.getSimplifiedGeometryInternal = function(squaredTolerance) {
|
||||||
function(squaredTolerance) {
|
|
||||||
var simplifiedFlatCoordinates = [];
|
var simplifiedFlatCoordinates = [];
|
||||||
simplifiedFlatCoordinates.length = ol.geom.flat.simplify.douglasPeucker(
|
simplifiedFlatCoordinates.length = ol.geom.flat.simplify.douglasPeucker(
|
||||||
this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,
|
this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,
|
||||||
@@ -130,8 +128,7 @@ ol.geom.LinearRing.prototype.getType = function() {
|
|||||||
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
||||||
* @api stable
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.geom.LinearRing.prototype.setCoordinates =
|
ol.geom.LinearRing.prototype.setCoordinates = function(coordinates, opt_layout) {
|
||||||
function(coordinates, opt_layout) {
|
|
||||||
if (!coordinates) {
|
if (!coordinates) {
|
||||||
this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null);
|
this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null);
|
||||||
} else {
|
} else {
|
||||||
@@ -150,8 +147,7 @@ ol.geom.LinearRing.prototype.setCoordinates =
|
|||||||
* @param {ol.geom.GeometryLayout} layout Layout.
|
* @param {ol.geom.GeometryLayout} layout Layout.
|
||||||
* @param {Array.<number>} flatCoordinates Flat coordinates.
|
* @param {Array.<number>} flatCoordinates Flat coordinates.
|
||||||
*/
|
*/
|
||||||
ol.geom.LinearRing.prototype.setFlatCoordinates =
|
ol.geom.LinearRing.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
|
||||||
function(layout, flatCoordinates) {
|
|
||||||
this.setFlatCoordinatesInternal(layout, flatCoordinates);
|
this.setFlatCoordinatesInternal(layout, flatCoordinates);
|
||||||
this.changed();
|
this.changed();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -94,8 +94,7 @@ ol.geom.LineString.prototype.clone = function() {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.geom.LineString.prototype.closestPointXY =
|
ol.geom.LineString.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
|
||||||
function(x, y, closestPoint, minSquaredDistance) {
|
|
||||||
if (minSquaredDistance <
|
if (minSquaredDistance <
|
||||||
ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
|
ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
|
||||||
return minSquaredDistance;
|
return minSquaredDistance;
|
||||||
@@ -209,8 +208,7 @@ ol.geom.LineString.prototype.getFlatMidpoint = function() {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.geom.LineString.prototype.getSimplifiedGeometryInternal =
|
ol.geom.LineString.prototype.getSimplifiedGeometryInternal = function(squaredTolerance) {
|
||||||
function(squaredTolerance) {
|
|
||||||
var simplifiedFlatCoordinates = [];
|
var simplifiedFlatCoordinates = [];
|
||||||
simplifiedFlatCoordinates.length = ol.geom.flat.simplify.douglasPeucker(
|
simplifiedFlatCoordinates.length = ol.geom.flat.simplify.douglasPeucker(
|
||||||
this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,
|
this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,
|
||||||
@@ -248,8 +246,7 @@ ol.geom.LineString.prototype.intersectsExtent = function(extent) {
|
|||||||
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
||||||
* @api stable
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.geom.LineString.prototype.setCoordinates =
|
ol.geom.LineString.prototype.setCoordinates = function(coordinates, opt_layout) {
|
||||||
function(coordinates, opt_layout) {
|
|
||||||
if (!coordinates) {
|
if (!coordinates) {
|
||||||
this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null);
|
this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null);
|
||||||
} else {
|
} else {
|
||||||
@@ -268,8 +265,7 @@ ol.geom.LineString.prototype.setCoordinates =
|
|||||||
* @param {ol.geom.GeometryLayout} layout Layout.
|
* @param {ol.geom.GeometryLayout} layout Layout.
|
||||||
* @param {Array.<number>} flatCoordinates Flat coordinates.
|
* @param {Array.<number>} flatCoordinates Flat coordinates.
|
||||||
*/
|
*/
|
||||||
ol.geom.LineString.prototype.setFlatCoordinates =
|
ol.geom.LineString.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
|
||||||
function(layout, flatCoordinates) {
|
|
||||||
this.setFlatCoordinatesInternal(layout, flatCoordinates);
|
this.setFlatCoordinatesInternal(layout, flatCoordinates);
|
||||||
this.changed();
|
this.changed();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -90,8 +90,7 @@ ol.geom.MultiLineString.prototype.clone = function() {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.geom.MultiLineString.prototype.closestPointXY =
|
ol.geom.MultiLineString.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
|
||||||
function(x, y, closestPoint, minSquaredDistance) {
|
|
||||||
if (minSquaredDistance <
|
if (minSquaredDistance <
|
||||||
ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
|
ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
|
||||||
return minSquaredDistance;
|
return minSquaredDistance;
|
||||||
@@ -129,8 +128,7 @@ ol.geom.MultiLineString.prototype.closestPointXY =
|
|||||||
* @return {ol.Coordinate} Coordinate.
|
* @return {ol.Coordinate} Coordinate.
|
||||||
* @api stable
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.geom.MultiLineString.prototype.getCoordinateAtM =
|
ol.geom.MultiLineString.prototype.getCoordinateAtM = function(m, opt_extrapolate, opt_interpolate) {
|
||||||
function(m, opt_extrapolate, opt_interpolate) {
|
|
||||||
if ((this.layout != ol.geom.GeometryLayout.XYM &&
|
if ((this.layout != ol.geom.GeometryLayout.XYM &&
|
||||||
this.layout != ol.geom.GeometryLayout.XYZM) ||
|
this.layout != ol.geom.GeometryLayout.XYZM) ||
|
||||||
this.flatCoordinates.length === 0) {
|
this.flatCoordinates.length === 0) {
|
||||||
@@ -229,8 +227,7 @@ ol.geom.MultiLineString.prototype.getFlatMidpoints = function() {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.geom.MultiLineString.prototype.getSimplifiedGeometryInternal =
|
ol.geom.MultiLineString.prototype.getSimplifiedGeometryInternal = function(squaredTolerance) {
|
||||||
function(squaredTolerance) {
|
|
||||||
var simplifiedFlatCoordinates = [];
|
var simplifiedFlatCoordinates = [];
|
||||||
var simplifiedEnds = [];
|
var simplifiedEnds = [];
|
||||||
simplifiedFlatCoordinates.length = ol.geom.flat.simplify.douglasPeuckers(
|
simplifiedFlatCoordinates.length = ol.geom.flat.simplify.douglasPeuckers(
|
||||||
@@ -268,8 +265,7 @@ ol.geom.MultiLineString.prototype.intersectsExtent = function(extent) {
|
|||||||
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
||||||
* @api stable
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.geom.MultiLineString.prototype.setCoordinates =
|
ol.geom.MultiLineString.prototype.setCoordinates = function(coordinates, opt_layout) {
|
||||||
function(coordinates, opt_layout) {
|
|
||||||
if (!coordinates) {
|
if (!coordinates) {
|
||||||
this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null, this.ends_);
|
this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null, this.ends_);
|
||||||
} else {
|
} else {
|
||||||
@@ -290,8 +286,7 @@ ol.geom.MultiLineString.prototype.setCoordinates =
|
|||||||
* @param {Array.<number>} flatCoordinates Flat coordinates.
|
* @param {Array.<number>} flatCoordinates Flat coordinates.
|
||||||
* @param {Array.<number>} ends Ends.
|
* @param {Array.<number>} ends Ends.
|
||||||
*/
|
*/
|
||||||
ol.geom.MultiLineString.prototype.setFlatCoordinates =
|
ol.geom.MultiLineString.prototype.setFlatCoordinates = function(layout, flatCoordinates, ends) {
|
||||||
function(layout, flatCoordinates, ends) {
|
|
||||||
if (!flatCoordinates) {
|
if (!flatCoordinates) {
|
||||||
goog.asserts.assert(ends && ends.length === 0,
|
goog.asserts.assert(ends && ends.length === 0,
|
||||||
'ends must be truthy and ends.length should be 0');
|
'ends must be truthy and ends.length should be 0');
|
||||||
|
|||||||
@@ -62,8 +62,7 @@ ol.geom.MultiPoint.prototype.clone = function() {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.geom.MultiPoint.prototype.closestPointXY =
|
ol.geom.MultiPoint.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
|
||||||
function(x, y, closestPoint, minSquaredDistance) {
|
|
||||||
if (minSquaredDistance <
|
if (minSquaredDistance <
|
||||||
ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
|
ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
|
||||||
return minSquaredDistance;
|
return minSquaredDistance;
|
||||||
@@ -173,8 +172,7 @@ ol.geom.MultiPoint.prototype.intersectsExtent = function(extent) {
|
|||||||
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
||||||
* @api stable
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.geom.MultiPoint.prototype.setCoordinates =
|
ol.geom.MultiPoint.prototype.setCoordinates = function(coordinates, opt_layout) {
|
||||||
function(coordinates, opt_layout) {
|
|
||||||
if (!coordinates) {
|
if (!coordinates) {
|
||||||
this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null);
|
this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null);
|
||||||
} else {
|
} else {
|
||||||
@@ -193,8 +191,7 @@ ol.geom.MultiPoint.prototype.setCoordinates =
|
|||||||
* @param {ol.geom.GeometryLayout} layout Layout.
|
* @param {ol.geom.GeometryLayout} layout Layout.
|
||||||
* @param {Array.<number>} flatCoordinates Flat coordinates.
|
* @param {Array.<number>} flatCoordinates Flat coordinates.
|
||||||
*/
|
*/
|
||||||
ol.geom.MultiPoint.prototype.setFlatCoordinates =
|
ol.geom.MultiPoint.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
|
||||||
function(layout, flatCoordinates) {
|
|
||||||
this.setFlatCoordinatesInternal(layout, flatCoordinates);
|
this.setFlatCoordinatesInternal(layout, flatCoordinates);
|
||||||
this.changed();
|
this.changed();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -131,8 +131,7 @@ ol.geom.MultiPolygon.prototype.clone = function() {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.geom.MultiPolygon.prototype.closestPointXY =
|
ol.geom.MultiPolygon.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
|
||||||
function(x, y, closestPoint, minSquaredDistance) {
|
|
||||||
if (minSquaredDistance <
|
if (minSquaredDistance <
|
||||||
ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
|
ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
|
||||||
return minSquaredDistance;
|
return minSquaredDistance;
|
||||||
@@ -257,8 +256,7 @@ ol.geom.MultiPolygon.prototype.getOrientedFlatCoordinates = function() {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.geom.MultiPolygon.prototype.getSimplifiedGeometryInternal =
|
ol.geom.MultiPolygon.prototype.getSimplifiedGeometryInternal = function(squaredTolerance) {
|
||||||
function(squaredTolerance) {
|
|
||||||
var simplifiedFlatCoordinates = [];
|
var simplifiedFlatCoordinates = [];
|
||||||
var simplifiedEndss = [];
|
var simplifiedEndss = [];
|
||||||
simplifiedFlatCoordinates.length = ol.geom.flat.simplify.quantizess(
|
simplifiedFlatCoordinates.length = ol.geom.flat.simplify.quantizess(
|
||||||
@@ -361,8 +359,7 @@ ol.geom.MultiPolygon.prototype.intersectsExtent = function(extent) {
|
|||||||
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
* @param {ol.geom.GeometryLayout=} opt_layout Layout.
|
||||||
* @api stable
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.geom.MultiPolygon.prototype.setCoordinates =
|
ol.geom.MultiPolygon.prototype.setCoordinates = function(coordinates, opt_layout) {
|
||||||
function(coordinates, opt_layout) {
|
|
||||||
if (!coordinates) {
|
if (!coordinates) {
|
||||||
this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null, this.endss_);
|
this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null, this.endss_);
|
||||||
} else {
|
} else {
|
||||||
@@ -389,8 +386,7 @@ ol.geom.MultiPolygon.prototype.setCoordinates =
|
|||||||
* @param {Array.<number>} flatCoordinates Flat coordinates.
|
* @param {Array.<number>} flatCoordinates Flat coordinates.
|
||||||
* @param {Array.<Array.<number>>} endss Endss.
|
* @param {Array.<Array.<number>>} endss Endss.
|
||||||
*/
|
*/
|
||||||
ol.geom.MultiPolygon.prototype.setFlatCoordinates =
|
ol.geom.MultiPolygon.prototype.setFlatCoordinates = function(layout, flatCoordinates, endss) {
|
||||||
function(layout, flatCoordinates, endss) {
|
|
||||||
goog.asserts.assert(endss, 'endss must be truthy');
|
goog.asserts.assert(endss, 'endss must be truthy');
|
||||||
if (!flatCoordinates || flatCoordinates.length === 0) {
|
if (!flatCoordinates || flatCoordinates.length === 0) {
|
||||||
goog.asserts.assert(endss.length === 0, 'the length of endss should be 0');
|
goog.asserts.assert(endss.length === 0, 'the length of endss should be 0');
|
||||||
|
|||||||
@@ -41,8 +41,7 @@ ol.geom.Point.prototype.clone = function() {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.geom.Point.prototype.closestPointXY =
|
ol.geom.Point.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
|
||||||
function(x, y, closestPoint, minSquaredDistance) {
|
|
||||||
var flatCoordinates = this.flatCoordinates;
|
var flatCoordinates = this.flatCoordinates;
|
||||||
var squaredDistance = ol.math.squaredDistance(
|
var squaredDistance = ol.math.squaredDistance(
|
||||||
x, y, flatCoordinates[0], flatCoordinates[1]);
|
x, y, flatCoordinates[0], flatCoordinates[1]);
|
||||||
|
|||||||
@@ -118,8 +118,7 @@ ol.geom.Polygon.prototype.clone = function() {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.geom.Polygon.prototype.closestPointXY =
|
ol.geom.Polygon.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
|
||||||
function(x, y, closestPoint, minSquaredDistance) {
|
|
||||||
if (minSquaredDistance <
|
if (minSquaredDistance <
|
||||||
ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
|
ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
|
||||||
return minSquaredDistance;
|
return minSquaredDistance;
|
||||||
@@ -298,8 +297,7 @@ ol.geom.Polygon.prototype.getOrientedFlatCoordinates = function() {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.geom.Polygon.prototype.getSimplifiedGeometryInternal =
|
ol.geom.Polygon.prototype.getSimplifiedGeometryInternal = function(squaredTolerance) {
|
||||||
function(squaredTolerance) {
|
|
||||||
var simplifiedFlatCoordinates = [];
|
var simplifiedFlatCoordinates = [];
|
||||||
var simplifiedEnds = [];
|
var simplifiedEnds = [];
|
||||||
simplifiedFlatCoordinates.length = ol.geom.flat.simplify.quantizes(
|
simplifiedFlatCoordinates.length = ol.geom.flat.simplify.quantizes(
|
||||||
@@ -359,8 +357,7 @@ ol.geom.Polygon.prototype.setCoordinates = function(coordinates, opt_layout) {
|
|||||||
* @param {Array.<number>} flatCoordinates Flat coordinates.
|
* @param {Array.<number>} flatCoordinates Flat coordinates.
|
||||||
* @param {Array.<number>} ends Ends.
|
* @param {Array.<number>} ends Ends.
|
||||||
*/
|
*/
|
||||||
ol.geom.Polygon.prototype.setFlatCoordinates =
|
ol.geom.Polygon.prototype.setFlatCoordinates = function(layout, flatCoordinates, ends) {
|
||||||
function(layout, flatCoordinates, ends) {
|
|
||||||
if (!flatCoordinates) {
|
if (!flatCoordinates) {
|
||||||
goog.asserts.assert(ends && ends.length === 0,
|
goog.asserts.assert(ends && ends.length === 0,
|
||||||
'ends must be an empty array');
|
'ends must be an empty array');
|
||||||
|
|||||||
@@ -145,8 +145,7 @@ ol.geom.SimpleGeometry.prototype.getLayout = function() {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.geom.SimpleGeometry.prototype.getSimplifiedGeometry =
|
ol.geom.SimpleGeometry.prototype.getSimplifiedGeometry = function(squaredTolerance) {
|
||||||
function(squaredTolerance) {
|
|
||||||
if (this.simplifiedGeometryRevision != this.getRevision()) {
|
if (this.simplifiedGeometryRevision != this.getRevision()) {
|
||||||
goog.object.clear(this.simplifiedGeometryCache);
|
goog.object.clear(this.simplifiedGeometryCache);
|
||||||
this.simplifiedGeometryMaxMinSquaredTolerance = 0;
|
this.simplifiedGeometryMaxMinSquaredTolerance = 0;
|
||||||
@@ -188,8 +187,7 @@ ol.geom.SimpleGeometry.prototype.getSimplifiedGeometry =
|
|||||||
* @return {ol.geom.SimpleGeometry} Simplified geometry.
|
* @return {ol.geom.SimpleGeometry} Simplified geometry.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
ol.geom.SimpleGeometry.prototype.getSimplifiedGeometryInternal =
|
ol.geom.SimpleGeometry.prototype.getSimplifiedGeometryInternal = function(squaredTolerance) {
|
||||||
function(squaredTolerance) {
|
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -207,8 +205,7 @@ ol.geom.SimpleGeometry.prototype.getStride = function() {
|
|||||||
* @param {Array.<number>} flatCoordinates Flat coordinates.
|
* @param {Array.<number>} flatCoordinates Flat coordinates.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
ol.geom.SimpleGeometry.prototype.setFlatCoordinatesInternal =
|
ol.geom.SimpleGeometry.prototype.setFlatCoordinatesInternal = function(layout, flatCoordinates) {
|
||||||
function(layout, flatCoordinates) {
|
|
||||||
this.stride = ol.geom.SimpleGeometry.getStrideForLayout(layout);
|
this.stride = ol.geom.SimpleGeometry.getStrideForLayout(layout);
|
||||||
this.layout = layout;
|
this.layout = layout;
|
||||||
this.flatCoordinates = flatCoordinates;
|
this.flatCoordinates = flatCoordinates;
|
||||||
@@ -228,8 +225,7 @@ ol.geom.SimpleGeometry.prototype.setCoordinates = goog.abstractMethod;
|
|||||||
* @param {number} nesting Nesting.
|
* @param {number} nesting Nesting.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
ol.geom.SimpleGeometry.prototype.setLayout =
|
ol.geom.SimpleGeometry.prototype.setLayout = function(layout, coordinates, nesting) {
|
||||||
function(layout, coordinates, nesting) {
|
|
||||||
/** @type {number} */
|
/** @type {number} */
|
||||||
var stride;
|
var stride;
|
||||||
if (layout) {
|
if (layout) {
|
||||||
@@ -287,8 +283,7 @@ ol.geom.SimpleGeometry.prototype.translate = function(deltaX, deltaY) {
|
|||||||
* @param {Array.<number>=} opt_dest Destination.
|
* @param {Array.<number>=} opt_dest Destination.
|
||||||
* @return {Array.<number>} Transformed flat coordinates.
|
* @return {Array.<number>} Transformed flat coordinates.
|
||||||
*/
|
*/
|
||||||
ol.geom.transformSimpleGeometry2D =
|
ol.geom.transformSimpleGeometry2D = function(simpleGeometry, transform, opt_dest) {
|
||||||
function(simpleGeometry, transform, opt_dest) {
|
|
||||||
var flatCoordinates = simpleGeometry.getFlatCoordinates();
|
var flatCoordinates = simpleGeometry.getFlatCoordinates();
|
||||||
if (!flatCoordinates) {
|
if (!flatCoordinates) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -167,8 +167,7 @@ ol.Graticule.intervals_ = [90, 45, 30, 20, 10, 5, 2, 1, 0.5, 0.2, 0.1, 0.05,
|
|||||||
* @return {number} Index.
|
* @return {number} Index.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.Graticule.prototype.addMeridian_ =
|
ol.Graticule.prototype.addMeridian_ = function(lon, minLat, maxLat, squaredTolerance, extent, index) {
|
||||||
function(lon, minLat, maxLat, squaredTolerance, extent, index) {
|
|
||||||
var lineString = this.getMeridian_(lon, minLat, maxLat,
|
var lineString = this.getMeridian_(lon, minLat, maxLat,
|
||||||
squaredTolerance, index);
|
squaredTolerance, index);
|
||||||
if (ol.extent.intersects(lineString.getExtent(), extent)) {
|
if (ol.extent.intersects(lineString.getExtent(), extent)) {
|
||||||
@@ -188,8 +187,7 @@ ol.Graticule.prototype.addMeridian_ =
|
|||||||
* @return {number} Index.
|
* @return {number} Index.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.Graticule.prototype.addParallel_ =
|
ol.Graticule.prototype.addParallel_ = function(lat, minLon, maxLon, squaredTolerance, extent, index) {
|
||||||
function(lat, minLon, maxLon, squaredTolerance, extent, index) {
|
|
||||||
var lineString = this.getParallel_(lat, minLon, maxLon, squaredTolerance,
|
var lineString = this.getParallel_(lat, minLon, maxLon, squaredTolerance,
|
||||||
index);
|
index);
|
||||||
if (ol.extent.intersects(lineString.getExtent(), extent)) {
|
if (ol.extent.intersects(lineString.getExtent(), extent)) {
|
||||||
@@ -206,8 +204,7 @@ ol.Graticule.prototype.addParallel_ =
|
|||||||
* @param {number} squaredTolerance Squared tolerance.
|
* @param {number} squaredTolerance Squared tolerance.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.Graticule.prototype.createGraticule_ =
|
ol.Graticule.prototype.createGraticule_ = function(extent, center, resolution, squaredTolerance) {
|
||||||
function(extent, center, resolution, squaredTolerance) {
|
|
||||||
|
|
||||||
var interval = this.getInterval_(resolution);
|
var interval = this.getInterval_(resolution);
|
||||||
if (interval == -1) {
|
if (interval == -1) {
|
||||||
|
|||||||
@@ -213,8 +213,7 @@ ol.interaction.DragAndDropEventType = {
|
|||||||
* @param {Array.<ol.Feature>=} opt_features Features.
|
* @param {Array.<ol.Feature>=} opt_features Features.
|
||||||
* @param {ol.proj.Projection=} opt_projection Projection.
|
* @param {ol.proj.Projection=} opt_projection Projection.
|
||||||
*/
|
*/
|
||||||
ol.interaction.DragAndDropEvent =
|
ol.interaction.DragAndDropEvent = function(type, target, file, opt_features, opt_projection) {
|
||||||
function(type, target, file, opt_features, opt_projection) {
|
|
||||||
|
|
||||||
goog.base(this, type, target);
|
goog.base(this, type, target);
|
||||||
|
|
||||||
|
|||||||
@@ -131,8 +131,7 @@ ol.interaction.Interaction.pan = function(map, view, delta, opt_duration) {
|
|||||||
* @param {ol.Coordinate=} opt_anchor Anchor coordinate.
|
* @param {ol.Coordinate=} opt_anchor Anchor coordinate.
|
||||||
* @param {number=} opt_duration Duration.
|
* @param {number=} opt_duration Duration.
|
||||||
*/
|
*/
|
||||||
ol.interaction.Interaction.rotate =
|
ol.interaction.Interaction.rotate = function(map, view, rotation, opt_anchor, opt_duration) {
|
||||||
function(map, view, rotation, opt_anchor, opt_duration) {
|
|
||||||
rotation = view.constrainRotation(rotation, 0);
|
rotation = view.constrainRotation(rotation, 0);
|
||||||
ol.interaction.Interaction.rotateWithoutConstraints(
|
ol.interaction.Interaction.rotateWithoutConstraints(
|
||||||
map, view, rotation, opt_anchor, opt_duration);
|
map, view, rotation, opt_anchor, opt_duration);
|
||||||
@@ -146,8 +145,7 @@ ol.interaction.Interaction.rotate =
|
|||||||
* @param {ol.Coordinate=} opt_anchor Anchor coordinate.
|
* @param {ol.Coordinate=} opt_anchor Anchor coordinate.
|
||||||
* @param {number=} opt_duration Duration.
|
* @param {number=} opt_duration Duration.
|
||||||
*/
|
*/
|
||||||
ol.interaction.Interaction.rotateWithoutConstraints =
|
ol.interaction.Interaction.rotateWithoutConstraints = function(map, view, rotation, opt_anchor, opt_duration) {
|
||||||
function(map, view, rotation, opt_anchor, opt_duration) {
|
|
||||||
if (rotation !== undefined) {
|
if (rotation !== undefined) {
|
||||||
var currentRotation = view.getRotation();
|
var currentRotation = view.getRotation();
|
||||||
var currentCenter = view.getCenter();
|
var currentCenter = view.getCenter();
|
||||||
@@ -186,8 +184,7 @@ ol.interaction.Interaction.rotateWithoutConstraints =
|
|||||||
* will select the nearest resolution. If not defined 0 is
|
* will select the nearest resolution. If not defined 0 is
|
||||||
* assumed.
|
* assumed.
|
||||||
*/
|
*/
|
||||||
ol.interaction.Interaction.zoom =
|
ol.interaction.Interaction.zoom = function(map, view, resolution, opt_anchor, opt_duration, opt_direction) {
|
||||||
function(map, view, resolution, opt_anchor, opt_duration, opt_direction) {
|
|
||||||
resolution = view.constrainResolution(resolution, 0, opt_direction);
|
resolution = view.constrainResolution(resolution, 0, opt_direction);
|
||||||
ol.interaction.Interaction.zoomWithoutConstraints(
|
ol.interaction.Interaction.zoomWithoutConstraints(
|
||||||
map, view, resolution, opt_anchor, opt_duration);
|
map, view, resolution, opt_anchor, opt_duration);
|
||||||
@@ -201,8 +198,7 @@ ol.interaction.Interaction.zoom =
|
|||||||
* @param {ol.Coordinate=} opt_anchor Anchor coordinate.
|
* @param {ol.Coordinate=} opt_anchor Anchor coordinate.
|
||||||
* @param {number=} opt_duration Duration.
|
* @param {number=} opt_duration Duration.
|
||||||
*/
|
*/
|
||||||
ol.interaction.Interaction.zoomByDelta =
|
ol.interaction.Interaction.zoomByDelta = function(map, view, delta, opt_anchor, opt_duration) {
|
||||||
function(map, view, delta, opt_anchor, opt_duration) {
|
|
||||||
var currentResolution = view.getResolution();
|
var currentResolution = view.getResolution();
|
||||||
var resolution = view.constrainResolution(currentResolution, delta, 0);
|
var resolution = view.constrainResolution(currentResolution, delta, 0);
|
||||||
ol.interaction.Interaction.zoomWithoutConstraints(
|
ol.interaction.Interaction.zoomWithoutConstraints(
|
||||||
@@ -217,8 +213,7 @@ ol.interaction.Interaction.zoomByDelta =
|
|||||||
* @param {ol.Coordinate=} opt_anchor Anchor coordinate.
|
* @param {ol.Coordinate=} opt_anchor Anchor coordinate.
|
||||||
* @param {number=} opt_duration Duration.
|
* @param {number=} opt_duration Duration.
|
||||||
*/
|
*/
|
||||||
ol.interaction.Interaction.zoomWithoutConstraints =
|
ol.interaction.Interaction.zoomWithoutConstraints = function(map, view, resolution, opt_anchor, opt_duration) {
|
||||||
function(map, view, resolution, opt_anchor, opt_duration) {
|
|
||||||
if (resolution) {
|
if (resolution) {
|
||||||
var currentResolution = view.getResolution();
|
var currentResolution = view.getResolution();
|
||||||
var currentCenter = view.getCenter();
|
var currentCenter = view.getCenter();
|
||||||
|
|||||||
@@ -359,8 +359,7 @@ ol.interaction.Modify.prototype.handleFeatureRemove_ = function(evt) {
|
|||||||
* @param {ol.geom.Point} geometry Geometry.
|
* @param {ol.geom.Point} geometry Geometry.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.interaction.Modify.prototype.writePointGeometry_ =
|
ol.interaction.Modify.prototype.writePointGeometry_ = function(feature, geometry) {
|
||||||
function(feature, geometry) {
|
|
||||||
var coordinates = geometry.getCoordinates();
|
var coordinates = geometry.getCoordinates();
|
||||||
var segmentData = /** @type {ol.interaction.SegmentDataType} */ ({
|
var segmentData = /** @type {ol.interaction.SegmentDataType} */ ({
|
||||||
feature: feature,
|
feature: feature,
|
||||||
@@ -376,8 +375,7 @@ ol.interaction.Modify.prototype.writePointGeometry_ =
|
|||||||
* @param {ol.geom.MultiPoint} geometry Geometry.
|
* @param {ol.geom.MultiPoint} geometry Geometry.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.interaction.Modify.prototype.writeMultiPointGeometry_ =
|
ol.interaction.Modify.prototype.writeMultiPointGeometry_ = function(feature, geometry) {
|
||||||
function(feature, geometry) {
|
|
||||||
var points = geometry.getCoordinates();
|
var points = geometry.getCoordinates();
|
||||||
var coordinates, i, ii, segmentData;
|
var coordinates, i, ii, segmentData;
|
||||||
for (i = 0, ii = points.length; i < ii; ++i) {
|
for (i = 0, ii = points.length; i < ii; ++i) {
|
||||||
@@ -399,8 +397,7 @@ ol.interaction.Modify.prototype.writeMultiPointGeometry_ =
|
|||||||
* @param {ol.geom.LineString} geometry Geometry.
|
* @param {ol.geom.LineString} geometry Geometry.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.interaction.Modify.prototype.writeLineStringGeometry_ =
|
ol.interaction.Modify.prototype.writeLineStringGeometry_ = function(feature, geometry) {
|
||||||
function(feature, geometry) {
|
|
||||||
var coordinates = geometry.getCoordinates();
|
var coordinates = geometry.getCoordinates();
|
||||||
var i, ii, segment, segmentData;
|
var i, ii, segment, segmentData;
|
||||||
for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
|
for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
|
||||||
@@ -421,8 +418,7 @@ ol.interaction.Modify.prototype.writeLineStringGeometry_ =
|
|||||||
* @param {ol.geom.MultiLineString} geometry Geometry.
|
* @param {ol.geom.MultiLineString} geometry Geometry.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.interaction.Modify.prototype.writeMultiLineStringGeometry_ =
|
ol.interaction.Modify.prototype.writeMultiLineStringGeometry_ = function(feature, geometry) {
|
||||||
function(feature, geometry) {
|
|
||||||
var lines = geometry.getCoordinates();
|
var lines = geometry.getCoordinates();
|
||||||
var coordinates, i, ii, j, jj, segment, segmentData;
|
var coordinates, i, ii, j, jj, segment, segmentData;
|
||||||
for (j = 0, jj = lines.length; j < jj; ++j) {
|
for (j = 0, jj = lines.length; j < jj; ++j) {
|
||||||
@@ -447,8 +443,7 @@ ol.interaction.Modify.prototype.writeMultiLineStringGeometry_ =
|
|||||||
* @param {ol.geom.Polygon} geometry Geometry.
|
* @param {ol.geom.Polygon} geometry Geometry.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.interaction.Modify.prototype.writePolygonGeometry_ =
|
ol.interaction.Modify.prototype.writePolygonGeometry_ = function(feature, geometry) {
|
||||||
function(feature, geometry) {
|
|
||||||
var rings = geometry.getCoordinates();
|
var rings = geometry.getCoordinates();
|
||||||
var coordinates, i, ii, j, jj, segment, segmentData;
|
var coordinates, i, ii, j, jj, segment, segmentData;
|
||||||
for (j = 0, jj = rings.length; j < jj; ++j) {
|
for (j = 0, jj = rings.length; j < jj; ++j) {
|
||||||
@@ -473,8 +468,7 @@ ol.interaction.Modify.prototype.writePolygonGeometry_ =
|
|||||||
* @param {ol.geom.MultiPolygon} geometry Geometry.
|
* @param {ol.geom.MultiPolygon} geometry Geometry.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.interaction.Modify.prototype.writeMultiPolygonGeometry_ =
|
ol.interaction.Modify.prototype.writeMultiPolygonGeometry_ = function(feature, geometry) {
|
||||||
function(feature, geometry) {
|
|
||||||
var polygons = geometry.getCoordinates();
|
var polygons = geometry.getCoordinates();
|
||||||
var coordinates, i, ii, j, jj, k, kk, rings, segment, segmentData;
|
var coordinates, i, ii, j, jj, k, kk, rings, segment, segmentData;
|
||||||
for (k = 0, kk = polygons.length; k < kk; ++k) {
|
for (k = 0, kk = polygons.length; k < kk; ++k) {
|
||||||
@@ -502,8 +496,7 @@ ol.interaction.Modify.prototype.writeMultiPolygonGeometry_ =
|
|||||||
* @param {ol.geom.GeometryCollection} geometry Geometry.
|
* @param {ol.geom.GeometryCollection} geometry Geometry.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.interaction.Modify.prototype.writeGeometryCollectionGeometry_ =
|
ol.interaction.Modify.prototype.writeGeometryCollectionGeometry_ = function(feature, geometry) {
|
||||||
function(feature, geometry) {
|
|
||||||
var i, geometries = geometry.getGeometriesArray();
|
var i, geometries = geometry.getGeometriesArray();
|
||||||
for (i = 0; i < geometries.length; ++i) {
|
for (i = 0; i < geometries.length; ++i) {
|
||||||
this.SEGMENT_WRITERS_[geometries[i].getType()].call(
|
this.SEGMENT_WRITERS_[geometries[i].getType()].call(
|
||||||
@@ -517,8 +510,7 @@ ol.interaction.Modify.prototype.writeGeometryCollectionGeometry_ =
|
|||||||
* @return {ol.Feature} Vertex feature.
|
* @return {ol.Feature} Vertex feature.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.interaction.Modify.prototype.createOrUpdateVertexFeature_ =
|
ol.interaction.Modify.prototype.createOrUpdateVertexFeature_ = function(coordinates) {
|
||||||
function(coordinates) {
|
|
||||||
var vertexFeature = this.vertexFeature_;
|
var vertexFeature = this.vertexFeature_;
|
||||||
if (!vertexFeature) {
|
if (!vertexFeature) {
|
||||||
vertexFeature = new ol.Feature(new ol.geom.Point(coordinates));
|
vertexFeature = new ol.Feature(new ol.geom.Point(coordinates));
|
||||||
@@ -990,8 +982,7 @@ ol.interaction.Modify.prototype.removeVertex_ = function() {
|
|||||||
* @param {Array} coordinates Coordinates.
|
* @param {Array} coordinates Coordinates.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.interaction.Modify.prototype.setGeometryCoordinates_ =
|
ol.interaction.Modify.prototype.setGeometryCoordinates_ = function(geometry, coordinates) {
|
||||||
function(geometry, coordinates) {
|
|
||||||
this.changingFeature_ = true;
|
this.changingFeature_ = true;
|
||||||
geometry.setCoordinates(coordinates);
|
geometry.setCoordinates(coordinates);
|
||||||
this.changingFeature_ = false;
|
this.changingFeature_ = false;
|
||||||
|
|||||||
@@ -108,8 +108,7 @@ ol.interaction.Pointer.centroid = function(pointerEvents) {
|
|||||||
* or pointerup event.
|
* or pointerup event.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.interaction.Pointer.prototype.isPointerDraggingEvent_ =
|
ol.interaction.Pointer.prototype.isPointerDraggingEvent_ = function(mapBrowserEvent) {
|
||||||
function(mapBrowserEvent) {
|
|
||||||
var type = mapBrowserEvent.type;
|
var type = mapBrowserEvent.type;
|
||||||
return (
|
return (
|
||||||
type === ol.MapBrowserEvent.EventType.POINTERDOWN ||
|
type === ol.MapBrowserEvent.EventType.POINTERDOWN ||
|
||||||
@@ -122,8 +121,7 @@ ol.interaction.Pointer.prototype.isPointerDraggingEvent_ =
|
|||||||
* @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
|
* @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.interaction.Pointer.prototype.updateTrackedPointers_ =
|
ol.interaction.Pointer.prototype.updateTrackedPointers_ = function(mapBrowserEvent) {
|
||||||
function(mapBrowserEvent) {
|
|
||||||
if (this.isPointerDraggingEvent_(mapBrowserEvent)) {
|
if (this.isPointerDraggingEvent_(mapBrowserEvent)) {
|
||||||
var event = mapBrowserEvent.pointerEvent;
|
var event = mapBrowserEvent.pointerEvent;
|
||||||
|
|
||||||
|
|||||||
@@ -58,8 +58,7 @@ ol.interaction.SelectFilterFunction;
|
|||||||
* @extends {goog.events.Event}
|
* @extends {goog.events.Event}
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
ol.interaction.SelectEvent =
|
ol.interaction.SelectEvent = function(type, selected, deselected, mapBrowserEvent) {
|
||||||
function(type, selected, deselected, mapBrowserEvent) {
|
|
||||||
goog.base(this, type);
|
goog.base(this, type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -175,23 +174,21 @@ ol.interaction.Select = function(opt_options) {
|
|||||||
var layerFilter;
|
var layerFilter;
|
||||||
if (options.layers) {
|
if (options.layers) {
|
||||||
if (goog.isFunction(options.layers)) {
|
if (goog.isFunction(options.layers)) {
|
||||||
layerFilter =
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.layer.Layer} layer Layer.
|
* @param {ol.layer.Layer} layer Layer.
|
||||||
* @return {boolean} Include.
|
* @return {boolean} Include.
|
||||||
*/
|
*/
|
||||||
function(layer) {
|
layerFilter = function(layer) {
|
||||||
goog.asserts.assertFunction(options.layers);
|
goog.asserts.assertFunction(options.layers);
|
||||||
return layer === featureOverlay || options.layers(layer);
|
return layer === featureOverlay || options.layers(layer);
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
var layers = options.layers;
|
var layers = options.layers;
|
||||||
layerFilter =
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.layer.Layer} layer Layer.
|
* @param {ol.layer.Layer} layer Layer.
|
||||||
* @return {boolean} Include.
|
* @return {boolean} Include.
|
||||||
*/
|
*/
|
||||||
function(layer) {
|
layerFilter = function(layer) {
|
||||||
return layer === featureOverlay || ol.array.includes(layers, layer);
|
return layer === featureOverlay || ol.array.includes(layers, layer);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -228,8 +225,7 @@ goog.inherits(ol.interaction.Select, ol.interaction.Interaction);
|
|||||||
* @param {ol.layer.Layer} layer Layer.
|
* @param {ol.layer.Layer} layer Layer.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.interaction.Select.prototype.addFeatureLayerAssociation_ =
|
ol.interaction.Select.prototype.addFeatureLayerAssociation_ = function(feature, layer) {
|
||||||
function(feature, layer) {
|
|
||||||
var key = goog.getUid(feature);
|
var key = goog.getUid(feature);
|
||||||
this.featureLayerAssociation_[key] = layer;
|
this.featureLayerAssociation_[key] = layer;
|
||||||
};
|
};
|
||||||
@@ -433,8 +429,7 @@ ol.interaction.Select.prototype.removeFeature_ = function(evt) {
|
|||||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.interaction.Select.prototype.removeFeatureLayerAssociation_ =
|
ol.interaction.Select.prototype.removeFeatureLayerAssociation_ = function(feature) {
|
||||||
function(feature) {
|
|
||||||
var key = goog.getUid(feature);
|
var key = goog.getUid(feature);
|
||||||
delete this.featureLayerAssociation_[key];
|
delete this.featureLayerAssociation_[key];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -416,8 +416,7 @@ ol.interaction.Snap.prototype.updateFeature_ = function(feature) {
|
|||||||
* @param {ol.geom.GeometryCollection} geometry Geometry.
|
* @param {ol.geom.GeometryCollection} geometry Geometry.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.interaction.Snap.prototype.writeGeometryCollectionGeometry_ =
|
ol.interaction.Snap.prototype.writeGeometryCollectionGeometry_ = function(feature, geometry) {
|
||||||
function(feature, geometry) {
|
|
||||||
var i, geometries = geometry.getGeometriesArray();
|
var i, geometries = geometry.getGeometriesArray();
|
||||||
for (i = 0; i < geometries.length; ++i) {
|
for (i = 0; i < geometries.length; ++i) {
|
||||||
this.SEGMENT_WRITERS_[geometries[i].getType()].call(
|
this.SEGMENT_WRITERS_[geometries[i].getType()].call(
|
||||||
@@ -431,8 +430,7 @@ ol.interaction.Snap.prototype.writeGeometryCollectionGeometry_ =
|
|||||||
* @param {ol.geom.LineString} geometry Geometry.
|
* @param {ol.geom.LineString} geometry Geometry.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.interaction.Snap.prototype.writeLineStringGeometry_ =
|
ol.interaction.Snap.prototype.writeLineStringGeometry_ = function(feature, geometry) {
|
||||||
function(feature, geometry) {
|
|
||||||
var coordinates = geometry.getCoordinates();
|
var coordinates = geometry.getCoordinates();
|
||||||
var i, ii, segment, segmentData;
|
var i, ii, segment, segmentData;
|
||||||
for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
|
for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
|
||||||
@@ -451,8 +449,7 @@ ol.interaction.Snap.prototype.writeLineStringGeometry_ =
|
|||||||
* @param {ol.geom.MultiLineString} geometry Geometry.
|
* @param {ol.geom.MultiLineString} geometry Geometry.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.interaction.Snap.prototype.writeMultiLineStringGeometry_ =
|
ol.interaction.Snap.prototype.writeMultiLineStringGeometry_ = function(feature, geometry) {
|
||||||
function(feature, geometry) {
|
|
||||||
var lines = geometry.getCoordinates();
|
var lines = geometry.getCoordinates();
|
||||||
var coordinates, i, ii, j, jj, segment, segmentData;
|
var coordinates, i, ii, j, jj, segment, segmentData;
|
||||||
for (j = 0, jj = lines.length; j < jj; ++j) {
|
for (j = 0, jj = lines.length; j < jj; ++j) {
|
||||||
@@ -474,8 +471,7 @@ ol.interaction.Snap.prototype.writeMultiLineStringGeometry_ =
|
|||||||
* @param {ol.geom.MultiPoint} geometry Geometry.
|
* @param {ol.geom.MultiPoint} geometry Geometry.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.interaction.Snap.prototype.writeMultiPointGeometry_ =
|
ol.interaction.Snap.prototype.writeMultiPointGeometry_ = function(feature, geometry) {
|
||||||
function(feature, geometry) {
|
|
||||||
var points = geometry.getCoordinates();
|
var points = geometry.getCoordinates();
|
||||||
var coordinates, i, ii, segmentData;
|
var coordinates, i, ii, segmentData;
|
||||||
for (i = 0, ii = points.length; i < ii; ++i) {
|
for (i = 0, ii = points.length; i < ii; ++i) {
|
||||||
@@ -494,8 +490,7 @@ ol.interaction.Snap.prototype.writeMultiPointGeometry_ =
|
|||||||
* @param {ol.geom.MultiPolygon} geometry Geometry.
|
* @param {ol.geom.MultiPolygon} geometry Geometry.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.interaction.Snap.prototype.writeMultiPolygonGeometry_ =
|
ol.interaction.Snap.prototype.writeMultiPolygonGeometry_ = function(feature, geometry) {
|
||||||
function(feature, geometry) {
|
|
||||||
var polygons = geometry.getCoordinates();
|
var polygons = geometry.getCoordinates();
|
||||||
var coordinates, i, ii, j, jj, k, kk, rings, segment, segmentData;
|
var coordinates, i, ii, j, jj, k, kk, rings, segment, segmentData;
|
||||||
for (k = 0, kk = polygons.length; k < kk; ++k) {
|
for (k = 0, kk = polygons.length; k < kk; ++k) {
|
||||||
@@ -520,8 +515,7 @@ ol.interaction.Snap.prototype.writeMultiPolygonGeometry_ =
|
|||||||
* @param {ol.geom.Point} geometry Geometry.
|
* @param {ol.geom.Point} geometry Geometry.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.interaction.Snap.prototype.writePointGeometry_ =
|
ol.interaction.Snap.prototype.writePointGeometry_ = function(feature, geometry) {
|
||||||
function(feature, geometry) {
|
|
||||||
var coordinates = geometry.getCoordinates();
|
var coordinates = geometry.getCoordinates();
|
||||||
var segmentData = /** @type {ol.interaction.Snap.SegmentDataType} */ ({
|
var segmentData = /** @type {ol.interaction.Snap.SegmentDataType} */ ({
|
||||||
feature: feature,
|
feature: feature,
|
||||||
@@ -536,8 +530,7 @@ ol.interaction.Snap.prototype.writePointGeometry_ =
|
|||||||
* @param {ol.geom.Polygon} geometry Geometry.
|
* @param {ol.geom.Polygon} geometry Geometry.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.interaction.Snap.prototype.writePolygonGeometry_ =
|
ol.interaction.Snap.prototype.writePolygonGeometry_ = function(feature, geometry) {
|
||||||
function(feature, geometry) {
|
|
||||||
var rings = geometry.getCoordinates();
|
var rings = geometry.getCoordinates();
|
||||||
var coordinates, i, ii, j, jj, segment, segmentData;
|
var coordinates, i, ii, j, jj, segment, segmentData;
|
||||||
for (j = 0, jj = rings.length; j < jj; ++j) {
|
for (j = 0, jj = rings.length; j < jj; ++j) {
|
||||||
|
|||||||
@@ -94,8 +94,7 @@ ol.layer.Tile.prototype.getUseInterimTilesOnError = function() {
|
|||||||
* @observable
|
* @observable
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.layer.Tile.prototype.setUseInterimTilesOnError =
|
ol.layer.Tile.prototype.setUseInterimTilesOnError = function(useInterimTilesOnError) {
|
||||||
function(useInterimTilesOnError) {
|
|
||||||
this.set(
|
this.set(
|
||||||
ol.layer.TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);
|
ol.layer.TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -92,8 +92,7 @@ ol.layer.VectorTile.prototype.setPreload = function(preload) {
|
|||||||
* @observable
|
* @observable
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.layer.VectorTile.prototype.setUseInterimTilesOnError =
|
ol.layer.VectorTile.prototype.setUseInterimTilesOnError = function(useInterimTilesOnError) {
|
||||||
function(useInterimTilesOnError) {
|
|
||||||
this.set(
|
this.set(
|
||||||
ol.layer.TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);
|
ol.layer.TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -615,8 +615,7 @@ ol.Map.prototype.disposeInternal = function() {
|
|||||||
* @template S,T,U
|
* @template S,T,U
|
||||||
* @api stable
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.Map.prototype.forEachFeatureAtPixel =
|
ol.Map.prototype.forEachFeatureAtPixel = function(pixel, callback, opt_this, opt_layerFilter, opt_this2) {
|
||||||
function(pixel, callback, opt_this, opt_layerFilter, opt_this2) {
|
|
||||||
if (!this.frameState_) {
|
if (!this.frameState_) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -653,8 +652,7 @@ ol.Map.prototype.forEachFeatureAtPixel =
|
|||||||
* @template S,T,U
|
* @template S,T,U
|
||||||
* @api stable
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.Map.prototype.forEachLayerAtPixel =
|
ol.Map.prototype.forEachLayerAtPixel = function(pixel, callback, opt_this, opt_layerFilter, opt_this2) {
|
||||||
function(pixel, callback, opt_this, opt_layerFilter, opt_this2) {
|
|
||||||
if (!this.frameState_) {
|
if (!this.frameState_) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -683,8 +681,7 @@ ol.Map.prototype.forEachLayerAtPixel =
|
|||||||
* @template U
|
* @template U
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.Map.prototype.hasFeatureAtPixel =
|
ol.Map.prototype.hasFeatureAtPixel = function(pixel, opt_layerFilter, opt_this) {
|
||||||
function(pixel, opt_layerFilter, opt_this) {
|
|
||||||
if (!this.frameState_) {
|
if (!this.frameState_) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -928,8 +925,7 @@ ol.Map.prototype.getOverlayContainerStopEvent = function() {
|
|||||||
* @param {number} tileResolution Tile resolution.
|
* @param {number} tileResolution Tile resolution.
|
||||||
* @return {number} Tile priority.
|
* @return {number} Tile priority.
|
||||||
*/
|
*/
|
||||||
ol.Map.prototype.getTilePriority =
|
ol.Map.prototype.getTilePriority = function(tile, tileSourceKey, tileCenter, tileResolution) {
|
||||||
function(tile, tileSourceKey, tileCenter, tileResolution) {
|
|
||||||
// Filter out tiles at higher zoom levels than the current zoom level, or that
|
// Filter out tiles at higher zoom levels than the current zoom level, or that
|
||||||
// are outside the visible extent.
|
// are outside the visible extent.
|
||||||
var frameState = this.frameState_;
|
var frameState = this.frameState_;
|
||||||
|
|||||||
@@ -255,8 +255,7 @@ ol.MapBrowserEventHandler.prototype.emulateClick_ = function(pointerEvent) {
|
|||||||
* @param {ol.pointer.PointerEvent} pointerEvent Pointer event.
|
* @param {ol.pointer.PointerEvent} pointerEvent Pointer event.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.MapBrowserEventHandler.prototype.updateActivePointers_ =
|
ol.MapBrowserEventHandler.prototype.updateActivePointers_ = function(pointerEvent) {
|
||||||
function(pointerEvent) {
|
|
||||||
var event = pointerEvent;
|
var event = pointerEvent;
|
||||||
|
|
||||||
if (event.type == ol.MapBrowserEvent.EventType.POINTERUP ||
|
if (event.type == ol.MapBrowserEvent.EventType.POINTERUP ||
|
||||||
@@ -306,8 +305,7 @@ ol.MapBrowserEventHandler.prototype.handlePointerUp_ = function(pointerEvent) {
|
|||||||
* @return {boolean} If the left mouse button was pressed.
|
* @return {boolean} If the left mouse button was pressed.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.MapBrowserEventHandler.prototype.isMouseActionButton_ =
|
ol.MapBrowserEventHandler.prototype.isMouseActionButton_ = function(pointerEvent) {
|
||||||
function(pointerEvent) {
|
|
||||||
return pointerEvent.button === 0;
|
return pointerEvent.button === 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -316,8 +314,7 @@ ol.MapBrowserEventHandler.prototype.isMouseActionButton_ =
|
|||||||
* @param {ol.pointer.PointerEvent} pointerEvent Pointer event.
|
* @param {ol.pointer.PointerEvent} pointerEvent Pointer event.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.MapBrowserEventHandler.prototype.handlePointerDown_ =
|
ol.MapBrowserEventHandler.prototype.handlePointerDown_ = function(pointerEvent) {
|
||||||
function(pointerEvent) {
|
|
||||||
this.updateActivePointers_(pointerEvent);
|
this.updateActivePointers_(pointerEvent);
|
||||||
var newEvent = new ol.MapBrowserPointerEvent(
|
var newEvent = new ol.MapBrowserPointerEvent(
|
||||||
ol.MapBrowserEvent.EventType.POINTERDOWN, this.map_, pointerEvent);
|
ol.MapBrowserEvent.EventType.POINTERDOWN, this.map_, pointerEvent);
|
||||||
@@ -365,8 +362,7 @@ ol.MapBrowserEventHandler.prototype.handlePointerDown_ =
|
|||||||
* @param {ol.pointer.PointerEvent} pointerEvent Pointer event.
|
* @param {ol.pointer.PointerEvent} pointerEvent Pointer event.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.MapBrowserEventHandler.prototype.handlePointerMove_ =
|
ol.MapBrowserEventHandler.prototype.handlePointerMove_ = function(pointerEvent) {
|
||||||
function(pointerEvent) {
|
|
||||||
// Fix IE10 on windows Surface : When you tap the tablet, it triggers
|
// Fix IE10 on windows Surface : When you tap the tablet, it triggers
|
||||||
// multiple pointermove events between pointerdown and pointerup with
|
// multiple pointermove events between pointerdown and pointerup with
|
||||||
// the exact same coordinates of the pointerdown event. To avoid a
|
// the exact same coordinates of the pointerdown event. To avoid a
|
||||||
|
|||||||
@@ -111,8 +111,7 @@ ol.pointer.MouseSource.DEDUP_DIST = 25;
|
|||||||
* @param {goog.events.BrowserEvent} inEvent The in event.
|
* @param {goog.events.BrowserEvent} inEvent The in event.
|
||||||
* @return {boolean} True, if the event was generated by a touch.
|
* @return {boolean} True, if the event was generated by a touch.
|
||||||
*/
|
*/
|
||||||
ol.pointer.MouseSource.prototype.isEventSimulatedFromTouch_ =
|
ol.pointer.MouseSource.prototype.isEventSimulatedFromTouch_ = function(inEvent) {
|
||||||
function(inEvent) {
|
|
||||||
var lts = this.lastTouches;
|
var lts = this.lastTouches;
|
||||||
var x = inEvent.clientX, y = inEvent.clientY;
|
var x = inEvent.clientX, y = inEvent.clientY;
|
||||||
for (var i = 0, l = lts.length, t; i < l && (t = lts[i]); i++) {
|
for (var i = 0, l = lts.length, t; i < l && (t = lts[i]); i++) {
|
||||||
|
|||||||
@@ -112,8 +112,7 @@ ol.pointer.PointerEventHandler.prototype.registerSources = function() {
|
|||||||
* @param {string} name A name for the event source
|
* @param {string} name A name for the event source
|
||||||
* @param {ol.pointer.EventSource} source The source event.
|
* @param {ol.pointer.EventSource} source The source event.
|
||||||
*/
|
*/
|
||||||
ol.pointer.PointerEventHandler.prototype.registerSource =
|
ol.pointer.PointerEventHandler.prototype.registerSource = function(name, source) {
|
||||||
function(name, source) {
|
|
||||||
var s = source;
|
var s = source;
|
||||||
var newEvents = s.getEvents();
|
var newEvents = s.getEvents();
|
||||||
|
|
||||||
@@ -207,8 +206,7 @@ ol.pointer.PointerEventHandler.prototype.removeEvents_ = function(events) {
|
|||||||
* @return {Object} An object containing shallow copies of
|
* @return {Object} An object containing shallow copies of
|
||||||
* `inEvent`'s properties.
|
* `inEvent`'s properties.
|
||||||
*/
|
*/
|
||||||
ol.pointer.PointerEventHandler.prototype.cloneEvent =
|
ol.pointer.PointerEventHandler.prototype.cloneEvent = function(browserEvent, inEvent) {
|
||||||
function(browserEvent, inEvent) {
|
|
||||||
var eventCopy = {}, p;
|
var eventCopy = {}, p;
|
||||||
for (var i = 0, ii = ol.pointer.CLONE_PROPS.length; i < ii; i++) {
|
for (var i = 0, ii = ol.pointer.CLONE_PROPS.length; i < ii; i++) {
|
||||||
p = ol.pointer.CLONE_PROPS[i][0];
|
p = ol.pointer.CLONE_PROPS[i][0];
|
||||||
@@ -230,8 +228,7 @@ ol.pointer.PointerEventHandler.prototype.cloneEvent =
|
|||||||
* @param {Object} pointerEventData Pointer event data.
|
* @param {Object} pointerEventData Pointer event data.
|
||||||
* @param {goog.events.BrowserEvent} browserEvent The event.
|
* @param {goog.events.BrowserEvent} browserEvent The event.
|
||||||
*/
|
*/
|
||||||
ol.pointer.PointerEventHandler.prototype.down =
|
ol.pointer.PointerEventHandler.prototype.down = function(pointerEventData, browserEvent) {
|
||||||
function(pointerEventData, browserEvent) {
|
|
||||||
this.fireEvent(ol.pointer.EventType.POINTERDOWN,
|
this.fireEvent(ol.pointer.EventType.POINTERDOWN,
|
||||||
pointerEventData, browserEvent);
|
pointerEventData, browserEvent);
|
||||||
};
|
};
|
||||||
@@ -242,8 +239,7 @@ ol.pointer.PointerEventHandler.prototype.down =
|
|||||||
* @param {Object} pointerEventData Pointer event data.
|
* @param {Object} pointerEventData Pointer event data.
|
||||||
* @param {goog.events.BrowserEvent} browserEvent The event.
|
* @param {goog.events.BrowserEvent} browserEvent The event.
|
||||||
*/
|
*/
|
||||||
ol.pointer.PointerEventHandler.prototype.move =
|
ol.pointer.PointerEventHandler.prototype.move = function(pointerEventData, browserEvent) {
|
||||||
function(pointerEventData, browserEvent) {
|
|
||||||
this.fireEvent(ol.pointer.EventType.POINTERMOVE,
|
this.fireEvent(ol.pointer.EventType.POINTERMOVE,
|
||||||
pointerEventData, browserEvent);
|
pointerEventData, browserEvent);
|
||||||
};
|
};
|
||||||
@@ -254,8 +250,7 @@ ol.pointer.PointerEventHandler.prototype.move =
|
|||||||
* @param {Object} pointerEventData Pointer event data.
|
* @param {Object} pointerEventData Pointer event data.
|
||||||
* @param {goog.events.BrowserEvent} browserEvent The event.
|
* @param {goog.events.BrowserEvent} browserEvent The event.
|
||||||
*/
|
*/
|
||||||
ol.pointer.PointerEventHandler.prototype.up =
|
ol.pointer.PointerEventHandler.prototype.up = function(pointerEventData, browserEvent) {
|
||||||
function(pointerEventData, browserEvent) {
|
|
||||||
this.fireEvent(ol.pointer.EventType.POINTERUP,
|
this.fireEvent(ol.pointer.EventType.POINTERUP,
|
||||||
pointerEventData, browserEvent);
|
pointerEventData, browserEvent);
|
||||||
};
|
};
|
||||||
@@ -266,8 +261,7 @@ ol.pointer.PointerEventHandler.prototype.up =
|
|||||||
* @param {Object} pointerEventData Pointer event data.
|
* @param {Object} pointerEventData Pointer event data.
|
||||||
* @param {goog.events.BrowserEvent} browserEvent The event.
|
* @param {goog.events.BrowserEvent} browserEvent The event.
|
||||||
*/
|
*/
|
||||||
ol.pointer.PointerEventHandler.prototype.enter =
|
ol.pointer.PointerEventHandler.prototype.enter = function(pointerEventData, browserEvent) {
|
||||||
function(pointerEventData, browserEvent) {
|
|
||||||
pointerEventData.bubbles = false;
|
pointerEventData.bubbles = false;
|
||||||
this.fireEvent(ol.pointer.EventType.POINTERENTER,
|
this.fireEvent(ol.pointer.EventType.POINTERENTER,
|
||||||
pointerEventData, browserEvent);
|
pointerEventData, browserEvent);
|
||||||
@@ -279,8 +273,7 @@ ol.pointer.PointerEventHandler.prototype.enter =
|
|||||||
* @param {Object} pointerEventData Pointer event data.
|
* @param {Object} pointerEventData Pointer event data.
|
||||||
* @param {goog.events.BrowserEvent} browserEvent The event.
|
* @param {goog.events.BrowserEvent} browserEvent The event.
|
||||||
*/
|
*/
|
||||||
ol.pointer.PointerEventHandler.prototype.leave =
|
ol.pointer.PointerEventHandler.prototype.leave = function(pointerEventData, browserEvent) {
|
||||||
function(pointerEventData, browserEvent) {
|
|
||||||
pointerEventData.bubbles = false;
|
pointerEventData.bubbles = false;
|
||||||
this.fireEvent(ol.pointer.EventType.POINTERLEAVE,
|
this.fireEvent(ol.pointer.EventType.POINTERLEAVE,
|
||||||
pointerEventData, browserEvent);
|
pointerEventData, browserEvent);
|
||||||
@@ -292,8 +285,7 @@ ol.pointer.PointerEventHandler.prototype.leave =
|
|||||||
* @param {Object} pointerEventData Pointer event data.
|
* @param {Object} pointerEventData Pointer event data.
|
||||||
* @param {goog.events.BrowserEvent} browserEvent The event.
|
* @param {goog.events.BrowserEvent} browserEvent The event.
|
||||||
*/
|
*/
|
||||||
ol.pointer.PointerEventHandler.prototype.over =
|
ol.pointer.PointerEventHandler.prototype.over = function(pointerEventData, browserEvent) {
|
||||||
function(pointerEventData, browserEvent) {
|
|
||||||
pointerEventData.bubbles = true;
|
pointerEventData.bubbles = true;
|
||||||
this.fireEvent(ol.pointer.EventType.POINTEROVER,
|
this.fireEvent(ol.pointer.EventType.POINTEROVER,
|
||||||
pointerEventData, browserEvent);
|
pointerEventData, browserEvent);
|
||||||
@@ -305,8 +297,7 @@ ol.pointer.PointerEventHandler.prototype.over =
|
|||||||
* @param {Object} pointerEventData Pointer event data.
|
* @param {Object} pointerEventData Pointer event data.
|
||||||
* @param {goog.events.BrowserEvent} browserEvent The event.
|
* @param {goog.events.BrowserEvent} browserEvent The event.
|
||||||
*/
|
*/
|
||||||
ol.pointer.PointerEventHandler.prototype.out =
|
ol.pointer.PointerEventHandler.prototype.out = function(pointerEventData, browserEvent) {
|
||||||
function(pointerEventData, browserEvent) {
|
|
||||||
pointerEventData.bubbles = true;
|
pointerEventData.bubbles = true;
|
||||||
this.fireEvent(ol.pointer.EventType.POINTEROUT,
|
this.fireEvent(ol.pointer.EventType.POINTEROUT,
|
||||||
pointerEventData, browserEvent);
|
pointerEventData, browserEvent);
|
||||||
@@ -318,8 +309,7 @@ ol.pointer.PointerEventHandler.prototype.out =
|
|||||||
* @param {Object} pointerEventData Pointer event data.
|
* @param {Object} pointerEventData Pointer event data.
|
||||||
* @param {goog.events.BrowserEvent} browserEvent The event.
|
* @param {goog.events.BrowserEvent} browserEvent The event.
|
||||||
*/
|
*/
|
||||||
ol.pointer.PointerEventHandler.prototype.cancel =
|
ol.pointer.PointerEventHandler.prototype.cancel = function(pointerEventData, browserEvent) {
|
||||||
function(pointerEventData, browserEvent) {
|
|
||||||
this.fireEvent(ol.pointer.EventType.POINTERCANCEL,
|
this.fireEvent(ol.pointer.EventType.POINTERCANCEL,
|
||||||
pointerEventData, browserEvent);
|
pointerEventData, browserEvent);
|
||||||
};
|
};
|
||||||
@@ -330,8 +320,7 @@ ol.pointer.PointerEventHandler.prototype.cancel =
|
|||||||
* @param {Object} pointerEventData Pointer event data.
|
* @param {Object} pointerEventData Pointer event data.
|
||||||
* @param {goog.events.BrowserEvent} browserEvent The event.
|
* @param {goog.events.BrowserEvent} browserEvent The event.
|
||||||
*/
|
*/
|
||||||
ol.pointer.PointerEventHandler.prototype.leaveOut =
|
ol.pointer.PointerEventHandler.prototype.leaveOut = function(pointerEventData, browserEvent) {
|
||||||
function(pointerEventData, browserEvent) {
|
|
||||||
this.out(pointerEventData, browserEvent);
|
this.out(pointerEventData, browserEvent);
|
||||||
if (!this.contains_(
|
if (!this.contains_(
|
||||||
pointerEventData.target,
|
pointerEventData.target,
|
||||||
@@ -346,8 +335,7 @@ ol.pointer.PointerEventHandler.prototype.leaveOut =
|
|||||||
* @param {Object} pointerEventData Pointer event data.
|
* @param {Object} pointerEventData Pointer event data.
|
||||||
* @param {goog.events.BrowserEvent} browserEvent The event.
|
* @param {goog.events.BrowserEvent} browserEvent The event.
|
||||||
*/
|
*/
|
||||||
ol.pointer.PointerEventHandler.prototype.enterOver =
|
ol.pointer.PointerEventHandler.prototype.enterOver = function(pointerEventData, browserEvent) {
|
||||||
function(pointerEventData, browserEvent) {
|
|
||||||
this.over(pointerEventData, browserEvent);
|
this.over(pointerEventData, browserEvent);
|
||||||
if (!this.contains_(
|
if (!this.contains_(
|
||||||
pointerEventData.target,
|
pointerEventData.target,
|
||||||
@@ -364,8 +352,7 @@ ol.pointer.PointerEventHandler.prototype.enterOver =
|
|||||||
* @return {boolean} Returns true if the container element
|
* @return {boolean} Returns true if the container element
|
||||||
* contains the other element.
|
* contains the other element.
|
||||||
*/
|
*/
|
||||||
ol.pointer.PointerEventHandler.prototype.contains_ =
|
ol.pointer.PointerEventHandler.prototype.contains_ = function(container, contained) {
|
||||||
function(container, contained) {
|
|
||||||
if (!contained) {
|
if (!contained) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -383,8 +370,7 @@ ol.pointer.PointerEventHandler.prototype.contains_ =
|
|||||||
* @param {goog.events.BrowserEvent} browserEvent The event.
|
* @param {goog.events.BrowserEvent} browserEvent The event.
|
||||||
* @return {ol.pointer.PointerEvent} A PointerEvent of type `inType`.
|
* @return {ol.pointer.PointerEvent} A PointerEvent of type `inType`.
|
||||||
*/
|
*/
|
||||||
ol.pointer.PointerEventHandler.prototype.makeEvent =
|
ol.pointer.PointerEventHandler.prototype.makeEvent = function(inType, pointerEventData, browserEvent) {
|
||||||
function(inType, pointerEventData, browserEvent) {
|
|
||||||
return new ol.pointer.PointerEvent(inType, browserEvent, pointerEventData);
|
return new ol.pointer.PointerEvent(inType, browserEvent, pointerEventData);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -395,8 +381,7 @@ ol.pointer.PointerEventHandler.prototype.makeEvent =
|
|||||||
* @param {Object} pointerEventData Pointer event data.
|
* @param {Object} pointerEventData Pointer event data.
|
||||||
* @param {goog.events.BrowserEvent} browserEvent The event.
|
* @param {goog.events.BrowserEvent} browserEvent The event.
|
||||||
*/
|
*/
|
||||||
ol.pointer.PointerEventHandler.prototype.fireEvent =
|
ol.pointer.PointerEventHandler.prototype.fireEvent = function(inType, pointerEventData, browserEvent) {
|
||||||
function(inType, pointerEventData, browserEvent) {
|
|
||||||
var e = this.makeEvent(inType, pointerEventData, browserEvent);
|
var e = this.makeEvent(inType, pointerEventData, browserEvent);
|
||||||
this.dispatchEvent(e);
|
this.dispatchEvent(e);
|
||||||
};
|
};
|
||||||
@@ -407,8 +392,7 @@ ol.pointer.PointerEventHandler.prototype.fireEvent =
|
|||||||
* and dispatches this event.
|
* and dispatches this event.
|
||||||
* @param {goog.events.BrowserEvent} nativeEvent A platform event with a target.
|
* @param {goog.events.BrowserEvent} nativeEvent A platform event with a target.
|
||||||
*/
|
*/
|
||||||
ol.pointer.PointerEventHandler.prototype.fireNativeEvent =
|
ol.pointer.PointerEventHandler.prototype.fireNativeEvent = function(nativeEvent) {
|
||||||
function(nativeEvent) {
|
|
||||||
var e = this.makeEvent(nativeEvent.type, nativeEvent.getBrowserEvent(),
|
var e = this.makeEvent(nativeEvent.type, nativeEvent.getBrowserEvent(),
|
||||||
nativeEvent);
|
nativeEvent);
|
||||||
this.dispatchEvent(e);
|
this.dispatchEvent(e);
|
||||||
@@ -422,8 +406,7 @@ ol.pointer.PointerEventHandler.prototype.fireNativeEvent =
|
|||||||
* @param {goog.events.BrowserEvent} browserEvent The event.
|
* @param {goog.events.BrowserEvent} browserEvent The event.
|
||||||
* @return {ol.pointer.PointerEvent} The wrapped event.
|
* @return {ol.pointer.PointerEvent} The wrapped event.
|
||||||
*/
|
*/
|
||||||
ol.pointer.PointerEventHandler.prototype.wrapMouseEvent =
|
ol.pointer.PointerEventHandler.prototype.wrapMouseEvent = function(eventType, browserEvent) {
|
||||||
function(eventType, browserEvent) {
|
|
||||||
var pointerEvent = this.makeEvent(
|
var pointerEvent = this.makeEvent(
|
||||||
eventType,
|
eventType,
|
||||||
ol.pointer.MouseSource.prepareEvent(browserEvent, this),
|
ol.pointer.MouseSource.prepareEvent(browserEvent, this),
|
||||||
|
|||||||
@@ -181,8 +181,7 @@ ol.pointer.TouchSource.prototype.cancelResetClickCount_ = function() {
|
|||||||
* @param {Touch} inTouch Touch event
|
* @param {Touch} inTouch Touch event
|
||||||
* @return {Object} A pointer object.
|
* @return {Object} A pointer object.
|
||||||
*/
|
*/
|
||||||
ol.pointer.TouchSource.prototype.touchToPointer_ =
|
ol.pointer.TouchSource.prototype.touchToPointer_ = function(browserEvent, inTouch) {
|
||||||
function(browserEvent, inTouch) {
|
|
||||||
var e = this.dispatcher.cloneEvent(browserEvent, inTouch);
|
var e = this.dispatcher.cloneEvent(browserEvent, inTouch);
|
||||||
// Spec specifies that pointerId 1 is reserved for Mouse.
|
// Spec specifies that pointerId 1 is reserved for Mouse.
|
||||||
// Touch identifiers can start at 0.
|
// Touch identifiers can start at 0.
|
||||||
@@ -217,8 +216,7 @@ ol.pointer.TouchSource.prototype.touchToPointer_ =
|
|||||||
* @param {goog.events.BrowserEvent} inEvent Touch event
|
* @param {goog.events.BrowserEvent} inEvent Touch event
|
||||||
* @param {function(goog.events.BrowserEvent, Object)} inFunction In function.
|
* @param {function(goog.events.BrowserEvent, Object)} inFunction In function.
|
||||||
*/
|
*/
|
||||||
ol.pointer.TouchSource.prototype.processTouches_ =
|
ol.pointer.TouchSource.prototype.processTouches_ = function(inEvent, inFunction) {
|
||||||
function(inEvent, inFunction) {
|
|
||||||
var touches = Array.prototype.slice.call(
|
var touches = Array.prototype.slice.call(
|
||||||
inEvent.getBrowserEvent().changedTouches);
|
inEvent.getBrowserEvent().changedTouches);
|
||||||
var count = touches.length;
|
var count = touches.length;
|
||||||
@@ -340,8 +338,7 @@ ol.pointer.TouchSource.prototype.touchmove = function(inEvent) {
|
|||||||
* @param {goog.events.BrowserEvent} browserEvent The event.
|
* @param {goog.events.BrowserEvent} browserEvent The event.
|
||||||
* @param {Object} inPointer The in pointer.
|
* @param {Object} inPointer The in pointer.
|
||||||
*/
|
*/
|
||||||
ol.pointer.TouchSource.prototype.moveOverOut_ =
|
ol.pointer.TouchSource.prototype.moveOverOut_ = function(browserEvent, inPointer) {
|
||||||
function(browserEvent, inPointer) {
|
|
||||||
var event = inPointer;
|
var event = inPointer;
|
||||||
var pointer = this.pointerMap[event.pointerId];
|
var pointer = this.pointerMap[event.pointerId];
|
||||||
// a finger drifted off the screen, ignore it
|
// a finger drifted off the screen, ignore it
|
||||||
@@ -412,8 +409,7 @@ ol.pointer.TouchSource.prototype.touchcancel = function(inEvent) {
|
|||||||
* @param {goog.events.BrowserEvent} browserEvent The event.
|
* @param {goog.events.BrowserEvent} browserEvent The event.
|
||||||
* @param {Object} inPointer The in pointer.
|
* @param {Object} inPointer The in pointer.
|
||||||
*/
|
*/
|
||||||
ol.pointer.TouchSource.prototype.cancelOut_ =
|
ol.pointer.TouchSource.prototype.cancelOut_ = function(browserEvent, inPointer) {
|
||||||
function(browserEvent, inPointer) {
|
|
||||||
this.dispatcher.cancel(inPointer, browserEvent);
|
this.dispatcher.cancel(inPointer, browserEvent);
|
||||||
this.dispatcher.out(inPointer, browserEvent);
|
this.dispatcher.out(inPointer, browserEvent);
|
||||||
this.dispatcher.leave(inPointer, browserEvent);
|
this.dispatcher.leave(inPointer, browserEvent);
|
||||||
|
|||||||
@@ -470,8 +470,7 @@ ol.proj.addEquivalentProjections = function(projections) {
|
|||||||
* @param {ol.TransformFunction} inverseTransform Transform from any projection
|
* @param {ol.TransformFunction} inverseTransform Transform from any projection
|
||||||
* in projection2 to any projection in projection1..
|
* in projection2 to any projection in projection1..
|
||||||
*/
|
*/
|
||||||
ol.proj.addEquivalentTransforms =
|
ol.proj.addEquivalentTransforms = function(projections1, projections2, forwardTransform, inverseTransform) {
|
||||||
function(projections1, projections2, forwardTransform, inverseTransform) {
|
|
||||||
projections1.forEach(function(projection1) {
|
projections1.forEach(function(projection1) {
|
||||||
projections2.forEach(function(projection2) {
|
projections2.forEach(function(projection2) {
|
||||||
ol.proj.addTransform(projection1, projection2, forwardTransform);
|
ol.proj.addTransform(projection1, projection2, forwardTransform);
|
||||||
@@ -570,8 +569,7 @@ ol.proj.addTransform = function(source, destination, transformFn) {
|
|||||||
* the transformed {@link ol.Coordinate}.
|
* the transformed {@link ol.Coordinate}.
|
||||||
* @api stable
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.proj.addCoordinateTransforms =
|
ol.proj.addCoordinateTransforms = function(source, destination, forward, inverse) {
|
||||||
function(source, destination, forward, inverse) {
|
|
||||||
var sourceProj = ol.proj.get(source);
|
var sourceProj = ol.proj.get(source);
|
||||||
var destProj = ol.proj.get(destination);
|
var destProj = ol.proj.get(destination);
|
||||||
ol.proj.addTransform(sourceProj, destProj,
|
ol.proj.addTransform(sourceProj, destProj,
|
||||||
@@ -752,8 +750,7 @@ ol.proj.getTransform = function(source, destination) {
|
|||||||
* object.
|
* object.
|
||||||
* @return {ol.TransformFunction} Transform function.
|
* @return {ol.TransformFunction} Transform function.
|
||||||
*/
|
*/
|
||||||
ol.proj.getTransformFromProjections =
|
ol.proj.getTransformFromProjections = function(sourceProjection, destinationProjection) {
|
||||||
function(sourceProjection, destinationProjection) {
|
|
||||||
var transforms = ol.proj.transforms_;
|
var transforms = ol.proj.transforms_;
|
||||||
var sourceCode = sourceProjection.getCode();
|
var sourceCode = sourceProjection.getCode();
|
||||||
var destinationCode = destinationProjection.getCode();
|
var destinationCode = destinationProjection.getCode();
|
||||||
@@ -853,8 +850,7 @@ ol.proj.transformExtent = function(extent, source, destination) {
|
|||||||
* @param {ol.proj.Projection} destinationProjection Destination projection.
|
* @param {ol.proj.Projection} destinationProjection Destination projection.
|
||||||
* @return {ol.Coordinate} Point.
|
* @return {ol.Coordinate} Point.
|
||||||
*/
|
*/
|
||||||
ol.proj.transformWithProjections =
|
ol.proj.transformWithProjections = function(point, sourceProjection, destinationProjection) {
|
||||||
function(point, sourceProjection, destinationProjection) {
|
|
||||||
var transformFn = ol.proj.getTransformFromProjections(
|
var transformFn = ol.proj.getTransformFromProjections(
|
||||||
sourceProjection, destinationProjection);
|
sourceProjection, destinationProjection);
|
||||||
return transformFn(point);
|
return transformFn(point);
|
||||||
|
|||||||
@@ -36,8 +36,7 @@ goog.require('ol.vec.Mat4');
|
|||||||
* @param {number} viewRotation View rotation.
|
* @param {number} viewRotation View rotation.
|
||||||
* @struct
|
* @struct
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.Immediate =
|
ol.render.canvas.Immediate = function(context, pixelRatio, extent, transform, viewRotation) {
|
||||||
function(context, pixelRatio, extent, transform, viewRotation) {
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -248,8 +247,7 @@ ol.render.canvas.Immediate =
|
|||||||
* @param {number} stride Stride.
|
* @param {number} stride Stride.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.Immediate.prototype.drawImages_ =
|
ol.render.canvas.Immediate.prototype.drawImages_ = function(flatCoordinates, offset, end, stride) {
|
||||||
function(flatCoordinates, offset, end, stride) {
|
|
||||||
if (!this.image_) {
|
if (!this.image_) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -311,8 +309,7 @@ ol.render.canvas.Immediate.prototype.drawImages_ =
|
|||||||
* @param {number} stride Stride.
|
* @param {number} stride Stride.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.Immediate.prototype.drawText_ =
|
ol.render.canvas.Immediate.prototype.drawText_ = function(flatCoordinates, offset, end, stride) {
|
||||||
function(flatCoordinates, offset, end, stride) {
|
|
||||||
if (!this.textState_ || this.text_ === '') {
|
if (!this.textState_ || this.text_ === '') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -366,8 +363,7 @@ ol.render.canvas.Immediate.prototype.drawText_ =
|
|||||||
* @private
|
* @private
|
||||||
* @return {number} end End.
|
* @return {number} end End.
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.Immediate.prototype.moveToLineTo_ =
|
ol.render.canvas.Immediate.prototype.moveToLineTo_ = function(flatCoordinates, offset, end, stride, close) {
|
||||||
function(flatCoordinates, offset, end, stride, close) {
|
|
||||||
var context = this.context_;
|
var context = this.context_;
|
||||||
var pixelCoordinates = ol.geom.flat.transform.transform2D(
|
var pixelCoordinates = ol.geom.flat.transform.transform2D(
|
||||||
flatCoordinates, offset, end, stride, this.transform_,
|
flatCoordinates, offset, end, stride, this.transform_,
|
||||||
@@ -392,8 +388,7 @@ ol.render.canvas.Immediate.prototype.moveToLineTo_ =
|
|||||||
* @private
|
* @private
|
||||||
* @return {number} End.
|
* @return {number} End.
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.Immediate.prototype.drawRings_ =
|
ol.render.canvas.Immediate.prototype.drawRings_ = function(flatCoordinates, offset, ends, stride) {
|
||||||
function(flatCoordinates, offset, ends, stride) {
|
|
||||||
var context = this.context_;
|
var context = this.context_;
|
||||||
var i, ii;
|
var i, ii;
|
||||||
for (i = 0, ii = ends.length; i < ii; ++i) {
|
for (i = 0, ii = ends.length; i < ii; ++i) {
|
||||||
@@ -432,8 +427,7 @@ ol.render.canvas.Immediate.prototype.drawAsync = function(zIndex, callback) {
|
|||||||
* @param {ol.geom.Circle} circleGeometry Circle geometry.
|
* @param {ol.geom.Circle} circleGeometry Circle geometry.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.Immediate.prototype.drawCircleGeometry =
|
ol.render.canvas.Immediate.prototype.drawCircleGeometry = function(circleGeometry) {
|
||||||
function(circleGeometry) {
|
|
||||||
if (!ol.extent.intersects(this.extent_, circleGeometry.getExtent())) {
|
if (!ol.extent.intersects(this.extent_, circleGeometry.getExtent())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -508,8 +502,7 @@ ol.render.canvas.Immediate.prototype.drawFeature = function(feature, style) {
|
|||||||
* collection.
|
* collection.
|
||||||
* @param {ol.Feature} feature Feature.
|
* @param {ol.Feature} feature Feature.
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.Immediate.prototype.drawGeometryCollectionGeometry =
|
ol.render.canvas.Immediate.prototype.drawGeometryCollectionGeometry = function(geometryCollectionGeometry, feature) {
|
||||||
function(geometryCollectionGeometry, feature) {
|
|
||||||
var geometries = geometryCollectionGeometry.getGeometriesArray();
|
var geometries = geometryCollectionGeometry.getGeometriesArray();
|
||||||
var i, ii;
|
var i, ii;
|
||||||
for (i = 0, ii = geometries.length; i < ii; ++i) {
|
for (i = 0, ii = geometries.length; i < ii; ++i) {
|
||||||
@@ -530,8 +523,7 @@ ol.render.canvas.Immediate.prototype.drawGeometryCollectionGeometry =
|
|||||||
* @param {ol.geom.Point|ol.render.Feature} pointGeometry Point geometry.
|
* @param {ol.geom.Point|ol.render.Feature} pointGeometry Point geometry.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.Immediate.prototype.drawPointGeometry =
|
ol.render.canvas.Immediate.prototype.drawPointGeometry = function(pointGeometry) {
|
||||||
function(pointGeometry) {
|
|
||||||
var flatCoordinates = pointGeometry.getFlatCoordinates();
|
var flatCoordinates = pointGeometry.getFlatCoordinates();
|
||||||
var stride = pointGeometry.getStride();
|
var stride = pointGeometry.getStride();
|
||||||
if (this.image_) {
|
if (this.image_) {
|
||||||
@@ -551,8 +543,7 @@ ol.render.canvas.Immediate.prototype.drawPointGeometry =
|
|||||||
* geometry.
|
* geometry.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.Immediate.prototype.drawMultiPointGeometry =
|
ol.render.canvas.Immediate.prototype.drawMultiPointGeometry = function(multiPointGeometry) {
|
||||||
function(multiPointGeometry) {
|
|
||||||
var flatCoordinates = multiPointGeometry.getFlatCoordinates();
|
var flatCoordinates = multiPointGeometry.getFlatCoordinates();
|
||||||
var stride = multiPointGeometry.getStride();
|
var stride = multiPointGeometry.getStride();
|
||||||
if (this.image_) {
|
if (this.image_) {
|
||||||
@@ -572,8 +563,7 @@ ol.render.canvas.Immediate.prototype.drawMultiPointGeometry =
|
|||||||
* string geometry.
|
* string geometry.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.Immediate.prototype.drawLineStringGeometry =
|
ol.render.canvas.Immediate.prototype.drawLineStringGeometry = function(lineStringGeometry) {
|
||||||
function(lineStringGeometry) {
|
|
||||||
if (!ol.extent.intersects(this.extent_, lineStringGeometry.getExtent())) {
|
if (!ol.extent.intersects(this.extent_, lineStringGeometry.getExtent())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -601,8 +591,7 @@ ol.render.canvas.Immediate.prototype.drawLineStringGeometry =
|
|||||||
* MultiLineString geometry.
|
* MultiLineString geometry.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.Immediate.prototype.drawMultiLineStringGeometry =
|
ol.render.canvas.Immediate.prototype.drawMultiLineStringGeometry = function(multiLineStringGeometry) {
|
||||||
function(multiLineStringGeometry) {
|
|
||||||
var geometryExtent = multiLineStringGeometry.getExtent();
|
var geometryExtent = multiLineStringGeometry.getExtent();
|
||||||
if (!ol.extent.intersects(this.extent_, geometryExtent)) {
|
if (!ol.extent.intersects(this.extent_, geometryExtent)) {
|
||||||
return;
|
return;
|
||||||
@@ -637,8 +626,7 @@ ol.render.canvas.Immediate.prototype.drawMultiLineStringGeometry =
|
|||||||
* geometry.
|
* geometry.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.Immediate.prototype.drawPolygonGeometry =
|
ol.render.canvas.Immediate.prototype.drawPolygonGeometry = function(polygonGeometry) {
|
||||||
function(polygonGeometry) {
|
|
||||||
if (!ol.extent.intersects(this.extent_, polygonGeometry.getExtent())) {
|
if (!ol.extent.intersects(this.extent_, polygonGeometry.getExtent())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -673,8 +661,7 @@ ol.render.canvas.Immediate.prototype.drawPolygonGeometry =
|
|||||||
* @param {ol.geom.MultiPolygon} multiPolygonGeometry MultiPolygon geometry.
|
* @param {ol.geom.MultiPolygon} multiPolygonGeometry MultiPolygon geometry.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.Immediate.prototype.drawMultiPolygonGeometry =
|
ol.render.canvas.Immediate.prototype.drawMultiPolygonGeometry = function(multiPolygonGeometry) {
|
||||||
function(multiPolygonGeometry) {
|
|
||||||
if (!ol.extent.intersects(this.extent_, multiPolygonGeometry.getExtent())) {
|
if (!ol.extent.intersects(this.extent_, multiPolygonGeometry.getExtent())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -737,8 +724,7 @@ ol.render.canvas.Immediate.prototype.flush = function() {
|
|||||||
* @param {ol.render.canvas.FillState} fillState Fill state.
|
* @param {ol.render.canvas.FillState} fillState Fill state.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.Immediate.prototype.setContextFillState_ =
|
ol.render.canvas.Immediate.prototype.setContextFillState_ = function(fillState) {
|
||||||
function(fillState) {
|
|
||||||
var context = this.context_;
|
var context = this.context_;
|
||||||
var contextFillState = this.contextFillState_;
|
var contextFillState = this.contextFillState_;
|
||||||
if (!contextFillState) {
|
if (!contextFillState) {
|
||||||
@@ -758,8 +744,7 @@ ol.render.canvas.Immediate.prototype.setContextFillState_ =
|
|||||||
* @param {ol.render.canvas.StrokeState} strokeState Stroke state.
|
* @param {ol.render.canvas.StrokeState} strokeState Stroke state.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.Immediate.prototype.setContextStrokeState_ =
|
ol.render.canvas.Immediate.prototype.setContextStrokeState_ = function(strokeState) {
|
||||||
function(strokeState) {
|
|
||||||
var context = this.context_;
|
var context = this.context_;
|
||||||
var contextStrokeState = this.contextStrokeState_;
|
var contextStrokeState = this.contextStrokeState_;
|
||||||
if (!contextStrokeState) {
|
if (!contextStrokeState) {
|
||||||
@@ -811,8 +796,7 @@ ol.render.canvas.Immediate.prototype.setContextStrokeState_ =
|
|||||||
* @param {ol.render.canvas.TextState} textState Text state.
|
* @param {ol.render.canvas.TextState} textState Text state.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.Immediate.prototype.setContextTextState_ =
|
ol.render.canvas.Immediate.prototype.setContextTextState_ = function(textState) {
|
||||||
function(textState) {
|
|
||||||
var context = this.context_;
|
var context = this.context_;
|
||||||
var contextTextState = this.contextTextState_;
|
var contextTextState = this.contextTextState_;
|
||||||
if (!contextTextState) {
|
if (!contextTextState) {
|
||||||
@@ -847,8 +831,7 @@ ol.render.canvas.Immediate.prototype.setContextTextState_ =
|
|||||||
* @param {ol.style.Stroke} strokeStyle Stroke style.
|
* @param {ol.style.Stroke} strokeStyle Stroke style.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.Immediate.prototype.setFillStrokeStyle =
|
ol.render.canvas.Immediate.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) {
|
||||||
function(fillStyle, strokeStyle) {
|
|
||||||
if (!fillStyle) {
|
if (!fillStyle) {
|
||||||
this.fillState_ = null;
|
this.fillState_ = null;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -158,8 +158,7 @@ goog.inherits(ol.render.canvas.Replay, ol.render.VectorContext);
|
|||||||
* @protected
|
* @protected
|
||||||
* @return {number} My end.
|
* @return {number} My end.
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.Replay.prototype.appendFlatCoordinates =
|
ol.render.canvas.Replay.prototype.appendFlatCoordinates = function(flatCoordinates, offset, end, stride, close) {
|
||||||
function(flatCoordinates, offset, end, stride, close) {
|
|
||||||
|
|
||||||
var myEnd = this.coordinates.length;
|
var myEnd = this.coordinates.length;
|
||||||
var extent = this.getBufferedMaxExtent();
|
var extent = this.getBufferedMaxExtent();
|
||||||
@@ -601,8 +600,7 @@ ol.render.canvas.Replay.prototype.replayHitDetection = function(
|
|||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.Replay.prototype.reverseHitDetectionInstructions_ =
|
ol.render.canvas.Replay.prototype.reverseHitDetectionInstructions_ = function() {
|
||||||
function() {
|
|
||||||
var hitDetectionInstructions = this.hitDetectionInstructions;
|
var hitDetectionInstructions = this.hitDetectionInstructions;
|
||||||
// step 1 - reverse array
|
// step 1 - reverse array
|
||||||
hitDetectionInstructions.reverse();
|
hitDetectionInstructions.reverse();
|
||||||
@@ -770,8 +768,7 @@ goog.inherits(ol.render.canvas.ImageReplay, ol.render.canvas.Replay);
|
|||||||
* @private
|
* @private
|
||||||
* @return {number} My end.
|
* @return {number} My end.
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.ImageReplay.prototype.drawCoordinates_ =
|
ol.render.canvas.ImageReplay.prototype.drawCoordinates_ = function(flatCoordinates, offset, end, stride) {
|
||||||
function(flatCoordinates, offset, end, stride) {
|
|
||||||
return this.appendFlatCoordinates(
|
return this.appendFlatCoordinates(
|
||||||
flatCoordinates, offset, end, stride, false);
|
flatCoordinates, offset, end, stride, false);
|
||||||
};
|
};
|
||||||
@@ -780,8 +777,7 @@ ol.render.canvas.ImageReplay.prototype.drawCoordinates_ =
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.ImageReplay.prototype.drawPointGeometry =
|
ol.render.canvas.ImageReplay.prototype.drawPointGeometry = function(pointGeometry, feature) {
|
||||||
function(pointGeometry, feature) {
|
|
||||||
if (!this.image_) {
|
if (!this.image_) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -833,8 +829,7 @@ ol.render.canvas.ImageReplay.prototype.drawPointGeometry =
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.ImageReplay.prototype.drawMultiPointGeometry =
|
ol.render.canvas.ImageReplay.prototype.drawMultiPointGeometry = function(multiPointGeometry, feature) {
|
||||||
function(multiPointGeometry, feature) {
|
|
||||||
if (!this.image_) {
|
if (!this.image_) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -995,8 +990,7 @@ goog.inherits(ol.render.canvas.LineStringReplay, ol.render.canvas.Replay);
|
|||||||
* @private
|
* @private
|
||||||
* @return {number} end.
|
* @return {number} end.
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.LineStringReplay.prototype.drawFlatCoordinates_ =
|
ol.render.canvas.LineStringReplay.prototype.drawFlatCoordinates_ = function(flatCoordinates, offset, end, stride) {
|
||||||
function(flatCoordinates, offset, end, stride) {
|
|
||||||
var myBegin = this.coordinates.length;
|
var myBegin = this.coordinates.length;
|
||||||
var myEnd = this.appendFlatCoordinates(
|
var myEnd = this.appendFlatCoordinates(
|
||||||
flatCoordinates, offset, end, stride, false);
|
flatCoordinates, offset, end, stride, false);
|
||||||
@@ -1069,8 +1063,7 @@ ol.render.canvas.LineStringReplay.prototype.setStrokeStyle_ = function() {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.LineStringReplay.prototype.drawLineStringGeometry =
|
ol.render.canvas.LineStringReplay.prototype.drawLineStringGeometry = function(lineStringGeometry, feature) {
|
||||||
function(lineStringGeometry, feature) {
|
|
||||||
var state = this.state_;
|
var state = this.state_;
|
||||||
goog.asserts.assert(state, 'state should not be null');
|
goog.asserts.assert(state, 'state should not be null');
|
||||||
var strokeStyle = state.strokeStyle;
|
var strokeStyle = state.strokeStyle;
|
||||||
@@ -1097,8 +1090,7 @@ ol.render.canvas.LineStringReplay.prototype.drawLineStringGeometry =
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.LineStringReplay.prototype.drawMultiLineStringGeometry =
|
ol.render.canvas.LineStringReplay.prototype.drawMultiLineStringGeometry = function(multiLineStringGeometry, feature) {
|
||||||
function(multiLineStringGeometry, feature) {
|
|
||||||
var state = this.state_;
|
var state = this.state_;
|
||||||
goog.asserts.assert(state, 'state should not be null');
|
goog.asserts.assert(state, 'state should not be null');
|
||||||
var strokeStyle = state.strokeStyle;
|
var strokeStyle = state.strokeStyle;
|
||||||
@@ -1144,8 +1136,7 @@ ol.render.canvas.LineStringReplay.prototype.finish = function() {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.LineStringReplay.prototype.setFillStrokeStyle =
|
ol.render.canvas.LineStringReplay.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) {
|
||||||
function(fillStyle, strokeStyle) {
|
|
||||||
goog.asserts.assert(this.state_, 'this.state_ should not be null');
|
goog.asserts.assert(this.state_, 'this.state_ should not be null');
|
||||||
goog.asserts.assert(!fillStyle, 'fillStyle should be null');
|
goog.asserts.assert(!fillStyle, 'fillStyle should be null');
|
||||||
goog.asserts.assert(strokeStyle, 'strokeStyle should not be null');
|
goog.asserts.assert(strokeStyle, 'strokeStyle should not be null');
|
||||||
@@ -1236,8 +1227,7 @@ goog.inherits(ol.render.canvas.PolygonReplay, ol.render.canvas.Replay);
|
|||||||
* @private
|
* @private
|
||||||
* @return {number} End.
|
* @return {number} End.
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.PolygonReplay.prototype.drawFlatCoordinatess_ =
|
ol.render.canvas.PolygonReplay.prototype.drawFlatCoordinatess_ = function(flatCoordinates, offset, ends, stride) {
|
||||||
function(flatCoordinates, offset, ends, stride) {
|
|
||||||
var state = this.state_;
|
var state = this.state_;
|
||||||
var beginPathInstruction = [ol.render.canvas.Instruction.BEGIN_PATH];
|
var beginPathInstruction = [ol.render.canvas.Instruction.BEGIN_PATH];
|
||||||
this.instructions.push(beginPathInstruction);
|
this.instructions.push(beginPathInstruction);
|
||||||
@@ -1277,8 +1267,7 @@ ol.render.canvas.PolygonReplay.prototype.drawFlatCoordinatess_ =
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.PolygonReplay.prototype.drawCircleGeometry =
|
ol.render.canvas.PolygonReplay.prototype.drawCircleGeometry = function(circleGeometry, feature) {
|
||||||
function(circleGeometry, feature) {
|
|
||||||
var state = this.state_;
|
var state = this.state_;
|
||||||
goog.asserts.assert(state, 'state should not be null');
|
goog.asserts.assert(state, 'state should not be null');
|
||||||
var fillStyle = state.fillStyle;
|
var fillStyle = state.fillStyle;
|
||||||
@@ -1330,8 +1319,7 @@ ol.render.canvas.PolygonReplay.prototype.drawCircleGeometry =
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.PolygonReplay.prototype.drawPolygonGeometry =
|
ol.render.canvas.PolygonReplay.prototype.drawPolygonGeometry = function(polygonGeometry, feature) {
|
||||||
function(polygonGeometry, feature) {
|
|
||||||
var state = this.state_;
|
var state = this.state_;
|
||||||
goog.asserts.assert(state, 'state should not be null');
|
goog.asserts.assert(state, 'state should not be null');
|
||||||
var fillStyle = state.fillStyle;
|
var fillStyle = state.fillStyle;
|
||||||
@@ -1366,8 +1354,7 @@ ol.render.canvas.PolygonReplay.prototype.drawPolygonGeometry =
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.PolygonReplay.prototype.drawMultiPolygonGeometry =
|
ol.render.canvas.PolygonReplay.prototype.drawMultiPolygonGeometry = function(multiPolygonGeometry, feature) {
|
||||||
function(multiPolygonGeometry, feature) {
|
|
||||||
var state = this.state_;
|
var state = this.state_;
|
||||||
goog.asserts.assert(state, 'state should not be null');
|
goog.asserts.assert(state, 'state should not be null');
|
||||||
var fillStyle = state.fillStyle;
|
var fillStyle = state.fillStyle;
|
||||||
@@ -1444,8 +1431,7 @@ ol.render.canvas.PolygonReplay.prototype.getBufferedMaxExtent = function() {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.PolygonReplay.prototype.setFillStrokeStyle =
|
ol.render.canvas.PolygonReplay.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) {
|
||||||
function(fillStyle, strokeStyle) {
|
|
||||||
goog.asserts.assert(this.state_, 'this.state_ should not be null');
|
goog.asserts.assert(this.state_, 'this.state_ should not be null');
|
||||||
goog.asserts.assert(fillStyle || strokeStyle,
|
goog.asserts.assert(fillStyle || strokeStyle,
|
||||||
'fillStyle or strokeStyle should not be null');
|
'fillStyle or strokeStyle should not be null');
|
||||||
@@ -1624,8 +1610,7 @@ goog.inherits(ol.render.canvas.TextReplay, ol.render.canvas.Replay);
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.TextReplay.prototype.drawText =
|
ol.render.canvas.TextReplay.prototype.drawText = function(flatCoordinates, offset, end, stride, geometry, feature) {
|
||||||
function(flatCoordinates, offset, end, stride, geometry, feature) {
|
|
||||||
if (this.text_ === '' || !this.textState_ ||
|
if (this.text_ === '' || !this.textState_ ||
|
||||||
(!this.textFillState_ && !this.textStrokeState_)) {
|
(!this.textFillState_ && !this.textStrokeState_)) {
|
||||||
return;
|
return;
|
||||||
@@ -1657,8 +1642,7 @@ ol.render.canvas.TextReplay.prototype.drawText =
|
|||||||
* @param {ol.render.canvas.FillState} fillState Fill state.
|
* @param {ol.render.canvas.FillState} fillState Fill state.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.TextReplay.prototype.setReplayFillState_ =
|
ol.render.canvas.TextReplay.prototype.setReplayFillState_ = function(fillState) {
|
||||||
function(fillState) {
|
|
||||||
var replayFillState = this.replayFillState_;
|
var replayFillState = this.replayFillState_;
|
||||||
if (replayFillState &&
|
if (replayFillState &&
|
||||||
replayFillState.fillStyle == fillState.fillStyle) {
|
replayFillState.fillStyle == fillState.fillStyle) {
|
||||||
@@ -1682,8 +1666,7 @@ ol.render.canvas.TextReplay.prototype.setReplayFillState_ =
|
|||||||
* @param {ol.render.canvas.StrokeState} strokeState Stroke state.
|
* @param {ol.render.canvas.StrokeState} strokeState Stroke state.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.TextReplay.prototype.setReplayStrokeState_ =
|
ol.render.canvas.TextReplay.prototype.setReplayStrokeState_ = function(strokeState) {
|
||||||
function(strokeState) {
|
|
||||||
var replayStrokeState = this.replayStrokeState_;
|
var replayStrokeState = this.replayStrokeState_;
|
||||||
if (replayStrokeState &&
|
if (replayStrokeState &&
|
||||||
replayStrokeState.lineCap == strokeState.lineCap &&
|
replayStrokeState.lineCap == strokeState.lineCap &&
|
||||||
@@ -1725,8 +1708,7 @@ ol.render.canvas.TextReplay.prototype.setReplayStrokeState_ =
|
|||||||
* @param {ol.render.canvas.TextState} textState Text state.
|
* @param {ol.render.canvas.TextState} textState Text state.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.TextReplay.prototype.setReplayTextState_ =
|
ol.render.canvas.TextReplay.prototype.setReplayTextState_ = function(textState) {
|
||||||
function(textState) {
|
|
||||||
var replayTextState = this.replayTextState_;
|
var replayTextState = this.replayTextState_;
|
||||||
if (replayTextState &&
|
if (replayTextState &&
|
||||||
replayTextState.font == textState.font &&
|
replayTextState.font == textState.font &&
|
||||||
@@ -1979,8 +1961,7 @@ ol.render.canvas.ReplayGroup.prototype.forEachFeatureAtCoordinate = function(
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.ReplayGroup.prototype.getReplay =
|
ol.render.canvas.ReplayGroup.prototype.getReplay = function(zIndex, replayType) {
|
||||||
function(zIndex, replayType) {
|
|
||||||
var zIndexKey = zIndex !== undefined ? zIndex.toString() : '0';
|
var zIndexKey = zIndex !== undefined ? zIndex.toString() : '0';
|
||||||
var replays = this.replaysByZIndex_[zIndexKey];
|
var replays = this.replaysByZIndex_[zIndexKey];
|
||||||
if (replays === undefined) {
|
if (replays === undefined) {
|
||||||
|
|||||||
@@ -100,12 +100,18 @@ ol.render.Feature.prototype.getExtent = function() {
|
|||||||
/**
|
/**
|
||||||
* @return {Array.<number>} Flat coordinates.
|
* @return {Array.<number>} Flat coordinates.
|
||||||
*/
|
*/
|
||||||
ol.render.Feature.prototype.getFlatCoordinates =
|
ol.render.Feature.prototype.getOrientedFlatCoordinates = function() {
|
||||||
ol.render.Feature.prototype.getOrientedFlatCoordinates = function() {
|
|
||||||
return this.flatCoordinates_;
|
return this.flatCoordinates_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return {Array.<number>} Flat coordinates.
|
||||||
|
*/
|
||||||
|
ol.render.Feature.prototype.getFlatCoordinates =
|
||||||
|
ol.render.Feature.prototype.getOrientedFlatCoordinates;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the feature for working with its geometry.
|
* Get the feature for working with its geometry.
|
||||||
* @return {ol.render.Feature} Feature.
|
* @return {ol.render.Feature} Feature.
|
||||||
|
|||||||
@@ -45,8 +45,7 @@ ol.renderer.vector.getTolerance = function(resolution, pixelRatio) {
|
|||||||
* @param {ol.Feature} feature Feature.
|
* @param {ol.Feature} feature Feature.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.renderer.vector.renderCircleGeometry_ =
|
ol.renderer.vector.renderCircleGeometry_ = function(replayGroup, geometry, style, feature) {
|
||||||
function(replayGroup, geometry, style, feature) {
|
|
||||||
var fillStyle = style.getFill();
|
var fillStyle = style.getFill();
|
||||||
var strokeStyle = style.getStroke();
|
var strokeStyle = style.getStroke();
|
||||||
if (fillStyle || strokeStyle) {
|
if (fillStyle || strokeStyle) {
|
||||||
@@ -131,8 +130,7 @@ ol.renderer.vector.renderFeature_ = function(
|
|||||||
* @param {ol.Feature} feature Feature.
|
* @param {ol.Feature} feature Feature.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.renderer.vector.renderGeometryCollectionGeometry_ =
|
ol.renderer.vector.renderGeometryCollectionGeometry_ = function(replayGroup, geometry, style, feature) {
|
||||||
function(replayGroup, geometry, style, feature) {
|
|
||||||
var geometries = geometry.getGeometriesArray();
|
var geometries = geometry.getGeometriesArray();
|
||||||
var i, ii;
|
var i, ii;
|
||||||
for (i = 0, ii = geometries.length; i < ii; ++i) {
|
for (i = 0, ii = geometries.length; i < ii; ++i) {
|
||||||
@@ -152,8 +150,7 @@ ol.renderer.vector.renderGeometryCollectionGeometry_ =
|
|||||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.renderer.vector.renderLineStringGeometry_ =
|
ol.renderer.vector.renderLineStringGeometry_ = function(replayGroup, geometry, style, feature) {
|
||||||
function(replayGroup, geometry, style, feature) {
|
|
||||||
var strokeStyle = style.getStroke();
|
var strokeStyle = style.getStroke();
|
||||||
if (strokeStyle) {
|
if (strokeStyle) {
|
||||||
var lineStringReplay = replayGroup.getReplay(
|
var lineStringReplay = replayGroup.getReplay(
|
||||||
@@ -178,8 +175,7 @@ ol.renderer.vector.renderLineStringGeometry_ =
|
|||||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.renderer.vector.renderMultiLineStringGeometry_ =
|
ol.renderer.vector.renderMultiLineStringGeometry_ = function(replayGroup, geometry, style, feature) {
|
||||||
function(replayGroup, geometry, style, feature) {
|
|
||||||
var strokeStyle = style.getStroke();
|
var strokeStyle = style.getStroke();
|
||||||
if (strokeStyle) {
|
if (strokeStyle) {
|
||||||
var lineStringReplay = replayGroup.getReplay(
|
var lineStringReplay = replayGroup.getReplay(
|
||||||
@@ -206,8 +202,7 @@ ol.renderer.vector.renderMultiLineStringGeometry_ =
|
|||||||
* @param {ol.Feature} feature Feature.
|
* @param {ol.Feature} feature Feature.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.renderer.vector.renderMultiPolygonGeometry_ =
|
ol.renderer.vector.renderMultiPolygonGeometry_ = function(replayGroup, geometry, style, feature) {
|
||||||
function(replayGroup, geometry, style, feature) {
|
|
||||||
var fillStyle = style.getFill();
|
var fillStyle = style.getFill();
|
||||||
var strokeStyle = style.getStroke();
|
var strokeStyle = style.getStroke();
|
||||||
if (strokeStyle || fillStyle) {
|
if (strokeStyle || fillStyle) {
|
||||||
@@ -235,8 +230,7 @@ ol.renderer.vector.renderMultiPolygonGeometry_ =
|
|||||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.renderer.vector.renderPointGeometry_ =
|
ol.renderer.vector.renderPointGeometry_ = function(replayGroup, geometry, style, feature) {
|
||||||
function(replayGroup, geometry, style, feature) {
|
|
||||||
var imageStyle = style.getImage();
|
var imageStyle = style.getImage();
|
||||||
if (imageStyle) {
|
if (imageStyle) {
|
||||||
if (imageStyle.getImageState() != ol.style.ImageState.LOADED) {
|
if (imageStyle.getImageState() != ol.style.ImageState.LOADED) {
|
||||||
@@ -265,8 +259,7 @@ ol.renderer.vector.renderPointGeometry_ =
|
|||||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.renderer.vector.renderMultiPointGeometry_ =
|
ol.renderer.vector.renderMultiPointGeometry_ = function(replayGroup, geometry, style, feature) {
|
||||||
function(replayGroup, geometry, style, feature) {
|
|
||||||
var imageStyle = style.getImage();
|
var imageStyle = style.getImage();
|
||||||
if (imageStyle) {
|
if (imageStyle) {
|
||||||
if (imageStyle.getImageState() != ol.style.ImageState.LOADED) {
|
if (imageStyle.getImageState() != ol.style.ImageState.LOADED) {
|
||||||
@@ -296,8 +289,7 @@ ol.renderer.vector.renderMultiPointGeometry_ =
|
|||||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.renderer.vector.renderPolygonGeometry_ =
|
ol.renderer.vector.renderPolygonGeometry_ = function(replayGroup, geometry, style, feature) {
|
||||||
function(replayGroup, geometry, style, feature) {
|
|
||||||
var fillStyle = style.getFill();
|
var fillStyle = style.getFill();
|
||||||
var strokeStyle = style.getStroke();
|
var strokeStyle = style.getStroke();
|
||||||
if (fillStyle || strokeStyle) {
|
if (fillStyle || strokeStyle) {
|
||||||
|
|||||||
@@ -114,8 +114,7 @@ ol.render.webgl.Immediate.prototype.drawAsync = function(zIndex, callback) {
|
|||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.render.webgl.Immediate.prototype.drawCircleGeometry =
|
ol.render.webgl.Immediate.prototype.drawCircleGeometry = function(circleGeometry, data) {
|
||||||
function(circleGeometry, data) {
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -152,8 +151,7 @@ ol.render.webgl.Immediate.prototype.drawFeature = function(feature, style) {
|
|||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.render.webgl.Immediate.prototype.drawGeometryCollectionGeometry =
|
ol.render.webgl.Immediate.prototype.drawGeometryCollectionGeometry = function(geometryCollectionGeometry, data) {
|
||||||
function(geometryCollectionGeometry, data) {
|
|
||||||
var geometries = geometryCollectionGeometry.getGeometriesArray();
|
var geometries = geometryCollectionGeometry.getGeometriesArray();
|
||||||
var renderers = ol.render.webgl.Immediate.GEOMETRY_RENDERERS_;
|
var renderers = ol.render.webgl.Immediate.GEOMETRY_RENDERERS_;
|
||||||
var i, ii;
|
var i, ii;
|
||||||
@@ -174,8 +172,7 @@ ol.render.webgl.Immediate.prototype.drawGeometryCollectionGeometry =
|
|||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.render.webgl.Immediate.prototype.drawPointGeometry =
|
ol.render.webgl.Immediate.prototype.drawPointGeometry = function(pointGeometry, data) {
|
||||||
function(pointGeometry, data) {
|
|
||||||
var context = this.context_;
|
var context = this.context_;
|
||||||
var replayGroup = new ol.render.webgl.ReplayGroup(1, this.extent_);
|
var replayGroup = new ol.render.webgl.ReplayGroup(1, this.extent_);
|
||||||
var replay = /** @type {ol.render.webgl.ImageReplay} */ (
|
var replay = /** @type {ol.render.webgl.ImageReplay} */ (
|
||||||
@@ -199,8 +196,7 @@ ol.render.webgl.Immediate.prototype.drawPointGeometry =
|
|||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.render.webgl.Immediate.prototype.drawLineStringGeometry =
|
ol.render.webgl.Immediate.prototype.drawLineStringGeometry = function(lineStringGeometry, data) {
|
||||||
function(lineStringGeometry, data) {
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -208,8 +204,7 @@ ol.render.webgl.Immediate.prototype.drawLineStringGeometry =
|
|||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.render.webgl.Immediate.prototype.drawMultiLineStringGeometry =
|
ol.render.webgl.Immediate.prototype.drawMultiLineStringGeometry = function(multiLineStringGeometry, data) {
|
||||||
function(multiLineStringGeometry, data) {
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -217,8 +212,7 @@ ol.render.webgl.Immediate.prototype.drawMultiLineStringGeometry =
|
|||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.render.webgl.Immediate.prototype.drawMultiPointGeometry =
|
ol.render.webgl.Immediate.prototype.drawMultiPointGeometry = function(multiPointGeometry, data) {
|
||||||
function(multiPointGeometry, data) {
|
|
||||||
var context = this.context_;
|
var context = this.context_;
|
||||||
var replayGroup = new ol.render.webgl.ReplayGroup(1, this.extent_);
|
var replayGroup = new ol.render.webgl.ReplayGroup(1, this.extent_);
|
||||||
var replay = /** @type {ol.render.webgl.ImageReplay} */ (
|
var replay = /** @type {ol.render.webgl.ImageReplay} */ (
|
||||||
@@ -241,8 +235,7 @@ ol.render.webgl.Immediate.prototype.drawMultiPointGeometry =
|
|||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.render.webgl.Immediate.prototype.drawMultiPolygonGeometry =
|
ol.render.webgl.Immediate.prototype.drawMultiPolygonGeometry = function(multiPolygonGeometry, data) {
|
||||||
function(multiPolygonGeometry, data) {
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -250,8 +243,7 @@ ol.render.webgl.Immediate.prototype.drawMultiPolygonGeometry =
|
|||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.render.webgl.Immediate.prototype.drawPolygonGeometry =
|
ol.render.webgl.Immediate.prototype.drawPolygonGeometry = function(polygonGeometry, data) {
|
||||||
function(polygonGeometry, data) {
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -259,8 +251,7 @@ ol.render.webgl.Immediate.prototype.drawPolygonGeometry =
|
|||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.render.webgl.Immediate.prototype.drawText =
|
ol.render.webgl.Immediate.prototype.drawText = function(flatCoordinates, offset, end, stride, geometry, data) {
|
||||||
function(flatCoordinates, offset, end, stride, geometry, data) {
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -268,8 +259,7 @@ ol.render.webgl.Immediate.prototype.drawText =
|
|||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.render.webgl.Immediate.prototype.setFillStrokeStyle =
|
ol.render.webgl.Immediate.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) {
|
||||||
function(fillStyle, strokeStyle) {
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -216,8 +216,7 @@ goog.inherits(ol.render.webgl.ImageReplay, ol.render.VectorContext);
|
|||||||
* @param {ol.webgl.Context} context WebGL context.
|
* @param {ol.webgl.Context} context WebGL context.
|
||||||
* @return {function()} Delete resources function.
|
* @return {function()} Delete resources function.
|
||||||
*/
|
*/
|
||||||
ol.render.webgl.ImageReplay.prototype.getDeleteResourcesFunction =
|
ol.render.webgl.ImageReplay.prototype.getDeleteResourcesFunction = function(context) {
|
||||||
function(context) {
|
|
||||||
// We only delete our stuff here. The shaders and the program may
|
// We only delete our stuff here. The shaders and the program may
|
||||||
// be used by other ImageReplay instances (for other layers). And
|
// be used by other ImageReplay instances (for other layers). And
|
||||||
// they will be deleted when disposing of the ol.webgl.Context
|
// they will be deleted when disposing of the ol.webgl.Context
|
||||||
@@ -261,8 +260,7 @@ ol.render.webgl.ImageReplay.prototype.drawAsync = goog.abstractMethod;
|
|||||||
* @return {number} My end.
|
* @return {number} My end.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.render.webgl.ImageReplay.prototype.drawCoordinates_ =
|
ol.render.webgl.ImageReplay.prototype.drawCoordinates_ = function(flatCoordinates, offset, end, stride) {
|
||||||
function(flatCoordinates, offset, end, stride) {
|
|
||||||
goog.asserts.assert(this.anchorX_ !== undefined, 'anchorX is defined');
|
goog.asserts.assert(this.anchorX_ !== undefined, 'anchorX is defined');
|
||||||
goog.asserts.assert(this.anchorY_ !== undefined, 'anchorY is defined');
|
goog.asserts.assert(this.anchorY_ !== undefined, 'anchorY is defined');
|
||||||
goog.asserts.assert(this.height_ !== undefined, 'height is defined');
|
goog.asserts.assert(this.height_ !== undefined, 'height is defined');
|
||||||
@@ -373,8 +371,7 @@ ol.render.webgl.ImageReplay.prototype.drawCoordinates_ =
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.render.webgl.ImageReplay.prototype.drawMultiPointGeometry =
|
ol.render.webgl.ImageReplay.prototype.drawMultiPointGeometry = function(multiPointGeometry, feature) {
|
||||||
function(multiPointGeometry, feature) {
|
|
||||||
this.startIndices_.push(this.indices_.length);
|
this.startIndices_.push(this.indices_.length);
|
||||||
this.startIndicesFeature_.push(feature);
|
this.startIndicesFeature_.push(feature);
|
||||||
var flatCoordinates = multiPointGeometry.getFlatCoordinates();
|
var flatCoordinates = multiPointGeometry.getFlatCoordinates();
|
||||||
@@ -387,8 +384,7 @@ ol.render.webgl.ImageReplay.prototype.drawMultiPointGeometry =
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.render.webgl.ImageReplay.prototype.drawPointGeometry =
|
ol.render.webgl.ImageReplay.prototype.drawPointGeometry = function(pointGeometry, feature) {
|
||||||
function(pointGeometry, feature) {
|
|
||||||
this.startIndices_.push(this.indices_.length);
|
this.startIndices_.push(this.indices_.length);
|
||||||
this.startIndicesFeature_.push(feature);
|
this.startIndicesFeature_.push(feature);
|
||||||
var flatCoordinates = pointGeometry.getFlatCoordinates();
|
var flatCoordinates = pointGeometry.getFlatCoordinates();
|
||||||
@@ -467,8 +463,7 @@ ol.render.webgl.ImageReplay.prototype.finish = function(context) {
|
|||||||
* @param {Object.<string, WebGLTexture>} texturePerImage Texture cache.
|
* @param {Object.<string, WebGLTexture>} texturePerImage Texture cache.
|
||||||
* @param {WebGLRenderingContext} gl Gl.
|
* @param {WebGLRenderingContext} gl Gl.
|
||||||
*/
|
*/
|
||||||
ol.render.webgl.ImageReplay.prototype.createTextures_ =
|
ol.render.webgl.ImageReplay.prototype.createTextures_ = function(textures, images, texturePerImage, gl) {
|
||||||
function(textures, images, texturePerImage, gl) {
|
|
||||||
goog.asserts.assert(textures.length === 0,
|
goog.asserts.assert(textures.length === 0,
|
||||||
'upon creation, textures is empty');
|
'upon creation, textures is empty');
|
||||||
|
|
||||||
@@ -619,8 +614,7 @@ ol.render.webgl.ImageReplay.prototype.replay = function(context,
|
|||||||
* @param {Array.<WebGLTexture>} textures Textures.
|
* @param {Array.<WebGLTexture>} textures Textures.
|
||||||
* @param {Array.<number>} groupIndices Texture group indices.
|
* @param {Array.<number>} groupIndices Texture group indices.
|
||||||
*/
|
*/
|
||||||
ol.render.webgl.ImageReplay.prototype.drawReplay_ =
|
ol.render.webgl.ImageReplay.prototype.drawReplay_ = function(gl, context, skippedFeaturesHash, textures, groupIndices) {
|
||||||
function(gl, context, skippedFeaturesHash, textures, groupIndices) {
|
|
||||||
goog.asserts.assert(textures.length === groupIndices.length,
|
goog.asserts.assert(textures.length === groupIndices.length,
|
||||||
'number of textures and groupIndeces match');
|
'number of textures and groupIndeces match');
|
||||||
var elementType = context.hasOESElementIndexUint ?
|
var elementType = context.hasOESElementIndexUint ?
|
||||||
@@ -670,8 +664,7 @@ ol.render.webgl.ImageReplay.prototype.drawReplay_ =
|
|||||||
* @param {number} elementType Element type.
|
* @param {number} elementType Element type.
|
||||||
* @param {number} elementSize Element Size.
|
* @param {number} elementSize Element Size.
|
||||||
*/
|
*/
|
||||||
ol.render.webgl.ImageReplay.prototype.drawReplaySkipping_ =
|
ol.render.webgl.ImageReplay.prototype.drawReplaySkipping_ = function(gl, skippedFeaturesHash, textures, groupIndices,
|
||||||
function(gl, skippedFeaturesHash, textures, groupIndices,
|
|
||||||
elementType, elementSize) {
|
elementType, elementSize) {
|
||||||
var featureIndex = 0;
|
var featureIndex = 0;
|
||||||
|
|
||||||
@@ -744,8 +737,7 @@ ol.render.webgl.ImageReplay.prototype.drawElements_ = function(
|
|||||||
* @return {T|undefined} Callback result.
|
* @return {T|undefined} Callback result.
|
||||||
* @template T
|
* @template T
|
||||||
*/
|
*/
|
||||||
ol.render.webgl.ImageReplay.prototype.drawHitDetectionReplay_ =
|
ol.render.webgl.ImageReplay.prototype.drawHitDetectionReplay_ = function(gl, context, skippedFeaturesHash, featureCallback, oneByOne,
|
||||||
function(gl, context, skippedFeaturesHash, featureCallback, oneByOne,
|
|
||||||
opt_hitExtent) {
|
opt_hitExtent) {
|
||||||
if (!oneByOne) {
|
if (!oneByOne) {
|
||||||
// draw all hit-detection features in "once" (by texture group)
|
// draw all hit-detection features in "once" (by texture group)
|
||||||
@@ -769,8 +761,7 @@ ol.render.webgl.ImageReplay.prototype.drawHitDetectionReplay_ =
|
|||||||
* @return {T|undefined} Callback result.
|
* @return {T|undefined} Callback result.
|
||||||
* @template T
|
* @template T
|
||||||
*/
|
*/
|
||||||
ol.render.webgl.ImageReplay.prototype.drawHitDetectionReplayAll_ =
|
ol.render.webgl.ImageReplay.prototype.drawHitDetectionReplayAll_ = function(gl, context, skippedFeaturesHash, featureCallback) {
|
||||||
function(gl, context, skippedFeaturesHash, featureCallback) {
|
|
||||||
gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
|
gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
|
||||||
this.drawReplay_(gl, context, skippedFeaturesHash,
|
this.drawReplay_(gl, context, skippedFeaturesHash,
|
||||||
this.hitDetectionTextures_, this.hitDetectionGroupIndices_);
|
this.hitDetectionTextures_, this.hitDetectionGroupIndices_);
|
||||||
@@ -796,8 +787,7 @@ ol.render.webgl.ImageReplay.prototype.drawHitDetectionReplayAll_ =
|
|||||||
* @return {T|undefined} Callback result.
|
* @return {T|undefined} Callback result.
|
||||||
* @template T
|
* @template T
|
||||||
*/
|
*/
|
||||||
ol.render.webgl.ImageReplay.prototype.drawHitDetectionReplayOneByOne_ =
|
ol.render.webgl.ImageReplay.prototype.drawHitDetectionReplayOneByOne_ = function(gl, context, skippedFeaturesHash, featureCallback,
|
||||||
function(gl, context, skippedFeaturesHash, featureCallback,
|
|
||||||
opt_hitExtent) {
|
opt_hitExtent) {
|
||||||
goog.asserts.assert(this.hitDetectionTextures_.length ===
|
goog.asserts.assert(this.hitDetectionTextures_.length ===
|
||||||
this.hitDetectionGroupIndices_.length,
|
this.hitDetectionGroupIndices_.length,
|
||||||
@@ -965,8 +955,7 @@ ol.render.webgl.ReplayGroup = function(
|
|||||||
* @param {ol.webgl.Context} context WebGL context.
|
* @param {ol.webgl.Context} context WebGL context.
|
||||||
* @return {function()} Delete resources function.
|
* @return {function()} Delete resources function.
|
||||||
*/
|
*/
|
||||||
ol.render.webgl.ReplayGroup.prototype.getDeleteResourcesFunction =
|
ol.render.webgl.ReplayGroup.prototype.getDeleteResourcesFunction = function(context) {
|
||||||
function(context) {
|
|
||||||
var functions = [];
|
var functions = [];
|
||||||
var replayKey;
|
var replayKey;
|
||||||
for (replayKey in this.replays_) {
|
for (replayKey in this.replays_) {
|
||||||
@@ -991,8 +980,7 @@ ol.render.webgl.ReplayGroup.prototype.finish = function(context) {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.render.webgl.ReplayGroup.prototype.getReplay =
|
ol.render.webgl.ReplayGroup.prototype.getReplay = function(zIndex, replayType) {
|
||||||
function(zIndex, replayType) {
|
|
||||||
var replay = this.replays_[replayType];
|
var replay = this.replays_[replayType];
|
||||||
if (replay === undefined) {
|
if (replay === undefined) {
|
||||||
var constructor = ol.render.webgl.BATCH_CONSTRUCTORS_[replayType];
|
var constructor = ol.render.webgl.BATCH_CONSTRUCTORS_[replayType];
|
||||||
|
|||||||
@@ -55,8 +55,7 @@ goog.inherits(ol.renderer.canvas.ImageLayer, ol.renderer.canvas.Layer);
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.canvas.ImageLayer.prototype.forEachFeatureAtCoordinate =
|
ol.renderer.canvas.ImageLayer.prototype.forEachFeatureAtCoordinate = function(coordinate, frameState, callback, thisArg) {
|
||||||
function(coordinate, frameState, callback, thisArg) {
|
|
||||||
var layer = this.getLayer();
|
var layer = this.getLayer();
|
||||||
var source = layer.getSource();
|
var source = layer.getSource();
|
||||||
var resolution = frameState.viewState.resolution;
|
var resolution = frameState.viewState.resolution;
|
||||||
@@ -77,8 +76,7 @@ ol.renderer.canvas.ImageLayer.prototype.forEachFeatureAtCoordinate =
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.canvas.ImageLayer.prototype.forEachLayerAtPixel =
|
ol.renderer.canvas.ImageLayer.prototype.forEachLayerAtPixel = function(pixel, frameState, callback, thisArg) {
|
||||||
function(pixel, frameState, callback, thisArg) {
|
|
||||||
if (!this.getImage()) {
|
if (!this.getImage()) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
@@ -144,8 +142,7 @@ ol.renderer.canvas.ImageLayer.prototype.getImageTransform = function() {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.canvas.ImageLayer.prototype.prepareFrame =
|
ol.renderer.canvas.ImageLayer.prototype.prepareFrame = function(frameState, layerState) {
|
||||||
function(frameState, layerState) {
|
|
||||||
|
|
||||||
var pixelRatio = frameState.pixelRatio;
|
var pixelRatio = frameState.pixelRatio;
|
||||||
var viewState = frameState.viewState;
|
var viewState = frameState.viewState;
|
||||||
|
|||||||
@@ -38,8 +38,7 @@ goog.inherits(ol.renderer.canvas.Layer, ol.renderer.Layer);
|
|||||||
* @param {ol.layer.LayerState} layerState Layer state.
|
* @param {ol.layer.LayerState} layerState Layer state.
|
||||||
* @param {CanvasRenderingContext2D} context Context.
|
* @param {CanvasRenderingContext2D} context Context.
|
||||||
*/
|
*/
|
||||||
ol.renderer.canvas.Layer.prototype.composeFrame =
|
ol.renderer.canvas.Layer.prototype.composeFrame = function(frameState, layerState, context) {
|
||||||
function(frameState, layerState, context) {
|
|
||||||
|
|
||||||
this.dispatchPreComposeEvent(context, frameState);
|
this.dispatchPreComposeEvent(context, frameState);
|
||||||
|
|
||||||
@@ -122,8 +121,7 @@ ol.renderer.canvas.Layer.prototype.composeFrame =
|
|||||||
* @param {goog.vec.Mat4.Number=} opt_transform Transform.
|
* @param {goog.vec.Mat4.Number=} opt_transform Transform.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.renderer.canvas.Layer.prototype.dispatchComposeEvent_ =
|
ol.renderer.canvas.Layer.prototype.dispatchComposeEvent_ = function(type, context, frameState, opt_transform) {
|
||||||
function(type, context, frameState, opt_transform) {
|
|
||||||
var layer = this.getLayer();
|
var layer = this.getLayer();
|
||||||
if (layer.hasListener(type)) {
|
if (layer.hasListener(type)) {
|
||||||
var transform = opt_transform !== undefined ?
|
var transform = opt_transform !== undefined ?
|
||||||
@@ -145,8 +143,7 @@ ol.renderer.canvas.Layer.prototype.dispatchComposeEvent_ =
|
|||||||
* @param {goog.vec.Mat4.Number=} opt_transform Transform.
|
* @param {goog.vec.Mat4.Number=} opt_transform Transform.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
ol.renderer.canvas.Layer.prototype.dispatchPostComposeEvent =
|
ol.renderer.canvas.Layer.prototype.dispatchPostComposeEvent = function(context, frameState, opt_transform) {
|
||||||
function(context, frameState, opt_transform) {
|
|
||||||
this.dispatchComposeEvent_(ol.render.EventType.POSTCOMPOSE, context,
|
this.dispatchComposeEvent_(ol.render.EventType.POSTCOMPOSE, context,
|
||||||
frameState, opt_transform);
|
frameState, opt_transform);
|
||||||
};
|
};
|
||||||
@@ -158,8 +155,7 @@ ol.renderer.canvas.Layer.prototype.dispatchPostComposeEvent =
|
|||||||
* @param {goog.vec.Mat4.Number=} opt_transform Transform.
|
* @param {goog.vec.Mat4.Number=} opt_transform Transform.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
ol.renderer.canvas.Layer.prototype.dispatchPreComposeEvent =
|
ol.renderer.canvas.Layer.prototype.dispatchPreComposeEvent = function(context, frameState, opt_transform) {
|
||||||
function(context, frameState, opt_transform) {
|
|
||||||
this.dispatchComposeEvent_(ol.render.EventType.PRECOMPOSE, context,
|
this.dispatchComposeEvent_(ol.render.EventType.PRECOMPOSE, context,
|
||||||
frameState, opt_transform);
|
frameState, opt_transform);
|
||||||
};
|
};
|
||||||
@@ -171,8 +167,7 @@ ol.renderer.canvas.Layer.prototype.dispatchPreComposeEvent =
|
|||||||
* @param {goog.vec.Mat4.Number=} opt_transform Transform.
|
* @param {goog.vec.Mat4.Number=} opt_transform Transform.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
ol.renderer.canvas.Layer.prototype.dispatchRenderEvent =
|
ol.renderer.canvas.Layer.prototype.dispatchRenderEvent = function(context, frameState, opt_transform) {
|
||||||
function(context, frameState, opt_transform) {
|
|
||||||
this.dispatchComposeEvent_(ol.render.EventType.RENDER, context,
|
this.dispatchComposeEvent_(ol.render.EventType.RENDER, context,
|
||||||
frameState, opt_transform);
|
frameState, opt_transform);
|
||||||
};
|
};
|
||||||
@@ -196,8 +191,7 @@ ol.renderer.canvas.Layer.prototype.getImageTransform = goog.abstractMethod;
|
|||||||
* @protected
|
* @protected
|
||||||
* @return {!goog.vec.Mat4.Number} Transform.
|
* @return {!goog.vec.Mat4.Number} Transform.
|
||||||
*/
|
*/
|
||||||
ol.renderer.canvas.Layer.prototype.getTransform =
|
ol.renderer.canvas.Layer.prototype.getTransform = function(frameState, offsetX) {
|
||||||
function(frameState, offsetX) {
|
|
||||||
var viewState = frameState.viewState;
|
var viewState = frameState.viewState;
|
||||||
var pixelRatio = frameState.pixelRatio;
|
var pixelRatio = frameState.pixelRatio;
|
||||||
return ol.vec.Mat4.makeTransform2D(this.transform_,
|
return ol.vec.Mat4.makeTransform2D(this.transform_,
|
||||||
@@ -226,8 +220,7 @@ ol.renderer.canvas.Layer.prototype.prepareFrame = goog.abstractMethod;
|
|||||||
* @return {ol.Pixel} The pixel.
|
* @return {ol.Pixel} The pixel.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
ol.renderer.canvas.Layer.prototype.getPixelOnCanvas =
|
ol.renderer.canvas.Layer.prototype.getPixelOnCanvas = function(pixelOnMap, imageTransformInv) {
|
||||||
function(pixelOnMap, imageTransformInv) {
|
|
||||||
var pixelOnCanvas = [0, 0];
|
var pixelOnCanvas = [0, 0];
|
||||||
ol.vec.Mat4.multVec2(imageTransformInv, pixelOnMap, pixelOnCanvas);
|
ol.vec.Mat4.multVec2(imageTransformInv, pixelOnMap, pixelOnCanvas);
|
||||||
return pixelOnCanvas;
|
return pixelOnCanvas;
|
||||||
|
|||||||
@@ -97,8 +97,7 @@ ol.renderer.canvas.Map.prototype.createLayerRenderer = function(layer) {
|
|||||||
* @param {olx.FrameState} frameState Frame state.
|
* @param {olx.FrameState} frameState Frame state.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.renderer.canvas.Map.prototype.dispatchComposeEvent_ =
|
ol.renderer.canvas.Map.prototype.dispatchComposeEvent_ = function(type, frameState) {
|
||||||
function(type, frameState) {
|
|
||||||
var map = this.getMap();
|
var map = this.getMap();
|
||||||
var context = this.context_;
|
var context = this.context_;
|
||||||
if (map.hasListener(type)) {
|
if (map.hasListener(type)) {
|
||||||
|
|||||||
@@ -122,8 +122,7 @@ ol.renderer.canvas.TileLayer.prototype.getImageTransform = function() {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.canvas.TileLayer.prototype.prepareFrame =
|
ol.renderer.canvas.TileLayer.prototype.prepareFrame = function(frameState, layerState) {
|
||||||
function(frameState, layerState) {
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Warning! You're entering a dangerous zone!
|
// Warning! You're entering a dangerous zone!
|
||||||
@@ -458,8 +457,7 @@ ol.renderer.canvas.TileLayer.prototype.prepareFrame =
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.canvas.TileLayer.prototype.forEachLayerAtPixel =
|
ol.renderer.canvas.TileLayer.prototype.forEachLayerAtPixel = function(pixel, frameState, callback, thisArg) {
|
||||||
function(pixel, frameState, callback, thisArg) {
|
|
||||||
if (!this.context_) {
|
if (!this.context_) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,8 +72,7 @@ goog.inherits(ol.renderer.canvas.VectorLayer, ol.renderer.canvas.Layer);
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.canvas.VectorLayer.prototype.composeFrame =
|
ol.renderer.canvas.VectorLayer.prototype.composeFrame = function(frameState, layerState, context) {
|
||||||
function(frameState, layerState, context) {
|
|
||||||
|
|
||||||
var extent = frameState.extent;
|
var extent = frameState.extent;
|
||||||
var pixelRatio = frameState.pixelRatio;
|
var pixelRatio = frameState.pixelRatio;
|
||||||
@@ -153,8 +152,7 @@ ol.renderer.canvas.VectorLayer.prototype.composeFrame =
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.canvas.VectorLayer.prototype.forEachFeatureAtCoordinate =
|
ol.renderer.canvas.VectorLayer.prototype.forEachFeatureAtCoordinate = function(coordinate, frameState, callback, thisArg) {
|
||||||
function(coordinate, frameState, callback, thisArg) {
|
|
||||||
if (!this.replayGroup_) {
|
if (!this.replayGroup_) {
|
||||||
return undefined;
|
return undefined;
|
||||||
} else {
|
} else {
|
||||||
@@ -187,8 +185,7 @@ ol.renderer.canvas.VectorLayer.prototype.forEachFeatureAtCoordinate =
|
|||||||
* @param {goog.events.Event} event Image style change event.
|
* @param {goog.events.Event} event Image style change event.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.renderer.canvas.VectorLayer.prototype.handleStyleImageChange_ =
|
ol.renderer.canvas.VectorLayer.prototype.handleStyleImageChange_ = function(event) {
|
||||||
function(event) {
|
|
||||||
this.renderIfReadyAndVisible();
|
this.renderIfReadyAndVisible();
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -196,8 +193,7 @@ ol.renderer.canvas.VectorLayer.prototype.handleStyleImageChange_ =
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.canvas.VectorLayer.prototype.prepareFrame =
|
ol.renderer.canvas.VectorLayer.prototype.prepareFrame = function(frameState, layerState) {
|
||||||
function(frameState, layerState) {
|
|
||||||
|
|
||||||
var vectorLayer = /** @type {ol.layer.Vector} */ (this.getLayer());
|
var vectorLayer = /** @type {ol.layer.Vector} */ (this.getLayer());
|
||||||
goog.asserts.assertInstanceof(vectorLayer, ol.layer.Vector,
|
goog.asserts.assertInstanceof(vectorLayer, ol.layer.Vector,
|
||||||
@@ -267,12 +263,11 @@ ol.renderer.canvas.VectorLayer.prototype.prepareFrame =
|
|||||||
ol.renderer.vector.getTolerance(resolution, pixelRatio), extent,
|
ol.renderer.vector.getTolerance(resolution, pixelRatio), extent,
|
||||||
resolution, vectorLayer.getRenderBuffer());
|
resolution, vectorLayer.getRenderBuffer());
|
||||||
vectorSource.loadFeatures(extent, resolution, projection);
|
vectorSource.loadFeatures(extent, resolution, projection);
|
||||||
var renderFeature =
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.Feature} feature Feature.
|
* @param {ol.Feature} feature Feature.
|
||||||
* @this {ol.renderer.canvas.VectorLayer}
|
* @this {ol.renderer.canvas.VectorLayer}
|
||||||
*/
|
*/
|
||||||
function(feature) {
|
var renderFeature = function(feature) {
|
||||||
var styles;
|
var styles;
|
||||||
var styleFunction = feature.getStyleFunction();
|
var styleFunction = feature.getStyleFunction();
|
||||||
if (styleFunction) {
|
if (styleFunction) {
|
||||||
@@ -325,8 +320,7 @@ ol.renderer.canvas.VectorLayer.prototype.prepareFrame =
|
|||||||
* @param {ol.render.canvas.ReplayGroup} replayGroup Replay group.
|
* @param {ol.render.canvas.ReplayGroup} replayGroup Replay group.
|
||||||
* @return {boolean} `true` if an image is loading.
|
* @return {boolean} `true` if an image is loading.
|
||||||
*/
|
*/
|
||||||
ol.renderer.canvas.VectorLayer.prototype.renderFeature =
|
ol.renderer.canvas.VectorLayer.prototype.renderFeature = function(feature, resolution, pixelRatio, styles, replayGroup) {
|
||||||
function(feature, resolution, pixelRatio, styles, replayGroup) {
|
|
||||||
if (!styles) {
|
if (!styles) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,8 +76,7 @@ goog.inherits(ol.renderer.canvas.VectorTileLayer, ol.renderer.canvas.Layer);
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.canvas.VectorTileLayer.prototype.composeFrame =
|
ol.renderer.canvas.VectorTileLayer.prototype.composeFrame = function(frameState, layerState, context) {
|
||||||
function(frameState, layerState, context) {
|
|
||||||
|
|
||||||
var pixelRatio = frameState.pixelRatio;
|
var pixelRatio = frameState.pixelRatio;
|
||||||
var skippedFeatureUids = layerState.managed ?
|
var skippedFeatureUids = layerState.managed ?
|
||||||
@@ -292,8 +291,7 @@ ol.renderer.canvas.VectorTileLayer.prototype.createReplayGroup = function(tile,
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.canvas.VectorTileLayer.prototype.forEachFeatureAtCoordinate =
|
ol.renderer.canvas.VectorTileLayer.prototype.forEachFeatureAtCoordinate = function(coordinate, frameState, callback, thisArg) {
|
||||||
function(coordinate, frameState, callback, thisArg) {
|
|
||||||
var pixelRatio = frameState.pixelRatio;
|
var pixelRatio = frameState.pixelRatio;
|
||||||
var resolution = frameState.viewState.resolution;
|
var resolution = frameState.viewState.resolution;
|
||||||
var rotation = frameState.viewState.rotation;
|
var rotation = frameState.viewState.rotation;
|
||||||
@@ -356,8 +354,7 @@ ol.renderer.canvas.VectorTileLayer.prototype.forEachFeatureAtCoordinate =
|
|||||||
* @param {goog.events.Event} event Image style change event.
|
* @param {goog.events.Event} event Image style change event.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.renderer.canvas.VectorTileLayer.prototype.handleStyleImageChange_ =
|
ol.renderer.canvas.VectorTileLayer.prototype.handleStyleImageChange_ = function(event) {
|
||||||
function(event) {
|
|
||||||
this.renderIfReadyAndVisible();
|
this.renderIfReadyAndVisible();
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -365,8 +362,7 @@ ol.renderer.canvas.VectorTileLayer.prototype.handleStyleImageChange_ =
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.canvas.VectorTileLayer.prototype.prepareFrame =
|
ol.renderer.canvas.VectorTileLayer.prototype.prepareFrame = function(frameState, layerState) {
|
||||||
function(frameState, layerState) {
|
|
||||||
var layer = /** @type {ol.layer.Vector} */ (this.getLayer());
|
var layer = /** @type {ol.layer.Vector} */ (this.getLayer());
|
||||||
goog.asserts.assertInstanceof(layer, ol.layer.VectorTile,
|
goog.asserts.assertInstanceof(layer, ol.layer.VectorTile,
|
||||||
'layer is an instance of ol.layer.VectorTile');
|
'layer is an instance of ol.layer.VectorTile');
|
||||||
@@ -488,8 +484,7 @@ ol.renderer.canvas.VectorTileLayer.prototype.prepareFrame =
|
|||||||
* @param {ol.render.canvas.ReplayGroup} replayGroup Replay group.
|
* @param {ol.render.canvas.ReplayGroup} replayGroup Replay group.
|
||||||
* @return {boolean} `true` if an image is loading.
|
* @return {boolean} `true` if an image is loading.
|
||||||
*/
|
*/
|
||||||
ol.renderer.canvas.VectorTileLayer.prototype.renderFeature =
|
ol.renderer.canvas.VectorTileLayer.prototype.renderFeature = function(feature, squaredTolerance, styles, replayGroup) {
|
||||||
function(feature, squaredTolerance, styles, replayGroup) {
|
|
||||||
if (!styles) {
|
if (!styles) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,8 +45,7 @@ goog.inherits(ol.renderer.dom.ImageLayer, ol.renderer.dom.Layer);
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.dom.ImageLayer.prototype.forEachFeatureAtCoordinate =
|
ol.renderer.dom.ImageLayer.prototype.forEachFeatureAtCoordinate = function(coordinate, frameState, callback, thisArg) {
|
||||||
function(coordinate, frameState, callback, thisArg) {
|
|
||||||
var layer = this.getLayer();
|
var layer = this.getLayer();
|
||||||
var source = layer.getSource();
|
var source = layer.getSource();
|
||||||
var resolution = frameState.viewState.resolution;
|
var resolution = frameState.viewState.resolution;
|
||||||
@@ -76,8 +75,7 @@ ol.renderer.dom.ImageLayer.prototype.clearFrame = function() {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.dom.ImageLayer.prototype.prepareFrame =
|
ol.renderer.dom.ImageLayer.prototype.prepareFrame = function(frameState, layerState) {
|
||||||
function(frameState, layerState) {
|
|
||||||
|
|
||||||
var viewState = frameState.viewState;
|
var viewState = frameState.viewState;
|
||||||
var viewCenter = viewState.center;
|
var viewCenter = viewState.center;
|
||||||
|
|||||||
@@ -117,8 +117,7 @@ ol.renderer.dom.Map.prototype.createLayerRenderer = function(layer) {
|
|||||||
* @param {olx.FrameState} frameState Frame state.
|
* @param {olx.FrameState} frameState Frame state.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.renderer.dom.Map.prototype.dispatchComposeEvent_ =
|
ol.renderer.dom.Map.prototype.dispatchComposeEvent_ = function(type, frameState) {
|
||||||
function(type, frameState) {
|
|
||||||
var map = this.getMap();
|
var map = this.getMap();
|
||||||
if (map.hasListener(type)) {
|
if (map.hasListener(type)) {
|
||||||
var extent = frameState.extent;
|
var extent = frameState.extent;
|
||||||
|
|||||||
@@ -76,8 +76,7 @@ ol.renderer.dom.TileLayer.prototype.clearFrame = function() {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.dom.TileLayer.prototype.prepareFrame =
|
ol.renderer.dom.TileLayer.prototype.prepareFrame = function(frameState, layerState) {
|
||||||
function(frameState, layerState) {
|
|
||||||
|
|
||||||
if (!layerState.visible) {
|
if (!layerState.visible) {
|
||||||
if (this.renderedVisible_) {
|
if (this.renderedVisible_) {
|
||||||
@@ -420,8 +419,7 @@ ol.renderer.dom.TileLayerZ_.prototype.getResolution = function() {
|
|||||||
* @param {ol.Extent} extent Extent.
|
* @param {ol.Extent} extent Extent.
|
||||||
* @param {ol.TileRange=} opt_tileRange Temporary ol.TileRange object.
|
* @param {ol.TileRange=} opt_tileRange Temporary ol.TileRange object.
|
||||||
*/
|
*/
|
||||||
ol.renderer.dom.TileLayerZ_.prototype.removeTilesOutsideExtent =
|
ol.renderer.dom.TileLayerZ_.prototype.removeTilesOutsideExtent = function(extent, opt_tileRange) {
|
||||||
function(extent, opt_tileRange) {
|
|
||||||
var tileRange = this.tileGrid_.getTileRangeForExtentAndZ(
|
var tileRange = this.tileGrid_.getTileRangeForExtentAndZ(
|
||||||
extent, this.tileCoordOrigin_[0], opt_tileRange);
|
extent, this.tileCoordOrigin_[0], opt_tileRange);
|
||||||
/** @type {Array.<ol.Tile>} */
|
/** @type {Array.<ol.Tile>} */
|
||||||
|
|||||||
@@ -94,8 +94,7 @@ goog.inherits(ol.renderer.dom.VectorLayer, ol.renderer.dom.Layer);
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.dom.VectorLayer.prototype.composeFrame =
|
ol.renderer.dom.VectorLayer.prototype.composeFrame = function(frameState, layerState) {
|
||||||
function(frameState, layerState) {
|
|
||||||
|
|
||||||
var vectorLayer = /** @type {ol.layer.Vector} */ (this.getLayer());
|
var vectorLayer = /** @type {ol.layer.Vector} */ (this.getLayer());
|
||||||
goog.asserts.assertInstanceof(vectorLayer, ol.layer.Vector,
|
goog.asserts.assertInstanceof(vectorLayer, ol.layer.Vector,
|
||||||
@@ -156,8 +155,7 @@ ol.renderer.dom.VectorLayer.prototype.composeFrame =
|
|||||||
* @param {goog.vec.Mat4.Number} transform Transform.
|
* @param {goog.vec.Mat4.Number} transform Transform.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.renderer.dom.VectorLayer.prototype.dispatchEvent_ =
|
ol.renderer.dom.VectorLayer.prototype.dispatchEvent_ = function(type, frameState, transform) {
|
||||||
function(type, frameState, transform) {
|
|
||||||
var context = this.context_;
|
var context = this.context_;
|
||||||
var layer = this.getLayer();
|
var layer = this.getLayer();
|
||||||
if (layer.hasListener(type)) {
|
if (layer.hasListener(type)) {
|
||||||
@@ -175,8 +173,7 @@ ol.renderer.dom.VectorLayer.prototype.dispatchEvent_ =
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.dom.VectorLayer.prototype.forEachFeatureAtCoordinate =
|
ol.renderer.dom.VectorLayer.prototype.forEachFeatureAtCoordinate = function(coordinate, frameState, callback, thisArg) {
|
||||||
function(coordinate, frameState, callback, thisArg) {
|
|
||||||
if (!this.replayGroup_) {
|
if (!this.replayGroup_) {
|
||||||
return undefined;
|
return undefined;
|
||||||
} else {
|
} else {
|
||||||
@@ -209,8 +206,7 @@ ol.renderer.dom.VectorLayer.prototype.forEachFeatureAtCoordinate =
|
|||||||
* @param {goog.events.Event} event Image style change event.
|
* @param {goog.events.Event} event Image style change event.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.renderer.dom.VectorLayer.prototype.handleStyleImageChange_ =
|
ol.renderer.dom.VectorLayer.prototype.handleStyleImageChange_ = function(event) {
|
||||||
function(event) {
|
|
||||||
this.renderIfReadyAndVisible();
|
this.renderIfReadyAndVisible();
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -218,8 +214,7 @@ ol.renderer.dom.VectorLayer.prototype.handleStyleImageChange_ =
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.dom.VectorLayer.prototype.prepareFrame =
|
ol.renderer.dom.VectorLayer.prototype.prepareFrame = function(frameState, layerState) {
|
||||||
function(frameState, layerState) {
|
|
||||||
|
|
||||||
var vectorLayer = /** @type {ol.layer.Vector} */ (this.getLayer());
|
var vectorLayer = /** @type {ol.layer.Vector} */ (this.getLayer());
|
||||||
goog.asserts.assertInstanceof(vectorLayer, ol.layer.Vector,
|
goog.asserts.assertInstanceof(vectorLayer, ol.layer.Vector,
|
||||||
@@ -275,12 +270,11 @@ ol.renderer.dom.VectorLayer.prototype.prepareFrame =
|
|||||||
ol.renderer.vector.getTolerance(resolution, pixelRatio), extent,
|
ol.renderer.vector.getTolerance(resolution, pixelRatio), extent,
|
||||||
resolution, vectorLayer.getRenderBuffer());
|
resolution, vectorLayer.getRenderBuffer());
|
||||||
vectorSource.loadFeatures(extent, resolution, projection);
|
vectorSource.loadFeatures(extent, resolution, projection);
|
||||||
var renderFeature =
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.Feature} feature Feature.
|
* @param {ol.Feature} feature Feature.
|
||||||
* @this {ol.renderer.dom.VectorLayer}
|
* @this {ol.renderer.dom.VectorLayer}
|
||||||
*/
|
*/
|
||||||
function(feature) {
|
var renderFeature = function(feature) {
|
||||||
var styles;
|
var styles;
|
||||||
var styleFunction = feature.getStyleFunction();
|
var styleFunction = feature.getStyleFunction();
|
||||||
if (styleFunction) {
|
if (styleFunction) {
|
||||||
@@ -333,8 +327,7 @@ ol.renderer.dom.VectorLayer.prototype.prepareFrame =
|
|||||||
* @param {ol.render.canvas.ReplayGroup} replayGroup Replay group.
|
* @param {ol.render.canvas.ReplayGroup} replayGroup Replay group.
|
||||||
* @return {boolean} `true` if an image is loading.
|
* @return {boolean} `true` if an image is loading.
|
||||||
*/
|
*/
|
||||||
ol.renderer.dom.VectorLayer.prototype.renderFeature =
|
ol.renderer.dom.VectorLayer.prototype.renderFeature = function(feature, resolution, pixelRatio, styles, replayGroup) {
|
||||||
function(feature, resolution, pixelRatio, styles, replayGroup) {
|
|
||||||
if (!styles) {
|
if (!styles) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,8 +58,7 @@ ol.renderer.Layer.prototype.forEachFeatureAtCoordinate = ol.nullFunction;
|
|||||||
* @return {T|undefined} Callback result.
|
* @return {T|undefined} Callback result.
|
||||||
* @template S,T
|
* @template S,T
|
||||||
*/
|
*/
|
||||||
ol.renderer.Layer.prototype.forEachLayerAtPixel =
|
ol.renderer.Layer.prototype.forEachLayerAtPixel = function(pixel, frameState, callback, thisArg) {
|
||||||
function(pixel, frameState, callback, thisArg) {
|
|
||||||
var coordinate = pixel.slice();
|
var coordinate = pixel.slice();
|
||||||
ol.vec.Mat4.multVec2(
|
ol.vec.Mat4.multVec2(
|
||||||
frameState.pixelToCoordinateMatrix, coordinate, coordinate);
|
frameState.pixelToCoordinateMatrix, coordinate, coordinate);
|
||||||
@@ -94,8 +93,7 @@ ol.renderer.Layer.prototype.hasFeatureAtCoordinate = goog.functions.FALSE;
|
|||||||
* lookup.
|
* lookup.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
ol.renderer.Layer.prototype.createLoadedTileFinder =
|
ol.renderer.Layer.prototype.createLoadedTileFinder = function(source, projection, tiles) {
|
||||||
function(source, projection, tiles) {
|
|
||||||
return (
|
return (
|
||||||
/**
|
/**
|
||||||
* @param {number} zoom Zoom level.
|
* @param {number} zoom Zoom level.
|
||||||
@@ -103,13 +101,13 @@ ol.renderer.Layer.prototype.createLoadedTileFinder =
|
|||||||
* @return {boolean} The tile range is fully loaded.
|
* @return {boolean} The tile range is fully loaded.
|
||||||
*/
|
*/
|
||||||
function(zoom, tileRange) {
|
function(zoom, tileRange) {
|
||||||
return source.forEachLoadedTile(projection, zoom,
|
function callback(tile) {
|
||||||
tileRange, function(tile) {
|
|
||||||
if (!tiles[zoom]) {
|
if (!tiles[zoom]) {
|
||||||
tiles[zoom] = {};
|
tiles[zoom] = {};
|
||||||
}
|
}
|
||||||
tiles[zoom][tile.tileCoord.toString()] = tile;
|
tiles[zoom][tile.tileCoord.toString()] = tile;
|
||||||
});
|
}
|
||||||
|
return source.forEachLoadedTile(projection, zoom, tileRange, callback);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -182,8 +180,7 @@ ol.renderer.Layer.prototype.renderIfReadyAndVisible = function() {
|
|||||||
* @param {ol.source.Tile} tileSource Tile source.
|
* @param {ol.source.Tile} tileSource Tile source.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
ol.renderer.Layer.prototype.scheduleExpireCache =
|
ol.renderer.Layer.prototype.scheduleExpireCache = function(frameState, tileSource) {
|
||||||
function(frameState, tileSource) {
|
|
||||||
if (tileSource.canExpireCache()) {
|
if (tileSource.canExpireCache()) {
|
||||||
frameState.postRenderFunctions.push(
|
frameState.postRenderFunctions.push(
|
||||||
goog.partial(
|
goog.partial(
|
||||||
@@ -207,8 +204,7 @@ ol.renderer.Layer.prototype.scheduleExpireCache =
|
|||||||
* @param {Array.<ol.Attribution>} attributions Attributions (source).
|
* @param {Array.<ol.Attribution>} attributions Attributions (source).
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
ol.renderer.Layer.prototype.updateAttributions =
|
ol.renderer.Layer.prototype.updateAttributions = function(attributionsSet, attributions) {
|
||||||
function(attributionsSet, attributions) {
|
|
||||||
if (attributions) {
|
if (attributions) {
|
||||||
var attribution, i, ii;
|
var attribution, i, ii;
|
||||||
for (i = 0, ii = attributions.length; i < ii; ++i) {
|
for (i = 0, ii = attributions.length; i < ii; ++i) {
|
||||||
@@ -245,8 +241,7 @@ ol.renderer.Layer.prototype.updateLogos = function(frameState, source) {
|
|||||||
* @param {ol.TileRange} tileRange Tile range.
|
* @param {ol.TileRange} tileRange Tile range.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
ol.renderer.Layer.prototype.updateUsedTiles =
|
ol.renderer.Layer.prototype.updateUsedTiles = function(usedTiles, tileSource, z, tileRange) {
|
||||||
function(usedTiles, tileSource, z, tileRange) {
|
|
||||||
// FIXME should we use tilesToDrawByZ instead?
|
// FIXME should we use tilesToDrawByZ instead?
|
||||||
var tileSourceKey = goog.getUid(tileSource).toString();
|
var tileSourceKey = goog.getUid(tileSource).toString();
|
||||||
var zKey = z.toString();
|
var zKey = z.toString();
|
||||||
@@ -270,8 +265,7 @@ ol.renderer.Layer.prototype.updateUsedTiles =
|
|||||||
* @protected
|
* @protected
|
||||||
* @return {ol.Coordinate} Snapped center.
|
* @return {ol.Coordinate} Snapped center.
|
||||||
*/
|
*/
|
||||||
ol.renderer.Layer.prototype.snapCenterToPixel =
|
ol.renderer.Layer.prototype.snapCenterToPixel = function(center, resolution, size) {
|
||||||
function(center, resolution, size) {
|
|
||||||
return [
|
return [
|
||||||
resolution * (Math.round(center[0] / resolution) + (size[0] % 2) / 2),
|
resolution * (Math.round(center[0] / resolution) + (size[0] % 2) / 2),
|
||||||
resolution * (Math.round(center[1] / resolution) + (size[1] % 2) / 2)
|
resolution * (Math.round(center[1] / resolution) + (size[1] % 2) / 2)
|
||||||
|
|||||||
@@ -125,8 +125,7 @@ ol.renderer.Map.expireIconCache_ = function(map, frameState) {
|
|||||||
* @return {T|undefined} Callback result.
|
* @return {T|undefined} Callback result.
|
||||||
* @template S,T,U
|
* @template S,T,U
|
||||||
*/
|
*/
|
||||||
ol.renderer.Map.prototype.forEachFeatureAtCoordinate =
|
ol.renderer.Map.prototype.forEachFeatureAtCoordinate = function(coordinate, frameState, callback, thisArg,
|
||||||
function(coordinate, frameState, callback, thisArg,
|
|
||||||
layerFilter, thisArg2) {
|
layerFilter, thisArg2) {
|
||||||
var result;
|
var result;
|
||||||
var viewState = frameState.viewState;
|
var viewState = frameState.viewState;
|
||||||
@@ -200,8 +199,7 @@ ol.renderer.Map.prototype.forEachFeatureAtCoordinate =
|
|||||||
* @return {T|undefined} Callback result.
|
* @return {T|undefined} Callback result.
|
||||||
* @template S,T,U
|
* @template S,T,U
|
||||||
*/
|
*/
|
||||||
ol.renderer.Map.prototype.forEachLayerAtPixel =
|
ol.renderer.Map.prototype.forEachLayerAtPixel = function(pixel, frameState, callback, thisArg,
|
||||||
function(pixel, frameState, callback, thisArg,
|
|
||||||
layerFilter, thisArg2) {
|
layerFilter, thisArg2) {
|
||||||
var result;
|
var result;
|
||||||
var viewState = frameState.viewState;
|
var viewState = frameState.viewState;
|
||||||
@@ -238,8 +236,7 @@ ol.renderer.Map.prototype.forEachLayerAtPixel =
|
|||||||
* @return {boolean} Is there a feature at the given coordinate?
|
* @return {boolean} Is there a feature at the given coordinate?
|
||||||
* @template U
|
* @template U
|
||||||
*/
|
*/
|
||||||
ol.renderer.Map.prototype.hasFeatureAtCoordinate =
|
ol.renderer.Map.prototype.hasFeatureAtCoordinate = function(coordinate, frameState, layerFilter, thisArg) {
|
||||||
function(coordinate, frameState, layerFilter, thisArg) {
|
|
||||||
var hasFeature = this.forEachFeatureAtCoordinate(
|
var hasFeature = this.forEachFeatureAtCoordinate(
|
||||||
coordinate, frameState, goog.functions.TRUE, this, layerFilter, thisArg);
|
coordinate, frameState, goog.functions.TRUE, this, layerFilter, thisArg);
|
||||||
|
|
||||||
@@ -344,8 +341,7 @@ ol.renderer.Map.prototype.renderFrame = ol.nullFunction;
|
|||||||
* @param {olx.FrameState} frameState Frame state.
|
* @param {olx.FrameState} frameState Frame state.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.renderer.Map.prototype.removeUnusedLayerRenderers_ =
|
ol.renderer.Map.prototype.removeUnusedLayerRenderers_ = function(map, frameState) {
|
||||||
function(map, frameState) {
|
|
||||||
var layerKey;
|
var layerKey;
|
||||||
for (layerKey in this.layerRenderers_) {
|
for (layerKey in this.layerRenderers_) {
|
||||||
if (!frameState || !(layerKey in frameState.layerStates)) {
|
if (!frameState || !(layerKey in frameState.layerStates)) {
|
||||||
@@ -368,8 +364,7 @@ ol.renderer.Map.prototype.scheduleExpireIconCache = function(frameState) {
|
|||||||
* @param {!olx.FrameState} frameState Frame state.
|
* @param {!olx.FrameState} frameState Frame state.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
ol.renderer.Map.prototype.scheduleRemoveUnusedLayerRenderers =
|
ol.renderer.Map.prototype.scheduleRemoveUnusedLayerRenderers = function(frameState) {
|
||||||
function(frameState) {
|
|
||||||
var layerKey;
|
var layerKey;
|
||||||
for (layerKey in this.layerRenderers_) {
|
for (layerKey in this.layerRenderers_) {
|
||||||
if (!(layerKey in frameState.layerStates)) {
|
if (!(layerKey in frameState.layerStates)) {
|
||||||
|
|||||||
@@ -74,8 +74,7 @@ ol.renderer.webgl.ImageLayer.prototype.createTexture_ = function(image) {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.webgl.ImageLayer.prototype.forEachFeatureAtCoordinate =
|
ol.renderer.webgl.ImageLayer.prototype.forEachFeatureAtCoordinate = function(coordinate, frameState, callback, thisArg) {
|
||||||
function(coordinate, frameState, callback, thisArg) {
|
|
||||||
var layer = this.getLayer();
|
var layer = this.getLayer();
|
||||||
var source = layer.getSource();
|
var source = layer.getSource();
|
||||||
var resolution = frameState.viewState.resolution;
|
var resolution = frameState.viewState.resolution;
|
||||||
@@ -97,8 +96,7 @@ ol.renderer.webgl.ImageLayer.prototype.forEachFeatureAtCoordinate =
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.webgl.ImageLayer.prototype.prepareFrame =
|
ol.renderer.webgl.ImageLayer.prototype.prepareFrame = function(frameState, layerState, context) {
|
||||||
function(frameState, layerState, context) {
|
|
||||||
|
|
||||||
var gl = this.mapRenderer.getGL();
|
var gl = this.mapRenderer.getGL();
|
||||||
|
|
||||||
@@ -194,8 +192,7 @@ ol.renderer.webgl.ImageLayer.prototype.prepareFrame =
|
|||||||
* @param {ol.Extent} imageExtent Image extent.
|
* @param {ol.Extent} imageExtent Image extent.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.renderer.webgl.ImageLayer.prototype.updateProjectionMatrix_ =
|
ol.renderer.webgl.ImageLayer.prototype.updateProjectionMatrix_ = function(canvasWidth, canvasHeight, pixelRatio,
|
||||||
function(canvasWidth, canvasHeight, pixelRatio,
|
|
||||||
viewCenter, viewResolution, viewRotation, imageExtent) {
|
viewCenter, viewResolution, viewRotation, imageExtent) {
|
||||||
|
|
||||||
var canvasExtentWidth = canvasWidth * viewResolution;
|
var canvasExtentWidth = canvasWidth * viewResolution;
|
||||||
@@ -223,8 +220,7 @@ ol.renderer.webgl.ImageLayer.prototype.updateProjectionMatrix_ =
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.webgl.ImageLayer.prototype.hasFeatureAtCoordinate =
|
ol.renderer.webgl.ImageLayer.prototype.hasFeatureAtCoordinate = function(coordinate, frameState) {
|
||||||
function(coordinate, frameState) {
|
|
||||||
var hasFeature = this.forEachFeatureAtCoordinate(
|
var hasFeature = this.forEachFeatureAtCoordinate(
|
||||||
coordinate, frameState, goog.functions.TRUE, this);
|
coordinate, frameState, goog.functions.TRUE, this);
|
||||||
return hasFeature !== undefined;
|
return hasFeature !== undefined;
|
||||||
@@ -234,8 +230,7 @@ ol.renderer.webgl.ImageLayer.prototype.hasFeatureAtCoordinate =
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.webgl.ImageLayer.prototype.forEachLayerAtPixel =
|
ol.renderer.webgl.ImageLayer.prototype.forEachLayerAtPixel = function(pixel, frameState, callback, thisArg) {
|
||||||
function(pixel, frameState, callback, thisArg) {
|
|
||||||
if (!this.image_ || !this.image_.getImage()) {
|
if (!this.image_ || !this.image_.getImage()) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
@@ -299,8 +294,7 @@ ol.renderer.webgl.ImageLayer.prototype.forEachLayerAtPixel =
|
|||||||
* @return {goog.vec.Mat4.Number} The transformation matrix.
|
* @return {goog.vec.Mat4.Number} The transformation matrix.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.renderer.webgl.ImageLayer.prototype.getHitTransformationMatrix_ =
|
ol.renderer.webgl.ImageLayer.prototype.getHitTransformationMatrix_ = function(mapSize, imageSize) {
|
||||||
function(mapSize, imageSize) {
|
|
||||||
// the first matrix takes a map pixel, flips the y-axis and scales to
|
// the first matrix takes a map pixel, flips the y-axis and scales to
|
||||||
// a range between -1 ... 1
|
// a range between -1 ... 1
|
||||||
var mapCoordMatrix = goog.vec.Mat4.createNumber();
|
var mapCoordMatrix = goog.vec.Mat4.createNumber();
|
||||||
|
|||||||
@@ -88,8 +88,7 @@ goog.inherits(ol.renderer.webgl.Layer, ol.renderer.Layer);
|
|||||||
* @param {number} framebufferDimension Framebuffer dimension.
|
* @param {number} framebufferDimension Framebuffer dimension.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
ol.renderer.webgl.Layer.prototype.bindFramebuffer =
|
ol.renderer.webgl.Layer.prototype.bindFramebuffer = function(frameState, framebufferDimension) {
|
||||||
function(frameState, framebufferDimension) {
|
|
||||||
|
|
||||||
var gl = this.mapRenderer.getGL();
|
var gl = this.mapRenderer.getGL();
|
||||||
|
|
||||||
@@ -134,8 +133,7 @@ ol.renderer.webgl.Layer.prototype.bindFramebuffer =
|
|||||||
* @param {ol.layer.LayerState} layerState Layer state.
|
* @param {ol.layer.LayerState} layerState Layer state.
|
||||||
* @param {ol.webgl.Context} context Context.
|
* @param {ol.webgl.Context} context Context.
|
||||||
*/
|
*/
|
||||||
ol.renderer.webgl.Layer.prototype.composeFrame =
|
ol.renderer.webgl.Layer.prototype.composeFrame = function(frameState, layerState, context) {
|
||||||
function(frameState, layerState, context) {
|
|
||||||
|
|
||||||
this.dispatchComposeEvent_(
|
this.dispatchComposeEvent_(
|
||||||
ol.render.EventType.PRECOMPOSE, context, frameState);
|
ol.render.EventType.PRECOMPOSE, context, frameState);
|
||||||
@@ -189,8 +187,7 @@ ol.renderer.webgl.Layer.prototype.composeFrame =
|
|||||||
* @param {olx.FrameState} frameState Frame state.
|
* @param {olx.FrameState} frameState Frame state.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.renderer.webgl.Layer.prototype.dispatchComposeEvent_ =
|
ol.renderer.webgl.Layer.prototype.dispatchComposeEvent_ = function(type, context, frameState) {
|
||||||
function(type, context, frameState) {
|
|
||||||
var layer = this.getLayer();
|
var layer = this.getLayer();
|
||||||
if (layer.hasListener(type)) {
|
if (layer.hasListener(type)) {
|
||||||
var viewState = frameState.viewState;
|
var viewState = frameState.viewState;
|
||||||
|
|||||||
@@ -187,8 +187,7 @@ goog.inherits(ol.renderer.webgl.Map, ol.renderer.Map);
|
|||||||
* @param {number} magFilter Mag filter.
|
* @param {number} magFilter Mag filter.
|
||||||
* @param {number} minFilter Min filter.
|
* @param {number} minFilter Min filter.
|
||||||
*/
|
*/
|
||||||
ol.renderer.webgl.Map.prototype.bindTileTexture =
|
ol.renderer.webgl.Map.prototype.bindTileTexture = function(tile, tileSize, tileGutter, magFilter, minFilter) {
|
||||||
function(tile, tileSize, tileGutter, magFilter, minFilter) {
|
|
||||||
var gl = this.getGL();
|
var gl = this.getGL();
|
||||||
var tileKey = tile.getKey();
|
var tileKey = tile.getKey();
|
||||||
if (this.textureCache_.containsKey(tileKey)) {
|
if (this.textureCache_.containsKey(tileKey)) {
|
||||||
@@ -270,8 +269,7 @@ ol.renderer.webgl.Map.prototype.createLayerRenderer = function(layer) {
|
|||||||
* @param {olx.FrameState} frameState Frame state.
|
* @param {olx.FrameState} frameState Frame state.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.renderer.webgl.Map.prototype.dispatchComposeEvent_ =
|
ol.renderer.webgl.Map.prototype.dispatchComposeEvent_ = function(type, frameState) {
|
||||||
function(type, frameState) {
|
|
||||||
var map = this.getMap();
|
var map = this.getMap();
|
||||||
if (map.hasListener(type)) {
|
if (map.hasListener(type)) {
|
||||||
var context = this.context_;
|
var context = this.context_;
|
||||||
@@ -536,8 +534,7 @@ ol.renderer.webgl.Map.prototype.renderFrame = function(frameState) {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.webgl.Map.prototype.forEachFeatureAtCoordinate =
|
ol.renderer.webgl.Map.prototype.forEachFeatureAtCoordinate = function(coordinate, frameState, callback, thisArg,
|
||||||
function(coordinate, frameState, callback, thisArg,
|
|
||||||
layerFilter, thisArg2) {
|
layerFilter, thisArg2) {
|
||||||
var result;
|
var result;
|
||||||
|
|
||||||
@@ -570,8 +567,7 @@ ol.renderer.webgl.Map.prototype.forEachFeatureAtCoordinate =
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.webgl.Map.prototype.hasFeatureAtCoordinate =
|
ol.renderer.webgl.Map.prototype.hasFeatureAtCoordinate = function(coordinate, frameState, layerFilter, thisArg) {
|
||||||
function(coordinate, frameState, layerFilter, thisArg) {
|
|
||||||
var hasFeature = false;
|
var hasFeature = false;
|
||||||
|
|
||||||
if (this.getGL().isContextLost()) {
|
if (this.getGL().isContextLost()) {
|
||||||
@@ -603,8 +599,7 @@ ol.renderer.webgl.Map.prototype.hasFeatureAtCoordinate =
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.webgl.Map.prototype.forEachLayerAtPixel =
|
ol.renderer.webgl.Map.prototype.forEachLayerAtPixel = function(pixel, frameState, callback, thisArg,
|
||||||
function(pixel, frameState, callback, thisArg,
|
|
||||||
layerFilter, thisArg2) {
|
layerFilter, thisArg2) {
|
||||||
if (this.getGL().isContextLost()) {
|
if (this.getGL().isContextLost()) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -112,8 +112,7 @@ ol.renderer.webgl.TileLayer.prototype.disposeInternal = function() {
|
|||||||
* lookup.
|
* lookup.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
ol.renderer.webgl.TileLayer.prototype.createLoadedTileFinder =
|
ol.renderer.webgl.TileLayer.prototype.createLoadedTileFinder = function(source, projection, tiles) {
|
||||||
function(source, projection, tiles) {
|
|
||||||
var mapRenderer = this.mapRenderer;
|
var mapRenderer = this.mapRenderer;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -123,8 +122,7 @@ ol.renderer.webgl.TileLayer.prototype.createLoadedTileFinder =
|
|||||||
* @return {boolean} The tile range is fully loaded.
|
* @return {boolean} The tile range is fully loaded.
|
||||||
*/
|
*/
|
||||||
function(zoom, tileRange) {
|
function(zoom, tileRange) {
|
||||||
return source.forEachLoadedTile(projection, zoom,
|
function callback(tile) {
|
||||||
tileRange, function(tile) {
|
|
||||||
var loaded = mapRenderer.isTileTextureLoaded(tile);
|
var loaded = mapRenderer.isTileTextureLoaded(tile);
|
||||||
if (loaded) {
|
if (loaded) {
|
||||||
if (!tiles[zoom]) {
|
if (!tiles[zoom]) {
|
||||||
@@ -133,7 +131,8 @@ ol.renderer.webgl.TileLayer.prototype.createLoadedTileFinder =
|
|||||||
tiles[zoom][tile.tileCoord.toString()] = tile;
|
tiles[zoom][tile.tileCoord.toString()] = tile;
|
||||||
}
|
}
|
||||||
return loaded;
|
return loaded;
|
||||||
});
|
}
|
||||||
|
return source.forEachLoadedTile(projection, zoom, tileRange, callback);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -150,8 +149,7 @@ ol.renderer.webgl.TileLayer.prototype.handleWebGLContextLost = function() {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.webgl.TileLayer.prototype.prepareFrame =
|
ol.renderer.webgl.TileLayer.prototype.prepareFrame = function(frameState, layerState, context) {
|
||||||
function(frameState, layerState, context) {
|
|
||||||
|
|
||||||
var mapRenderer = this.mapRenderer;
|
var mapRenderer = this.mapRenderer;
|
||||||
var gl = context.getGL();
|
var gl = context.getGL();
|
||||||
@@ -385,8 +383,7 @@ ol.renderer.webgl.TileLayer.prototype.prepareFrame =
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.webgl.TileLayer.prototype.forEachLayerAtPixel =
|
ol.renderer.webgl.TileLayer.prototype.forEachLayerAtPixel = function(pixel, frameState, callback, thisArg) {
|
||||||
function(pixel, frameState, callback, thisArg) {
|
|
||||||
if (!this.framebuffer) {
|
if (!this.framebuffer) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,8 +72,7 @@ goog.inherits(ol.renderer.webgl.VectorLayer, ol.renderer.webgl.Layer);
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.webgl.VectorLayer.prototype.composeFrame =
|
ol.renderer.webgl.VectorLayer.prototype.composeFrame = function(frameState, layerState, context) {
|
||||||
function(frameState, layerState, context) {
|
|
||||||
this.layerState_ = layerState;
|
this.layerState_ = layerState;
|
||||||
var viewState = frameState.viewState;
|
var viewState = frameState.viewState;
|
||||||
var replayGroup = this.replayGroup_;
|
var replayGroup = this.replayGroup_;
|
||||||
@@ -104,8 +103,7 @@ ol.renderer.webgl.VectorLayer.prototype.disposeInternal = function() {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.webgl.VectorLayer.prototype.forEachFeatureAtCoordinate =
|
ol.renderer.webgl.VectorLayer.prototype.forEachFeatureAtCoordinate = function(coordinate, frameState, callback, thisArg) {
|
||||||
function(coordinate, frameState, callback, thisArg) {
|
|
||||||
if (!this.replayGroup_ || !this.layerState_) {
|
if (!this.replayGroup_ || !this.layerState_) {
|
||||||
return undefined;
|
return undefined;
|
||||||
} else {
|
} else {
|
||||||
@@ -138,8 +136,7 @@ ol.renderer.webgl.VectorLayer.prototype.forEachFeatureAtCoordinate =
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.webgl.VectorLayer.prototype.hasFeatureAtCoordinate =
|
ol.renderer.webgl.VectorLayer.prototype.hasFeatureAtCoordinate = function(coordinate, frameState) {
|
||||||
function(coordinate, frameState) {
|
|
||||||
if (!this.replayGroup_ || !this.layerState_) {
|
if (!this.replayGroup_ || !this.layerState_) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
@@ -157,8 +154,7 @@ ol.renderer.webgl.VectorLayer.prototype.hasFeatureAtCoordinate =
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.webgl.VectorLayer.prototype.forEachLayerAtPixel =
|
ol.renderer.webgl.VectorLayer.prototype.forEachLayerAtPixel = function(pixel, frameState, callback, thisArg) {
|
||||||
function(pixel, frameState, callback, thisArg) {
|
|
||||||
var coordinate = pixel.slice();
|
var coordinate = pixel.slice();
|
||||||
ol.vec.Mat4.multVec2(
|
ol.vec.Mat4.multVec2(
|
||||||
frameState.pixelToCoordinateMatrix, coordinate, coordinate);
|
frameState.pixelToCoordinateMatrix, coordinate, coordinate);
|
||||||
@@ -177,8 +173,7 @@ ol.renderer.webgl.VectorLayer.prototype.forEachLayerAtPixel =
|
|||||||
* @param {goog.events.Event} event Image style change event.
|
* @param {goog.events.Event} event Image style change event.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.renderer.webgl.VectorLayer.prototype.handleStyleImageChange_ =
|
ol.renderer.webgl.VectorLayer.prototype.handleStyleImageChange_ = function(event) {
|
||||||
function(event) {
|
|
||||||
this.renderIfReadyAndVisible();
|
this.renderIfReadyAndVisible();
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -186,8 +181,7 @@ ol.renderer.webgl.VectorLayer.prototype.handleStyleImageChange_ =
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.renderer.webgl.VectorLayer.prototype.prepareFrame =
|
ol.renderer.webgl.VectorLayer.prototype.prepareFrame = function(frameState, layerState, context) {
|
||||||
function(frameState, layerState, context) {
|
|
||||||
|
|
||||||
var vectorLayer = /** @type {ol.layer.Vector} */ (this.getLayer());
|
var vectorLayer = /** @type {ol.layer.Vector} */ (this.getLayer());
|
||||||
goog.asserts.assertInstanceof(vectorLayer, ol.layer.Vector,
|
goog.asserts.assertInstanceof(vectorLayer, ol.layer.Vector,
|
||||||
@@ -243,12 +237,11 @@ ol.renderer.webgl.VectorLayer.prototype.prepareFrame =
|
|||||||
ol.renderer.vector.getTolerance(resolution, pixelRatio),
|
ol.renderer.vector.getTolerance(resolution, pixelRatio),
|
||||||
extent, vectorLayer.getRenderBuffer());
|
extent, vectorLayer.getRenderBuffer());
|
||||||
vectorSource.loadFeatures(extent, resolution, projection);
|
vectorSource.loadFeatures(extent, resolution, projection);
|
||||||
var renderFeature =
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.Feature} feature Feature.
|
* @param {ol.Feature} feature Feature.
|
||||||
* @this {ol.renderer.webgl.VectorLayer}
|
* @this {ol.renderer.webgl.VectorLayer}
|
||||||
*/
|
*/
|
||||||
function(feature) {
|
var renderFeature = function(feature) {
|
||||||
var styles;
|
var styles;
|
||||||
var styleFunction = feature.getStyleFunction();
|
var styleFunction = feature.getStyleFunction();
|
||||||
if (styleFunction) {
|
if (styleFunction) {
|
||||||
@@ -301,8 +294,7 @@ ol.renderer.webgl.VectorLayer.prototype.prepareFrame =
|
|||||||
* @param {ol.render.webgl.ReplayGroup} replayGroup Replay group.
|
* @param {ol.render.webgl.ReplayGroup} replayGroup Replay group.
|
||||||
* @return {boolean} `true` if an image is loading.
|
* @return {boolean} `true` if an image is loading.
|
||||||
*/
|
*/
|
||||||
ol.renderer.webgl.VectorLayer.prototype.renderFeature =
|
ol.renderer.webgl.VectorLayer.prototype.renderFeature = function(feature, resolution, pixelRatio, styles, replayGroup) {
|
||||||
function(feature, resolution, pixelRatio, styles, replayGroup) {
|
|
||||||
if (!styles) {
|
if (!styles) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,8 +15,7 @@ ol.ResolutionConstraintType;
|
|||||||
* @param {Array.<number>} resolutions Resolutions.
|
* @param {Array.<number>} resolutions Resolutions.
|
||||||
* @return {ol.ResolutionConstraintType} Zoom function.
|
* @return {ol.ResolutionConstraintType} Zoom function.
|
||||||
*/
|
*/
|
||||||
ol.ResolutionConstraint.createSnapToResolutions =
|
ol.ResolutionConstraint.createSnapToResolutions = function(resolutions) {
|
||||||
function(resolutions) {
|
|
||||||
return (
|
return (
|
||||||
/**
|
/**
|
||||||
* @param {number|undefined} resolution Resolution.
|
* @param {number|undefined} resolution Resolution.
|
||||||
@@ -43,8 +42,7 @@ ol.ResolutionConstraint.createSnapToResolutions =
|
|||||||
* @param {number=} opt_maxLevel Maximum level.
|
* @param {number=} opt_maxLevel Maximum level.
|
||||||
* @return {ol.ResolutionConstraintType} Zoom function.
|
* @return {ol.ResolutionConstraintType} Zoom function.
|
||||||
*/
|
*/
|
||||||
ol.ResolutionConstraint.createSnapToPower =
|
ol.ResolutionConstraint.createSnapToPower = function(power, maxResolution, opt_maxLevel) {
|
||||||
function(power, maxResolution, opt_maxLevel) {
|
|
||||||
return (
|
return (
|
||||||
/**
|
/**
|
||||||
* @param {number|undefined} resolution Resolution.
|
* @param {number|undefined} resolution Resolution.
|
||||||
|
|||||||
@@ -79,8 +79,7 @@ ol.source.BingMaps.TOS_ATTRIBUTION = new ol.Attribution({
|
|||||||
/**
|
/**
|
||||||
* @param {BingMapsImageryMetadataResponse} response Response.
|
* @param {BingMapsImageryMetadataResponse} response Response.
|
||||||
*/
|
*/
|
||||||
ol.source.BingMaps.prototype.handleImageryMetadataResponse =
|
ol.source.BingMaps.prototype.handleImageryMetadataResponse = function(response) {
|
||||||
function(response) {
|
|
||||||
|
|
||||||
if (response.statusCode != 200 ||
|
if (response.statusCode != 200 ||
|
||||||
response.statusDescription != 'OK' ||
|
response.statusDescription != 'OK' ||
|
||||||
|
|||||||
@@ -59,8 +59,7 @@ goog.inherits(ol.source.ImageCanvas, ol.source.Image);
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.source.ImageCanvas.prototype.getImageInternal =
|
ol.source.ImageCanvas.prototype.getImageInternal = function(extent, resolution, pixelRatio, projection) {
|
||||||
function(extent, resolution, pixelRatio, projection) {
|
|
||||||
resolution = this.findNearestResolution(resolution);
|
resolution = this.findNearestResolution(resolution);
|
||||||
|
|
||||||
var canvas = this.canvas_;
|
var canvas = this.canvas_;
|
||||||
|
|||||||
@@ -117,8 +117,7 @@ ol.source.ImageMapGuide.prototype.getParams = function() {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.source.ImageMapGuide.prototype.getImageInternal =
|
ol.source.ImageMapGuide.prototype.getImageInternal = function(extent, resolution, pixelRatio, projection) {
|
||||||
function(extent, resolution, pixelRatio, projection) {
|
|
||||||
resolution = this.findNearestResolution(resolution);
|
resolution = this.findNearestResolution(resolution);
|
||||||
pixelRatio = this.hidpi_ ? pixelRatio : 1;
|
pixelRatio = this.hidpi_ ? pixelRatio : 1;
|
||||||
|
|
||||||
@@ -207,8 +206,7 @@ ol.source.ImageMapGuide.prototype.updateParams = function(params) {
|
|||||||
* @param {ol.proj.Projection} projection Projection.
|
* @param {ol.proj.Projection} projection Projection.
|
||||||
* @return {string} The mapagent map image request URL.
|
* @return {string} The mapagent map image request URL.
|
||||||
*/
|
*/
|
||||||
ol.source.ImageMapGuide.prototype.getUrl =
|
ol.source.ImageMapGuide.prototype.getUrl = function(baseUrl, params, extent, size, projection) {
|
||||||
function(baseUrl, params, extent, size, projection) {
|
|
||||||
var scale = ol.source.ImageMapGuide.getScale(extent, size,
|
var scale = ol.source.ImageMapGuide.getScale(extent, size,
|
||||||
this.metersPerUnit_, this.displayDpi_);
|
this.metersPerUnit_, this.displayDpi_);
|
||||||
var center = ol.extent.getCenter(extent);
|
var center = ol.extent.getCenter(extent);
|
||||||
|
|||||||
@@ -89,8 +89,7 @@ ol.source.Image.prototype.getResolutions = function() {
|
|||||||
* @param {number} resolution Resolution.
|
* @param {number} resolution Resolution.
|
||||||
* @return {number} Resolution.
|
* @return {number} Resolution.
|
||||||
*/
|
*/
|
||||||
ol.source.Image.prototype.findNearestResolution =
|
ol.source.Image.prototype.findNearestResolution = function(resolution) {
|
||||||
function(resolution) {
|
|
||||||
if (this.resolutions_) {
|
if (this.resolutions_) {
|
||||||
var idx = ol.array.linearFindNearest(this.resolutions_, resolution, 0);
|
var idx = ol.array.linearFindNearest(this.resolutions_, resolution, 0);
|
||||||
resolution = this.resolutions_[idx];
|
resolution = this.resolutions_[idx];
|
||||||
@@ -106,8 +105,7 @@ ol.source.Image.prototype.findNearestResolution =
|
|||||||
* @param {ol.proj.Projection} projection Projection.
|
* @param {ol.proj.Projection} projection Projection.
|
||||||
* @return {ol.ImageBase} Single image.
|
* @return {ol.ImageBase} Single image.
|
||||||
*/
|
*/
|
||||||
ol.source.Image.prototype.getImage =
|
ol.source.Image.prototype.getImage = function(extent, resolution, pixelRatio, projection) {
|
||||||
function(extent, resolution, pixelRatio, projection) {
|
|
||||||
var sourceProjection = this.getProjection();
|
var sourceProjection = this.getProjection();
|
||||||
if (!ol.ENABLE_RASTER_REPROJECTION ||
|
if (!ol.ENABLE_RASTER_REPROJECTION ||
|
||||||
!sourceProjection ||
|
!sourceProjection ||
|
||||||
|
|||||||
@@ -63,8 +63,7 @@ goog.inherits(ol.source.ImageStatic, ol.source.Image);
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.source.ImageStatic.prototype.getImageInternal =
|
ol.source.ImageStatic.prototype.getImageInternal = function(extent, resolution, pixelRatio, projection) {
|
||||||
function(extent, resolution, pixelRatio, projection) {
|
|
||||||
if (ol.extent.intersects(extent, this.image_.getExtent())) {
|
if (ol.extent.intersects(extent, this.image_.getExtent())) {
|
||||||
return this.image_;
|
return this.image_;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,8 +106,7 @@ goog.inherits(ol.source.ImageVector, ol.source.ImageCanvas);
|
|||||||
* @return {HTMLCanvasElement} Canvas element.
|
* @return {HTMLCanvasElement} Canvas element.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.source.ImageVector.prototype.canvasFunctionInternal_ =
|
ol.source.ImageVector.prototype.canvasFunctionInternal_ = function(extent, resolution, pixelRatio, size, projection) {
|
||||||
function(extent, resolution, pixelRatio, size, projection) {
|
|
||||||
|
|
||||||
var replayGroup = new ol.render.canvas.ReplayGroup(
|
var replayGroup = new ol.render.canvas.ReplayGroup(
|
||||||
ol.renderer.vector.getTolerance(resolution, pixelRatio), extent,
|
ol.renderer.vector.getTolerance(resolution, pixelRatio), extent,
|
||||||
@@ -217,8 +216,7 @@ ol.source.ImageVector.prototype.getStyleFunction = function() {
|
|||||||
* @return {!goog.vec.Mat4.Number} Transform.
|
* @return {!goog.vec.Mat4.Number} Transform.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.source.ImageVector.prototype.getTransform_ =
|
ol.source.ImageVector.prototype.getTransform_ = function(center, resolution, pixelRatio, size) {
|
||||||
function(center, resolution, pixelRatio, size) {
|
|
||||||
return ol.vec.Mat4.makeTransform2D(this.transform_,
|
return ol.vec.Mat4.makeTransform2D(this.transform_,
|
||||||
size[0] / 2, size[1] / 2,
|
size[0] / 2, size[1] / 2,
|
||||||
pixelRatio / resolution, -pixelRatio / resolution,
|
pixelRatio / resolution, -pixelRatio / resolution,
|
||||||
@@ -232,8 +230,7 @@ ol.source.ImageVector.prototype.getTransform_ =
|
|||||||
* @param {goog.events.Event} event Image style change event.
|
* @param {goog.events.Event} event Image style change event.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.source.ImageVector.prototype.handleImageChange_ =
|
ol.source.ImageVector.prototype.handleImageChange_ = function(event) {
|
||||||
function(event) {
|
|
||||||
this.changed();
|
this.changed();
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -256,8 +253,7 @@ ol.source.ImageVector.prototype.handleSourceChange_ = function() {
|
|||||||
* @return {boolean} `true` if an image is loading.
|
* @return {boolean} `true` if an image is loading.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.source.ImageVector.prototype.renderFeature_ =
|
ol.source.ImageVector.prototype.renderFeature_ = function(feature, resolution, pixelRatio, replayGroup) {
|
||||||
function(feature, resolution, pixelRatio, replayGroup) {
|
|
||||||
var styles;
|
var styles;
|
||||||
var styleFunction = feature.getStyleFunction();
|
var styleFunction = feature.getStyleFunction();
|
||||||
if (styleFunction) {
|
if (styleFunction) {
|
||||||
|
|||||||
@@ -136,8 +136,7 @@ ol.source.ImageWMS.GETFEATUREINFO_IMAGE_SIZE_ = [101, 101];
|
|||||||
* @return {string|undefined} GetFeatureInfo URL.
|
* @return {string|undefined} GetFeatureInfo URL.
|
||||||
* @api stable
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.source.ImageWMS.prototype.getGetFeatureInfoUrl =
|
ol.source.ImageWMS.prototype.getGetFeatureInfoUrl = function(coordinate, resolution, projection, params) {
|
||||||
function(coordinate, resolution, projection, params) {
|
|
||||||
|
|
||||||
goog.asserts.assert(!('VERSION' in params),
|
goog.asserts.assert(!('VERSION' in params),
|
||||||
'key VERSION is not allowed in params');
|
'key VERSION is not allowed in params');
|
||||||
@@ -185,8 +184,7 @@ ol.source.ImageWMS.prototype.getParams = function() {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.source.ImageWMS.prototype.getImageInternal =
|
ol.source.ImageWMS.prototype.getImageInternal = function(extent, resolution, pixelRatio, projection) {
|
||||||
function(extent, resolution, pixelRatio, projection) {
|
|
||||||
|
|
||||||
if (this.url_ === undefined) {
|
if (this.url_ === undefined) {
|
||||||
return null;
|
return null;
|
||||||
@@ -271,8 +269,7 @@ ol.source.ImageWMS.prototype.getImageLoadFunction = function() {
|
|||||||
* @return {string} Request URL.
|
* @return {string} Request URL.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.source.ImageWMS.prototype.getRequestUrl_ =
|
ol.source.ImageWMS.prototype.getRequestUrl_ = function(extent, size, pixelRatio, projection, params) {
|
||||||
function(extent, size, pixelRatio, projection, params) {
|
|
||||||
|
|
||||||
goog.asserts.assert(this.url_ !== undefined, 'url is defined');
|
goog.asserts.assert(this.url_ !== undefined, 'url is defined');
|
||||||
|
|
||||||
|
|||||||
@@ -169,8 +169,7 @@ ol.source.Raster.prototype.setOperation = function(operation, opt_lib) {
|
|||||||
* @return {olx.FrameState} The updated frame state.
|
* @return {olx.FrameState} The updated frame state.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.source.Raster.prototype.updateFrameState_ =
|
ol.source.Raster.prototype.updateFrameState_ = function(extent, resolution, projection) {
|
||||||
function(extent, resolution, projection) {
|
|
||||||
|
|
||||||
var frameState = /** @type {olx.FrameState} */ (
|
var frameState = /** @type {olx.FrameState} */ (
|
||||||
goog.object.clone(this.frameState_));
|
goog.object.clone(this.frameState_));
|
||||||
@@ -214,8 +213,7 @@ ol.source.Raster.prototype.isDirty_ = function(extent, resolution) {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.source.Raster.prototype.getImage =
|
ol.source.Raster.prototype.getImage = function(extent, resolution, pixelRatio, projection) {
|
||||||
function(extent, resolution, pixelRatio, projection) {
|
|
||||||
|
|
||||||
if (!this.allSourcesReady_()) {
|
if (!this.allSourcesReady_()) {
|
||||||
return null;
|
return null;
|
||||||
@@ -315,8 +313,7 @@ ol.source.Raster.prototype.composeFrame_ = function(frameState, callback) {
|
|||||||
* @param {Object} data The user data.
|
* @param {Object} data The user data.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.source.Raster.prototype.onWorkerComplete_ =
|
ol.source.Raster.prototype.onWorkerComplete_ = function(frameState, callback, err, output, data) {
|
||||||
function(frameState, callback, err, output, data) {
|
|
||||||
if (err) {
|
if (err) {
|
||||||
callback(err);
|
callback(err);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -86,8 +86,7 @@ ol.source.TileArcGISRest.prototype.getParams = function() {
|
|||||||
* @return {string|undefined} Request URL.
|
* @return {string|undefined} Request URL.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.source.TileArcGISRest.prototype.getRequestUrl_ =
|
ol.source.TileArcGISRest.prototype.getRequestUrl_ = function(tileCoord, tileSize, tileExtent,
|
||||||
function(tileCoord, tileSize, tileExtent,
|
|
||||||
pixelRatio, projection, params) {
|
pixelRatio, projection, params) {
|
||||||
|
|
||||||
var urls = this.urls;
|
var urls = this.urls;
|
||||||
@@ -146,8 +145,7 @@ ol.source.TileArcGISRest.prototype.getTilePixelRatio = function(pixelRatio) {
|
|||||||
* @return {string|undefined} Tile URL.
|
* @return {string|undefined} Tile URL.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.source.TileArcGISRest.prototype.tileUrlFunction_ =
|
ol.source.TileArcGISRest.prototype.tileUrlFunction_ = function(tileCoord, pixelRatio, projection) {
|
||||||
function(tileCoord, pixelRatio, projection) {
|
|
||||||
|
|
||||||
var tileGrid = this.getTileGrid();
|
var tileGrid = this.getTileGrid();
|
||||||
if (!tileGrid) {
|
if (!tileGrid) {
|
||||||
|
|||||||
@@ -172,8 +172,7 @@ ol.source.TileImage.prototype.getTileCacheForProjection = function(projection) {
|
|||||||
* @return {ol.Tile} Tile.
|
* @return {ol.Tile} Tile.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.source.TileImage.prototype.createTile_ =
|
ol.source.TileImage.prototype.createTile_ = function(z, x, y, pixelRatio, projection, key) {
|
||||||
function(z, x, y, pixelRatio, projection, key) {
|
|
||||||
var tileCoord = [z, x, y];
|
var tileCoord = [z, x, y];
|
||||||
var urlTileCoord = this.getTileCoordForTileUrlFunction(
|
var urlTileCoord = this.getTileCoordForTileUrlFunction(
|
||||||
tileCoord, projection);
|
tileCoord, projection);
|
||||||
@@ -195,8 +194,7 @@ ol.source.TileImage.prototype.createTile_ =
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.source.TileImage.prototype.getTile =
|
ol.source.TileImage.prototype.getTile = function(z, x, y, pixelRatio, projection) {
|
||||||
function(z, x, y, pixelRatio, projection) {
|
|
||||||
if (!ol.ENABLE_RASTER_REPROJECTION ||
|
if (!ol.ENABLE_RASTER_REPROJECTION ||
|
||||||
!this.getProjection() ||
|
!this.getProjection() ||
|
||||||
!projection ||
|
!projection ||
|
||||||
@@ -239,8 +237,7 @@ ol.source.TileImage.prototype.getTile =
|
|||||||
* @return {!ol.Tile} Tile.
|
* @return {!ol.Tile} Tile.
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
ol.source.TileImage.prototype.getTileInternal =
|
ol.source.TileImage.prototype.getTileInternal = function(z, x, y, pixelRatio, projection) {
|
||||||
function(z, x, y, pixelRatio, projection) {
|
|
||||||
var /** @type {ol.Tile} */ tile = null;
|
var /** @type {ol.Tile} */ tile = null;
|
||||||
var tileCoordKey = this.getKeyZXY(z, x, y);
|
var tileCoordKey = this.getKeyZXY(z, x, y);
|
||||||
var paramsKey = this.getKeyParams();
|
var paramsKey = this.getKeyParams();
|
||||||
@@ -313,8 +310,7 @@ ol.source.TileImage.prototype.setRenderReprojectionEdges = function(render) {
|
|||||||
* @param {ol.tilegrid.TileGrid} tilegrid Tile grid to use for the projection.
|
* @param {ol.tilegrid.TileGrid} tilegrid Tile grid to use for the projection.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.source.TileImage.prototype.setTileGridForProjection =
|
ol.source.TileImage.prototype.setTileGridForProjection = function(projection, tilegrid) {
|
||||||
function(projection, tilegrid) {
|
|
||||||
if (ol.ENABLE_RASTER_REPROJECTION) {
|
if (ol.ENABLE_RASTER_REPROJECTION) {
|
||||||
var proj = ol.proj.get(projection);
|
var proj = ol.proj.get(projection);
|
||||||
if (proj) {
|
if (proj) {
|
||||||
|
|||||||
@@ -119,8 +119,7 @@ ol.source.Tile.prototype.expireCache = function(projection, usedTiles) {
|
|||||||
* considered loaded.
|
* considered loaded.
|
||||||
* @return {boolean} The tile range is fully covered with loaded tiles.
|
* @return {boolean} The tile range is fully covered with loaded tiles.
|
||||||
*/
|
*/
|
||||||
ol.source.Tile.prototype.forEachLoadedTile =
|
ol.source.Tile.prototype.forEachLoadedTile = function(projection, z, tileRange, callback) {
|
||||||
function(projection, z, tileRange, callback) {
|
|
||||||
var tileCache = this.getTileCacheForProjection(projection);
|
var tileCache = this.getTileCacheForProjection(projection);
|
||||||
if (!tileCache) {
|
if (!tileCache) {
|
||||||
return false;
|
return false;
|
||||||
@@ -257,8 +256,7 @@ ol.source.Tile.prototype.getTilePixelRatio = function(pixelRatio) {
|
|||||||
* @param {ol.proj.Projection} projection Projection.
|
* @param {ol.proj.Projection} projection Projection.
|
||||||
* @return {ol.Size} Tile size.
|
* @return {ol.Size} Tile size.
|
||||||
*/
|
*/
|
||||||
ol.source.Tile.prototype.getTilePixelSize =
|
ol.source.Tile.prototype.getTilePixelSize = function(z, pixelRatio, projection) {
|
||||||
function(z, pixelRatio, projection) {
|
|
||||||
var tileGrid = this.getTileGridForProjection(projection);
|
var tileGrid = this.getTileGridForProjection(projection);
|
||||||
var tilePixelRatio = this.getTilePixelRatio(pixelRatio);
|
var tilePixelRatio = this.getTilePixelRatio(pixelRatio);
|
||||||
var tileSize = ol.size.toSize(tileGrid.getTileSize(z), this.tmpSize);
|
var tileSize = ol.size.toSize(tileGrid.getTileSize(z), this.tmpSize);
|
||||||
@@ -279,8 +277,7 @@ ol.source.Tile.prototype.getTilePixelSize =
|
|||||||
* @return {ol.TileCoord} Tile coordinate to be passed to the tileUrlFunction or
|
* @return {ol.TileCoord} Tile coordinate to be passed to the tileUrlFunction or
|
||||||
* null if no tile URL should be created for the passed `tileCoord`.
|
* null if no tile URL should be created for the passed `tileCoord`.
|
||||||
*/
|
*/
|
||||||
ol.source.Tile.prototype.getTileCoordForTileUrlFunction =
|
ol.source.Tile.prototype.getTileCoordForTileUrlFunction = function(tileCoord, opt_projection) {
|
||||||
function(tileCoord, opt_projection) {
|
|
||||||
var projection = opt_projection !== undefined ?
|
var projection = opt_projection !== undefined ?
|
||||||
opt_projection : this.getProjection();
|
opt_projection : this.getProjection();
|
||||||
var tileGrid = this.getTileGridForProjection(projection);
|
var tileGrid = this.getTileGridForProjection(projection);
|
||||||
|
|||||||
@@ -166,8 +166,7 @@ ol.source.TileUTFGrid.prototype.handleTileJSONResponse = function(tileJSON) {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.source.TileUTFGrid.prototype.getTile =
|
ol.source.TileUTFGrid.prototype.getTile = function(z, x, y, pixelRatio, projection) {
|
||||||
function(z, x, y, pixelRatio, projection) {
|
|
||||||
var tileCoordKey = this.getKeyZXY(z, x, y);
|
var tileCoordKey = this.getKeyZXY(z, x, y);
|
||||||
if (this.tileCache.containsKey(tileCoordKey)) {
|
if (this.tileCache.containsKey(tileCoordKey)) {
|
||||||
return /** @type {!ol.Tile} */ (this.tileCache.get(tileCoordKey));
|
return /** @type {!ol.Tile} */ (this.tileCache.get(tileCoordKey));
|
||||||
@@ -211,8 +210,7 @@ ol.source.TileUTFGrid.prototype.useTile = function(z, x, y) {
|
|||||||
* @param {boolean} preemptive Load the tile when visible (before it's needed).
|
* @param {boolean} preemptive Load the tile when visible (before it's needed).
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.source.TileUTFGridTile_ =
|
ol.source.TileUTFGridTile_ = function(tileCoord, state, src, extent, preemptive) {
|
||||||
function(tileCoord, state, src, extent, preemptive) {
|
|
||||||
|
|
||||||
goog.base(this, tileCoord, state);
|
goog.base(this, tileCoord, state);
|
||||||
|
|
||||||
@@ -309,8 +307,7 @@ ol.source.TileUTFGridTile_.prototype.getData = function(coordinate) {
|
|||||||
* The tile data is requested if not yet loaded.
|
* The tile data is requested if not yet loaded.
|
||||||
* @template T
|
* @template T
|
||||||
*/
|
*/
|
||||||
ol.source.TileUTFGridTile_.prototype.forDataAtCoordinate =
|
ol.source.TileUTFGridTile_.prototype.forDataAtCoordinate = function(coordinate, callback, opt_this, opt_request) {
|
||||||
function(coordinate, callback, opt_this, opt_request) {
|
|
||||||
if (this.state == ol.TileState.IDLE && opt_request === true) {
|
if (this.state == ol.TileState.IDLE && opt_request === true) {
|
||||||
goog.events.listenOnce(this, goog.events.EventType.CHANGE, function(e) {
|
goog.events.listenOnce(this, goog.events.EventType.CHANGE, function(e) {
|
||||||
callback.call(opt_this, this.getData(coordinate));
|
callback.call(opt_this, this.getData(coordinate));
|
||||||
|
|||||||
@@ -117,8 +117,7 @@ goog.inherits(ol.source.TileWMS, ol.source.TileImage);
|
|||||||
* @return {string|undefined} GetFeatureInfo URL.
|
* @return {string|undefined} GetFeatureInfo URL.
|
||||||
* @api stable
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.source.TileWMS.prototype.getGetFeatureInfoUrl =
|
ol.source.TileWMS.prototype.getGetFeatureInfoUrl = function(coordinate, resolution, projection, params) {
|
||||||
function(coordinate, resolution, projection, params) {
|
|
||||||
|
|
||||||
goog.asserts.assert(!('VERSION' in params),
|
goog.asserts.assert(!('VERSION' in params),
|
||||||
'key VERSION is not allowed in params');
|
'key VERSION is not allowed in params');
|
||||||
@@ -207,8 +206,7 @@ ol.source.TileWMS.prototype.getParams = function() {
|
|||||||
* @return {string|undefined} Request URL.
|
* @return {string|undefined} Request URL.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.source.TileWMS.prototype.getRequestUrl_ =
|
ol.source.TileWMS.prototype.getRequestUrl_ = function(tileCoord, tileSize, tileExtent,
|
||||||
function(tileCoord, tileSize, tileExtent,
|
|
||||||
pixelRatio, projection, params) {
|
pixelRatio, projection, params) {
|
||||||
|
|
||||||
var urls = this.urls;
|
var urls = this.urls;
|
||||||
@@ -312,8 +310,7 @@ ol.source.TileWMS.prototype.resetCoordKeyPrefix_ = function() {
|
|||||||
* @return {string|undefined} Tile URL.
|
* @return {string|undefined} Tile URL.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.source.TileWMS.prototype.tileUrlFunction_ =
|
ol.source.TileWMS.prototype.tileUrlFunction_ = function(tileCoord, pixelRatio, projection) {
|
||||||
function(tileCoord, pixelRatio, projection) {
|
|
||||||
|
|
||||||
var tileGrid = this.getTileGrid();
|
var tileGrid = this.getTileGrid();
|
||||||
if (!tileGrid) {
|
if (!tileGrid) {
|
||||||
|
|||||||
@@ -447,8 +447,7 @@ ol.source.Vector.prototype.forEachFeature = function(callback, opt_this) {
|
|||||||
* @return {S|undefined} The return value from the last call to the callback.
|
* @return {S|undefined} The return value from the last call to the callback.
|
||||||
* @template T,S
|
* @template T,S
|
||||||
*/
|
*/
|
||||||
ol.source.Vector.prototype.forEachFeatureAtCoordinateDirect =
|
ol.source.Vector.prototype.forEachFeatureAtCoordinateDirect = function(coordinate, callback, opt_this) {
|
||||||
function(coordinate, callback, opt_this) {
|
|
||||||
var extent = [coordinate[0], coordinate[1], coordinate[0], coordinate[1]];
|
var extent = [coordinate[0], coordinate[1], coordinate[0], coordinate[1]];
|
||||||
return this.forEachFeatureInExtent(extent, function(feature) {
|
return this.forEachFeatureInExtent(extent, function(feature) {
|
||||||
var geometry = feature.getGeometry();
|
var geometry = feature.getGeometry();
|
||||||
@@ -483,8 +482,7 @@ ol.source.Vector.prototype.forEachFeatureAtCoordinateDirect =
|
|||||||
* @template T,S
|
* @template T,S
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.source.Vector.prototype.forEachFeatureInExtent =
|
ol.source.Vector.prototype.forEachFeatureInExtent = function(extent, callback, opt_this) {
|
||||||
function(extent, callback, opt_this) {
|
|
||||||
if (this.featuresRtree_) {
|
if (this.featuresRtree_) {
|
||||||
return this.featuresRtree_.forEachInExtent(extent, callback, opt_this);
|
return this.featuresRtree_.forEachInExtent(extent, callback, opt_this);
|
||||||
} else if (this.featuresCollection_) {
|
} else if (this.featuresCollection_) {
|
||||||
@@ -510,8 +508,7 @@ ol.source.Vector.prototype.forEachFeatureInExtent =
|
|||||||
* @template T,S
|
* @template T,S
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
ol.source.Vector.prototype.forEachFeatureIntersectingExtent =
|
ol.source.Vector.prototype.forEachFeatureIntersectingExtent = function(extent, callback, opt_this) {
|
||||||
function(extent, callback, opt_this) {
|
|
||||||
return this.forEachFeatureInExtent(extent,
|
return this.forEachFeatureInExtent(extent,
|
||||||
/**
|
/**
|
||||||
* @param {ol.Feature} feature Feature.
|
* @param {ol.Feature} feature Feature.
|
||||||
@@ -608,8 +605,7 @@ ol.source.Vector.prototype.getFeaturesInExtent = function(extent) {
|
|||||||
* @return {ol.Feature} Closest feature.
|
* @return {ol.Feature} Closest feature.
|
||||||
* @api stable
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.source.Vector.prototype.getClosestFeatureToCoordinate =
|
ol.source.Vector.prototype.getClosestFeatureToCoordinate = function(coordinate) {
|
||||||
function(coordinate) {
|
|
||||||
// Find the closest feature using branch and bound. We start searching an
|
// Find the closest feature using branch and bound. We start searching an
|
||||||
// infinite extent, and find the distance from the first feature found. This
|
// infinite extent, and find the distance from the first feature found. This
|
||||||
// becomes the closest feature. We then compute a smaller extent which any
|
// becomes the closest feature. We then compute a smaller extent which any
|
||||||
|
|||||||
@@ -67,8 +67,7 @@ goog.inherits(ol.source.VectorTile, ol.source.UrlTile);
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.source.VectorTile.prototype.getTile =
|
ol.source.VectorTile.prototype.getTile = function(z, x, y, pixelRatio, projection) {
|
||||||
function(z, x, y, pixelRatio, projection) {
|
|
||||||
var tileCoordKey = this.getKeyZXY(z, x, y);
|
var tileCoordKey = this.getKeyZXY(z, x, y);
|
||||||
if (this.tileCache.containsKey(tileCoordKey)) {
|
if (this.tileCache.containsKey(tileCoordKey)) {
|
||||||
return /** @type {!ol.Tile} */ (this.tileCache.get(tileCoordKey));
|
return /** @type {!ol.Tile} */ (this.tileCache.get(tileCoordKey));
|
||||||
|
|||||||
@@ -197,8 +197,7 @@ ol.structs.RBush.prototype.forEach = function(callback, opt_this) {
|
|||||||
* @return {*} Callback return value.
|
* @return {*} Callback return value.
|
||||||
* @template S
|
* @template S
|
||||||
*/
|
*/
|
||||||
ol.structs.RBush.prototype.forEachInExtent =
|
ol.structs.RBush.prototype.forEachInExtent = function(extent, callback, opt_this) {
|
||||||
function(extent, callback, opt_this) {
|
|
||||||
if (goog.DEBUG) {
|
if (goog.DEBUG) {
|
||||||
++this.readers_;
|
++this.readers_;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -170,8 +170,7 @@ ol.style.AtlasManager.prototype.mergeInfos_ = function(info, hitInfo) {
|
|||||||
* @return {?ol.style.AtlasManagerInfo} The position and atlas image for the
|
* @return {?ol.style.AtlasManagerInfo} The position and atlas image for the
|
||||||
* entry, or `null` if the image is too big.
|
* entry, or `null` if the image is too big.
|
||||||
*/
|
*/
|
||||||
ol.style.AtlasManager.prototype.add =
|
ol.style.AtlasManager.prototype.add = function(id, width, height,
|
||||||
function(id, width, height,
|
|
||||||
renderCallback, opt_renderHitCallback, opt_this) {
|
renderCallback, opt_renderHitCallback, opt_this) {
|
||||||
if (width + this.space_ > this.maxSize_ ||
|
if (width + this.space_ > this.maxSize_ ||
|
||||||
height + this.space_ > this.maxSize_) {
|
height + this.space_ > this.maxSize_) {
|
||||||
@@ -213,8 +212,7 @@ ol.style.AtlasManager.prototype.add =
|
|||||||
* @return {?ol.style.AtlasInfo} The position and atlas image for the entry,
|
* @return {?ol.style.AtlasInfo} The position and atlas image for the entry,
|
||||||
* or `null` if the image is too big.
|
* or `null` if the image is too big.
|
||||||
*/
|
*/
|
||||||
ol.style.AtlasManager.prototype.add_ =
|
ol.style.AtlasManager.prototype.add_ = function(isHitAtlas, id, width, height,
|
||||||
function(isHitAtlas, id, width, height,
|
|
||||||
renderCallback, opt_this) {
|
renderCallback, opt_this) {
|
||||||
var atlases = (isHitAtlas) ? this.hitAtlases_ : this.atlases_;
|
var atlases = (isHitAtlas) ? this.hitAtlases_ : this.atlases_;
|
||||||
var atlas, info, i, ii;
|
var atlas, info, i, ii;
|
||||||
@@ -329,8 +327,7 @@ ol.style.Atlas.prototype.get = function(id) {
|
|||||||
* `renderCallback`.
|
* `renderCallback`.
|
||||||
* @return {?ol.style.AtlasInfo} The position and atlas image for the entry.
|
* @return {?ol.style.AtlasInfo} The position and atlas image for the entry.
|
||||||
*/
|
*/
|
||||||
ol.style.Atlas.prototype.add =
|
ol.style.Atlas.prototype.add = function(id, width, height, renderCallback, opt_this) {
|
||||||
function(id, width, height, renderCallback, opt_this) {
|
|
||||||
var block, i, ii;
|
var block, i, ii;
|
||||||
for (i = 0, ii = this.emptyBlocks_.length; i < ii; ++i) {
|
for (i = 0, ii = this.emptyBlocks_.length; i < ii; ++i) {
|
||||||
block = this.emptyBlocks_[i];
|
block = this.emptyBlocks_[i];
|
||||||
@@ -367,8 +364,7 @@ ol.style.Atlas.prototype.add =
|
|||||||
* @param {number} width The width of the entry to insert.
|
* @param {number} width The width of the entry to insert.
|
||||||
* @param {number} height The height of the entry to insert.
|
* @param {number} height The height of the entry to insert.
|
||||||
*/
|
*/
|
||||||
ol.style.Atlas.prototype.split_ =
|
ol.style.Atlas.prototype.split_ = function(index, block, width, height) {
|
||||||
function(index, block, width, height) {
|
|
||||||
var deltaWidth = block.width - width;
|
var deltaWidth = block.width - width;
|
||||||
var deltaHeight = block.height - height;
|
var deltaHeight = block.height - height;
|
||||||
|
|
||||||
@@ -426,8 +422,7 @@ ol.style.Atlas.prototype.split_ =
|
|||||||
* @param {ol.style.Atlas.Block} newBlock1 The 1st block to add.
|
* @param {ol.style.Atlas.Block} newBlock1 The 1st block to add.
|
||||||
* @param {ol.style.Atlas.Block} newBlock2 The 2nd block to add.
|
* @param {ol.style.Atlas.Block} newBlock2 The 2nd block to add.
|
||||||
*/
|
*/
|
||||||
ol.style.Atlas.prototype.updateBlocks_ =
|
ol.style.Atlas.prototype.updateBlocks_ = function(index, newBlock1, newBlock2) {
|
||||||
function(index, newBlock1, newBlock2) {
|
|
||||||
var args = [index, 1];
|
var args = [index, 1];
|
||||||
if (newBlock1.width > 0 && newBlock1.height > 0) {
|
if (newBlock1.width > 0 && newBlock1.height > 0) {
|
||||||
args.push(newBlock1);
|
args.push(newBlock1);
|
||||||
|
|||||||
@@ -389,8 +389,7 @@ ol.style.Circle.prototype.createHitDetectionCanvas_ = function(renderOptions) {
|
|||||||
* @param {number} x The origin for the symbol (x).
|
* @param {number} x The origin for the symbol (x).
|
||||||
* @param {number} y The origin for the symbol (y).
|
* @param {number} y The origin for the symbol (y).
|
||||||
*/
|
*/
|
||||||
ol.style.Circle.prototype.drawHitDetectionCanvas_ =
|
ol.style.Circle.prototype.drawHitDetectionCanvas_ = function(renderOptions, context, x, y) {
|
||||||
function(renderOptions, context, x, y) {
|
|
||||||
// reset transform
|
// reset transform
|
||||||
context.setTransform(1, 0, 0, 1, 0, 0);
|
context.setTransform(1, 0, 0, 1, 0, 0);
|
||||||
|
|
||||||
|
|||||||
@@ -450,8 +450,7 @@ ol.style.RegularShape.prototype.draw_ = function(renderOptions, context, x, y) {
|
|||||||
* @private
|
* @private
|
||||||
* @param {ol.style.RegularShape.RenderOptions} renderOptions Render options.
|
* @param {ol.style.RegularShape.RenderOptions} renderOptions Render options.
|
||||||
*/
|
*/
|
||||||
ol.style.RegularShape.prototype.createHitDetectionCanvas_ =
|
ol.style.RegularShape.prototype.createHitDetectionCanvas_ = function(renderOptions) {
|
||||||
function(renderOptions) {
|
|
||||||
this.hitDetectionImageSize_ = [renderOptions.size, renderOptions.size];
|
this.hitDetectionImageSize_ = [renderOptions.size, renderOptions.size];
|
||||||
if (this.fill_) {
|
if (this.fill_) {
|
||||||
this.hitDetectionCanvas_ = this.canvas_;
|
this.hitDetectionCanvas_ = this.canvas_;
|
||||||
@@ -480,8 +479,7 @@ ol.style.RegularShape.prototype.createHitDetectionCanvas_ =
|
|||||||
* @param {number} x The origin for the symbol (x).
|
* @param {number} x The origin for the symbol (x).
|
||||||
* @param {number} y The origin for the symbol (y).
|
* @param {number} y The origin for the symbol (y).
|
||||||
*/
|
*/
|
||||||
ol.style.RegularShape.prototype.drawHitDetectionCanvas_ =
|
ol.style.RegularShape.prototype.drawHitDetectionCanvas_ = function(renderOptions, context, x, y) {
|
||||||
function(renderOptions, context, x, y) {
|
|
||||||
// reset transform
|
// reset transform
|
||||||
context.setTransform(1, 0, 0, 1, 0, 0);
|
context.setTransform(1, 0, 0, 1, 0, 0);
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user