Skip to content

Commit

Permalink
Moved project from TomorrowNowApp into it's on repository for intergr…
Browse files Browse the repository at this point in the history
…ation with OpenPlains
  • Loading branch information
cwhite911 committed Nov 3, 2022
1 parent 7d44240 commit aebe8b3
Show file tree
Hide file tree
Showing 70 changed files with 6,252 additions and 1 deletion.
45 changes: 44 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,45 @@
# react-ol
# (In Development) react-ol

React component library for OpenLayers.

## Example

```js

<Map center={center} zoom={zoom} projection={projection}>
<Layers>
<TileLayer source={nlcdsource} opacity={0.75}/>
<TileLayer source={osmSource} opacity={0.5}/>
<VectorTileLayer
layerName="counties"
zIndex={1}
minZoom={4}
declutter={true}
renderMode="vector"
style={countiesStyleWithLabel}
source={countySource}
/>
<VectorTileLayer
layerName="seletedCounties"
renderMode="vector"
source={countySource}
style={countyStyle}
/>
</Layers>

<Controls>
<FullScreenControl />
<ZoomSliderControl />
<ScaleLineControl />
</Controls>

<Interactions>
<Draw source={pointSource}></Draw>
</Interactions>

<Events>
<OnMapEvent eventName='click' eventHandler={onClickEvent}></OnMapEvent>
</Events>
</Map>

```
73 changes: 73 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"name": "webapp",
"version": "0.1.0",
"private": true,
"proxy": "http://localhost:8005",
"dependencies": {
"@openplains/grass-js-client": "^1.0.0-alpha.2",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"bootstrap": "^5.1.3",
"colormap": "^2.3.2",
"esbuild": "^0.14.39",
"geotiff": "^2.0.5",
"gl-matrix": "^3.4.3",
"history": "^5.0.0",
"ol": "^7.1.0",
"ol-ext": "^3.2.30",
"proj4": "^2.8.0",
"react": "^17.0.2",
"react-bootstrap": "^2.2.1",
"react-dom": "^17.0.2",
"react-flow-renderer": "^10.3.16",
"react-hook-form": "^7.30.0",
"react-icons": "^4.4.0",
"react-router-bootstrap": "^0.26.1",
"react-router-dom": "^6.0.0",
"react-scripts": "^5.0.1",
"react-spring": "^9.4.4",
"react-use-websocket": "^3.0.0",
"recharts": "^2.1.9",
"release-it": "^15.0.0",
"sass": "^1.49.9",
"web-vitals": "^1.0.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"pretest": "./pretest.sh",
"test-ci": "react-scripts test --watchAll=false",
"pretest-ci": "./pretest.sh",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"jest": {
"transformIgnorePatterns": [
"/node_modules/(?!ol).+\\.js$"
],
"moduleNameMapper": {
"^__comment__$": "Use the *bundled* version of open layers that is created by ./pretest.sh",
"^ol/(.*)$": "<rootDir>/node_modules/.compiled/ol/ol.js"
}
}
}

47 changes: 47 additions & 0 deletions src/Colors/aspect.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* Filename: aspect.js
* Project: TomorrowNow
* File Created: Monday April 4th 2022
* Author: Corey White ([email protected])
* Maintainer: Corey White
* -----
* Last Modified: Mon Apr 04 2022
* Modified By: Corey White
* -----
* License: GPLv3
*
* Copyright (c) 2022 TomorrowNow
*
* TomorrowNow is an open-source geospatial participartory modeling platform
* to enable stakeholder engagment in socio-environmental decision-makeing.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/

const aspect = [
'interpolate',
['linear'],
['band', 1],
0, 'white',
1, 'yellow',
90, 'green',
180, 'cyan',
270, 'red',
360, 'yellow'
]

export default aspect


Loading

0 comments on commit aebe8b3

Please sign in to comment.