-
Notifications
You must be signed in to change notification settings - Fork 20
added new baselayer with various styling #70
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
base: master
Are you sure you want to change the base?
added new baselayer with various styling #70
Conversation
|
👷 Deploy request for raster-playground pending review. 🔨 Explore the source changes: b958d1a |
|
leave feedback so i can improve as soon as possible |
| REACT_APP_MAPBOX_STYLE_ACCESS_TOKEN=pk.eyJ1Ijoic2hpdmFtLXNvbmkiLCJhIjoiY2t3OTFhdTFiMDR0OTJucWxhdG13bnk0dSJ9.eV9aMwxPXkIDz9DkUe5HdA | ||
| REACT_APP_MAPBOX_LIGHT_STYLE=https://api.mapbox.com/styles/v1/shivam-soni/ckvb1lz88098p16s55aog1tvv/tiles/256/{z}/{x}/{y} | ||
| REACT_APP_MAPBOX_DARK_STYLE=https://api.mapbox.com/styles/v1/shivam-soni/ckvb1pult2aon14mt5de2lc79/tiles/256/{z}/{x}/{y} | ||
| REACT_APP_MAPBOX_SATELLITE_STYLE=https://api.mapbox.com/styles/v1/shivam-soni/ckvb1rchjc1ut14s7lsi66s3g/tiles/256/{z}/{x}/{y} | ||
| REACT_APP_MAPBOX_STREETS_STYLE=https://api.mapbox.com/styles/v1/shivam-soni/ckvb1sp6h4svu15t5h7snxwgc/tiles/256/{z}/{x}/{y} | ||
| REACT_APP_MAPBOX_GREEN_STYLE=https://api.mapbox.com/styles/v1/shivam-soni/ckvb1tksh05ts14mxll1ykm7s/tiles/256/{z}/{x}/{y} No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This must not be part of the code
.gitignore
Outdated
|
|
||
| # production | ||
| /build | ||
| /build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove extra space
.gitignore
Outdated
| .env.production.local | ||
| .env | ||
| .env.development | ||
| .env.development |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove extra space
src/components/main-app/ol-init.js
Outdated
| <button | ||
| className="toggle" | ||
| onClick={e => onChangeBaseLayer('light', URL_UPDATE_PUSH)} | ||
| > | ||
| light | ||
| </button> | ||
| <button | ||
| className="toggle" | ||
| onClick={e => onChangeBaseLayer('dark', URL_UPDATE_PUSH)} | ||
| > | ||
| dark | ||
| </button> | ||
| <button | ||
| className="toggle" | ||
| onClick={e => onChangeBaseLayer('satelight', URL_UPDATE_PUSH)} | ||
| > | ||
| satelight | ||
| </button> | ||
| <button | ||
| className="toggle" | ||
| onClick={e => onChangeBaseLayer('street', URL_UPDATE_PUSH)} | ||
| > | ||
| street | ||
| </button> | ||
| <button | ||
| className="toggle" | ||
| onClick={e => onChangeBaseLayer('green', URL_UPDATE_PUSH)} | ||
| > | ||
| green | ||
| </button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can have a single component for this and dynamically generate with help of a map function
| */ | ||
| export default function clipRasterLayer({ rasterLayer, shape }) { | ||
| //Create cliping layer from topojson | ||
| // console.log(`shape`, shape); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this
src/components/main-app/ol/main.js
Outdated
| // console.log(`baseMapLayerLoaded`, baseMapLayerLoaded); | ||
| baseMapLayer = baseMapLayerLoaded.baseMapLayer; | ||
| // console.log(`baseMapLayer`, baseMapLayer); | ||
| baseMapSource = baseMapLayerLoaded.baseMapSource; | ||
| // console.log(`baseMapSource`, baseMapSource); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unnecessary console comments
src/utils/get-base-map-url.js
Outdated
| // console.log(`style`, style); | ||
| // console.log(`BASEMAP_LIGHT_STYLE`, BASEMAP_LIGHT_STYLE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unnecessary console comments
src/components/main-app/ol-init.js
Outdated
| } | ||
|
|
||
| if (olInstances.baseMapSource && baseLayer && prevBaseLayer !== baseLayer) { | ||
| // console.log(`prevBaseLayer`, prevBaseLayer, baseLayer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unnecessary console comments
| import { Tile as TileLayer } from 'ol/layer'; | ||
|
|
||
| export function baseMapLayerLoader(url) { | ||
| // console.log(`url`, url); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unnecessary console comments
src/components/tool-tip/toolTip.js
Outdated
| import React from 'react'; | ||
| import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; | ||
| import { faInfoCircle } from '@fortawesome/free-solid-svg-icons'; | ||
| import 'react-tippy/dist/tippy.css'; | ||
| import { Tooltip } from 'react-tippy'; | ||
|
|
||
| const Tooltips = ({ tipinfo }) => { | ||
| return ( | ||
| <div> | ||
| <Tooltip title={tipinfo} position="bottom" trigger="click"> | ||
| <FontAwesomeIcon icon={faInfoCircle} /> | ||
| </Tooltip> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export default Tooltips; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why tooltip code is part of this PR? It should be part of -
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this tooltip code from this PR
I think you branched it from that PR
|
refactor all changes |
|
Review this |




add various types of styling layers