Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade ol5 #8

Merged
merged 8 commits into from
Aug 15, 2018
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
38 changes: 38 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"extends": [
"eslint:recommended"
],
"plugins": [],
"env": {
"browser": true,
"node": true
},
"parser": "babel-eslint",
"globals": {
"Promise": false
},
"rules": {
"indent": ["error", 2, { "SwitchCase": 1 }],
"linebreak-style": ["error", "unix"],
"quotes": ["error", "single", { "allowTemplateLiterals": true }],
"semi": ["error", "always"],
"one-var": ["error", "never"],
"no-confusing-arrow": "error",
"no-unused-vars": ["error", {
"ignoreRestSiblings": true
}],
"key-spacing": ["error", {
"beforeColon": false,
"afterColon": true
}],
"require-jsdoc": ["error", {
"require": {
"FunctionDeclaration": true,
"MethodDefinition": true,
"ClassDeclaration": true,
"ArrowFunctionExpression": true
}
}],
"space-infix-ops": ["error", {"int32Hint": false}]
}
}
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"description": "A set of helper classes for working with openLayers",
"main": "src/index.js",
"scripts": {
"lint": "eslint --ext js src/",
"pretest": "npm run lint",
"test": "jest --maxWorkers=4",
"test:watch": "jest --watchAll",
"coveralls": "cat coverage/lcov.info | coveralls",
Expand Down Expand Up @@ -48,13 +50,14 @@
"babel-preset-stage-0": "6.24.1",
"canvas-prebuilt": "1.6.5-prerelease.1",
"coveralls": "3.0.2",
"eslint": "5.0.1",
"jest": "23.5.0",
"node-pre-gyp": "0.11.0",
"np": "3.0.4",
"ol": "4.6.5",
"ol": "5.1.3",
"whatwg-fetch": "2.0.4"
},
"peerDependencies": {
"ol": "~4.0"
"ol": "~5.0"
}
}
8 changes: 4 additions & 4 deletions src/AnimateUtil/AnimateUtil.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import OlObservable from 'ol/observable';
import OlGeomPoint from 'ol/geom/point';
import OlGeomLineString from 'ol/geom/linestring';
import OlGeomPoint from 'ol/geom/Point';
import OlGeomLineString from 'ol/geom/LineString';
import { unByKey } from 'ol/Observable';

/**
* This class provides some static methods which might be helpful when working
Expand Down Expand Up @@ -68,7 +68,7 @@ class AnimateUtil {
}

if (elapsed > duration || actualFrames >= expectedFrames) {
OlObservable.unByKey(listenerKey);
unByKey(listenerKey);
resolve(featureToMove);
}
// tell OL3 to continue postcompose animation
Expand Down
6 changes: 3 additions & 3 deletions src/AnimateUtil/AnimateUtil.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*eslint-env jest*/
import OlGeomPoint from 'ol/geom/point';
import OlFeature from 'ol/feature';
import OlStyleStyle from 'ol/style/style';
import OlGeomPoint from 'ol/geom/Point';
import OlFeature from 'ol/Feature';
import OlStyleStyle from 'ol/style/Style';

import AnimateUtil from '../AnimateUtil/AnimateUtil';
import TestUtil from '../TestUtil';
Expand Down
6 changes: 3 additions & 3 deletions src/CapabilitiesUtil/CapabilitiesUtil.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import OlWMSCapabilities from 'ol/format/wmscapabilities';
import OlSourceImageWMS from 'ol/source/imagewms';
import OlLayerImage from 'ol/layer/image';
import OlWMSCapabilities from 'ol/format/WMSCapabilities';
import OlSourceImageWMS from 'ol/source/ImageWMS';
import OlLayerImage from 'ol/layer/Image';

import get from 'lodash/get.js';

Expand Down
2 changes: 1 addition & 1 deletion src/CapabilitiesUtil/CapabilitiesUtil.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*eslint-env jest*/
import OlLayerImage from 'ol/layer/image';
import OlLayerImage from 'ol/layer/Image';
import { CapabilitiesUtil } from '../index';

const layerTitle = 'OpenStreetMap WMS - by terrestris';
Expand Down
4 changes: 2 additions & 2 deletions src/FeatureUtil/FeatureUtil.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*eslint-env jest*/

import OlFeature from 'ol/feature';
import OlGeomPoint from 'ol/geom/point';
import OlFeature from 'ol/Feature';
import OlGeomPoint from 'ol/geom/Point';

import {
FeatureUtil,
Expand Down
6 changes: 3 additions & 3 deletions src/FileUtil/FileUtil.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import OlFormatGeoJSON from 'ol/format/geojson';
import OlLayerVector from 'ol/layer/vector';
import OlSourceVector from 'ol/source/vector';
import OlFormatGeoJSON from 'ol/format/GeoJSON';
import OlLayerVector from 'ol/layer/Vector';
import OlSourceVector from 'ol/source/Vector';
import shp from 'shpjs';

/**
Expand Down
190 changes: 0 additions & 190 deletions src/GeometryUtil/GeometryUtil.example.jsx

This file was deleted.

8 changes: 0 additions & 8 deletions src/GeometryUtil/GeometryUtil.example.md

This file was deleted.