Skip to content

Commit

Permalink
update MapStore version to v2020.01.00
Browse files Browse the repository at this point in the history
  • Loading branch information
allyoucanmap committed Mar 10, 2020
1 parent e0e3424 commit 8b12943
Show file tree
Hide file tree
Showing 8 changed files with 135 additions and 161 deletions.
15 changes: 0 additions & 15 deletions geonode_mapstore_client/client/.babelrc

This file was deleted.

53 changes: 23 additions & 30 deletions geonode_mapstore_client/client/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"parser": "babel-eslint", // https://github.com/babel/babel-eslint
"plugins": [
"no-only-tests", // https://github.com/levibuzolic/eslint-plugin-no-only-tests
"react" // https://github.com/yannickcr/eslint-plugin-react
],
"env": { // http://eslint.org/docs/user-guide/configuring.html#specifying-environments
"browser": true, // browser global variables
"node": true // Node.js global variables and Node.js-specific rules
"node": true, // Node.js global variables and Node.js-specific rules
"es6": true // enable all ECMAScript 6 features except for modules (this automatically sets the ecmaVersion parser option to 6).
},
"globals" : {
/* MOCHA */
Expand All @@ -17,24 +19,6 @@
"afterEach" : false,
"__DEVTOOLS__": false
},
"ecmaFeatures": {
"arrowFunctions": true,
"blockBindings": true,
"classes": true,
"defaultParams": true,
"destructuring": true,
"forOf": true,
"generators": false,
"modules": true,
"objectLiteralComputedProperties": true,
"objectLiteralDuplicateProperties": false,
"objectLiteralShorthandMethods": true,
"objectLiteralShorthandProperties": true,
"spread": true,
"superInFunctions": true,
"templateStrings": true,
"jsx": true
},
"rules": {
/**
* Strict mode
Expand All @@ -55,17 +39,22 @@
"no-shadow-restricted-names": 2, // http://eslint.org/docs/rules/no-shadow-restricted-names
"no-unused-vars": [2, { // http://eslint.org/docs/rules/no-unused-vars
"vars": "local",
"args": "after-used"
"args": "after-used",
"ignoreRestSiblings": true
}],
"no-use-before-define": 2, // http://eslint.org/docs/rules/no-use-before-define

/**
* Possible errors
*/
"no-only-tests/no-only-tests": ["error", {"block": ["it", "describe"], "focus": ["only"]}],
"comma-dangle": [2, "never"], // http://eslint.org/docs/rules/comma-dangle
"no-cond-assign": [2, "always"], // http://eslint.org/docs/rules/no-cond-assign
"no-console": 1, // http://eslint.org/docs/rules/no-console
"no-debugger": 1, // http://eslint.org/docs/rules/no-debugger
"no-undef": 2, // https://eslint.org/docs/rules/no-undef
"no-const-assign": 2, // https://eslint.org/docs/rules/no-const-assign
"no-duplicate-imports": 2, // https://eslint.org/docs/rules/no-duplicate-imports
"no-alert": 1, // http://eslint.org/docs/rules/no-alert
"no-constant-condition": 1, // http://eslint.org/docs/rules/no-constant-condition
"no-dupe-keys": 2, // http://eslint.org/docs/rules/no-dupe-keys
Expand All @@ -79,7 +68,7 @@
"no-invalid-regexp": 2, // http://eslint.org/docs/rules/no-invalid-regexp
"no-irregular-whitespace": 2, // http://eslint.org/docs/rules/no-irregular-whitespace
"no-obj-calls": 2, // http://eslint.org/docs/rules/no-obj-calls
"no-reserved-keys": 2, // http://eslint.org/docs/rules/no-reserved-keys
"quote-props": [2, "as-needed", {"keywords": true, "unnecessary": false}], // http://eslint.org/docs/rules/no-reserved-keys
"no-sparse-arrays": 2, // http://eslint.org/docs/rules/no-sparse-arrays
"no-unreachable": 2, // http://eslint.org/docs/rules/no-unreachable
"use-isnan": 2, // http://eslint.org/docs/rules/use-isnan
Expand All @@ -88,7 +77,7 @@
/**
* Best practices
*/
"consistent-return": 2, // http://eslint.org/docs/rules/consistent-return
"consistent-return": [2, {"treatUndefinedAsUnspecified": true}], // http://eslint.org/docs/rules/consistent-return
"curly": [2, "multi-line"], // http://eslint.org/docs/rules/curly
"default-case": 2, // http://eslint.org/docs/rules/default-case
"dot-notation": [2, { // http://eslint.org/docs/rules/dot-notation
Expand Down Expand Up @@ -139,9 +128,10 @@
"quotes": [
0, "single", "avoid-escape" // http://eslint.org/docs/rules/quotes
],
"camelcase": [2, { // http://eslint.org/docs/rules/camelcase
"properties": "never"
}],
"camelcase": [1, { // http://eslint.org/docs/rules/camelcase
"properties": "never",
"allow": ["^UNSAFE_"]}
],
"comma-spacing": [2, { // http://eslint.org/docs/rules/comma-spacing
"before": false,
"after": true
Expand All @@ -163,7 +153,7 @@
"no-new-object": 2, // http://eslint.org/docs/rules/no-new-object
"no-spaced-func": 2, // http://eslint.org/docs/rules/no-spaced-func
"no-trailing-spaces": 2, // http://eslint.org/docs/rules/no-trailing-spaces
"no-wrap-func": 2, // http://eslint.org/docs/rules/no-wrap-func
"no-extra-parens": [2, "functions"], // http://eslint.org/docs/rules/no-wrap-func
"no-underscore-dangle": 0, // http://eslint.org/docs/rules/no-underscore-dangle
"one-var": [2, "never"], // http://eslint.org/docs/rules/one-var
"padded-blocks": [0, "never"], // http://eslint.org/docs/rules/padded-blocks
Expand All @@ -172,12 +162,12 @@
"before": false,
"after": true
}],
"space-after-keywords": 2, // http://eslint.org/docs/rules/space-after-keywords
"keyword-spacing": [2, {"after": true}], // http://eslint.org/docs/rules/space-after-keywords
"space-before-blocks": 2, // http://eslint.org/docs/rules/space-before-blocks
"space-before-function-paren": [2, "never"], // http://eslint.org/docs/rules/space-before-function-paren
"space-infix-ops": 2, // http://eslint.org/docs/rules/space-infix-ops
"space-return-throw-case": 2, // http://eslint.org/docs/rules/space-return-throw-case
"spaced-line-comment": 2, // http://eslint.org/docs/rules/spaced-line-comment
// "space-return-throw-case": 2, // http://eslint.org/docs/rules/space-return-throw-case
"spaced-comment": 2, // http://eslint.org/docs/rules/spaced-line-comment

/**
* JSX style
Expand All @@ -194,7 +184,7 @@
"react/no-did-update-set-state": 2, // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-update-set-state.md
"react/no-multi-comp": 0, // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md
"react/no-unknown-property": 2, // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md
"react/prop-types": [2, { ignore: ["children"]}], // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md
"react/prop-types": [2, { "ignore": ["children"]}], // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md
"react/react-in-jsx-scope": 2, // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/react-in-jsx-scope.md
"react/self-closing-comp": 2, // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md
"react/wrap-multilines": 2, // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/wrap-multilines.md
Expand All @@ -213,10 +203,13 @@
"/^state$/",
"getInitialState",
"getChildContext",
"UNSAFE_componentWillMount",
"componentWillMount",
"componentDidMount",
"UNSAFE_componentWillReceiveProps",
"componentWillReceiveProps",
"shouldComponentUpdate",
"UNSAFE_componentWillUpdate",
"componentWillUpdate",
"componentDidUpdate",
"componentWillUnmount",
Expand Down
1 change: 1 addition & 0 deletions geonode_mapstore_client/client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
env.json
2 changes: 1 addition & 1 deletion geonode_mapstore_client/client/MapStore2
Submodule MapStore2 updated 2530 files
33 changes: 21 additions & 12 deletions geonode_mapstore_client/client/README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,30 @@
__PROJECTDESCRIPTION__
==========
# MapStore GeoNode client

Quick Start
------------
## Development setup

Clone the repository with the --recursive option to automatically clone submodules:
Start the development application locally:

`git clone --recursive __REPOURL__`
- create a `env.json` file in `geonode_mapstore_client/client` directory with needed variables
```js
// env.json file
{
"DEV_SERVER_HOST": "eg: my-geonode-host.org"
}
```
- `npm install`
- `npm start`

Install NodeJS >= 7.10.0 , if needed, from [here](https://nodejs.org/en/download/releases/).
The application runs at `https://localhost:8081` afterwards.

Start the development application locally:
Note: localhost uses `https` protocol to connect a remote GeoNode instance

## Compile bundle

`npm install`
- `npm run compile`

`npm start`
or run `build.sh` for the complete build process

The application runs at `http://localhost:8081` afterwards.
## Tools

Read more on the [wiki](__REPOURL__/wiki).
- node v12.14.1
- npm 6.13.4
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@
* LICENSE file in the root directory of this source tree.
*/

const Layers = require('../../../MapStore2/web/client/utils/openlayers/Layers');
const ol = require('openlayers');
import Layers from '../../../MapStore2/web/client/utils/openlayers/Layers';

import TileLayer from 'ol/layer/Tile';
import TileArcGISRest from 'ol/source/TileArcGISRest';

Layers.registerType('arcgis', {
create: (options) => {
return new ol.layer.Tile({
return new TileLayer({
opacity: options.opacity !== undefined ? options.opacity : 1,
visible: options.visibility !== false,
zIndex: options.zIndex,
source: new ol.source.TileArcGISRest({
source: new TileArcGISRest({
params: {LAYERS: `show:${parseInt(options.name || 0, 10)}`},
url: options.url
})
Expand Down
Loading

0 comments on commit 8b12943

Please sign in to comment.