Remove unused variables in parsers
This commit is contained in:
@@ -119,7 +119,7 @@ ol.parser.ogc.GML_v3 = function(opt_options) {
|
|||||||
var dim = obj.srsDimension ||
|
var dim = obj.srsDimension ||
|
||||||
parseInt(node.getAttribute('srsDimension') ||
|
parseInt(node.getAttribute('srsDimension') ||
|
||||||
node.getAttribute('dimension'), 10) || 2;
|
node.getAttribute('dimension'), 10) || 2;
|
||||||
var j, x, y, z;
|
var x, y, z;
|
||||||
var numPoints = coords.length / dim;
|
var numPoints = coords.length / dim;
|
||||||
var points = new Array(numPoints);
|
var points = new Array(numPoints);
|
||||||
for (var i = 0, ii = coords.length; i < ii; i += dim) {
|
for (var i = 0, ii = coords.length; i < ii; i += dim) {
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ describe('ol.parser.kml', function() {
|
|||||||
afterLoadXml(url, function(xml) {
|
afterLoadXml(url, function(xml) {
|
||||||
var p = new ol.parser.KML({maxDepth: 1});
|
var p = new ol.parser.KML({maxDepth: 1});
|
||||||
// we need to supply a callback to get visited NetworkLinks
|
// we need to supply a callback to get visited NetworkLinks
|
||||||
var obj = p.read(xml, function(features) {
|
p.read(xml, function(features) {
|
||||||
expect(features.length).to.eql(3);
|
expect(features.length).to.eql(3);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
@@ -60,7 +60,7 @@ describe('ol.parser.kml', function() {
|
|||||||
afterLoadXml(url, function(xml) {
|
afterLoadXml(url, function(xml) {
|
||||||
var p = new ol.parser.KML({maxDepth: 2});
|
var p = new ol.parser.KML({maxDepth: 2});
|
||||||
// we need to supply a callback to get visited NetworkLinks
|
// we need to supply a callback to get visited NetworkLinks
|
||||||
var obj = p.read(xml, function(features) {
|
p.read(xml, function(features) {
|
||||||
expect(features.length).to.eql(2);
|
expect(features.length).to.eql(2);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
@@ -71,7 +71,7 @@ describe('ol.parser.kml', function() {
|
|||||||
afterLoadXml(url, function(xml) {
|
afterLoadXml(url, function(xml) {
|
||||||
var p = new ol.parser.KML({maxDepth: 1});
|
var p = new ol.parser.KML({maxDepth: 1});
|
||||||
// we need to supply a callback to get visited NetworkLinks
|
// we need to supply a callback to get visited NetworkLinks
|
||||||
var obj = p.read(xml, function(features) {
|
p.read(xml, function(features) {
|
||||||
// since maxDepth is 1, we will not get to the second feature
|
// since maxDepth is 1, we will not get to the second feature
|
||||||
expect(features.length).to.eql(1);
|
expect(features.length).to.eql(1);
|
||||||
done();
|
done();
|
||||||
|
|||||||
@@ -298,7 +298,7 @@ describe('ol.parser.gml_v2', function() {
|
|||||||
it('Test boundedBy', function() {
|
it('Test boundedBy', function() {
|
||||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/boundedBy.xml';
|
var url = 'spec/ol/parser/ogc/xml/gml_v2/boundedBy.xml';
|
||||||
afterLoadXml(url, function(xml) {
|
afterLoadXml(url, function(xml) {
|
||||||
var obj = parser.read(xml);
|
parser.read(xml);
|
||||||
// TODO test bounds on feature
|
// TODO test bounds on feature
|
||||||
// see https://github.com/openlayers/ol3/issues/566
|
// see https://github.com/openlayers/ol3/issues/566
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -308,8 +308,7 @@ describe('ol.parser.gml_v3', function() {
|
|||||||
it('Read autoConfig', function() {
|
it('Read autoConfig', function() {
|
||||||
var url = 'spec/ol/parser/ogc/xml/gml_v3/topp-states-wfs.xml';
|
var url = 'spec/ol/parser/ogc/xml/gml_v3/topp-states-wfs.xml';
|
||||||
afterLoadXml(url, function(xml) {
|
afterLoadXml(url, function(xml) {
|
||||||
var obj = parser.read(xml);
|
parser.read(xml);
|
||||||
var features = obj.features;
|
|
||||||
expect(parser.featureType).to.eql('states');
|
expect(parser.featureType).to.eql('states');
|
||||||
expect(parser.featureNS).to.eql('http://www.openplans.org/topp');
|
expect(parser.featureNS).to.eql('http://www.openplans.org/topp');
|
||||||
expect(parser.autoConfig === true).to.be.ok();
|
expect(parser.autoConfig === true).to.be.ok();
|
||||||
|
|||||||
@@ -2,9 +2,6 @@ goog.provide('ol.test.parser.ogc.Versioned');
|
|||||||
|
|
||||||
describe('ol.parser.ogc.versioned', function() {
|
describe('ol.parser.ogc.versioned', function() {
|
||||||
|
|
||||||
var snippet = '<foo version="2.0.0"></foo>';
|
|
||||||
var snippet2 = '<foo></foo>';
|
|
||||||
|
|
||||||
describe('test constructor', function() {
|
describe('test constructor', function() {
|
||||||
var parser = new ol.parser.ogc.Versioned({version: '1.0.0'});
|
var parser = new ol.parser.ogc.Versioned({version: '1.0.0'});
|
||||||
it('new OpenLayers.Format.XML.VersionedOGC returns object', function() {
|
it('new OpenLayers.Format.XML.VersionedOGC returns object', function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user