Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Genesys Website
Commits
22e9402b
Commit
22e9402b
authored
Sep 14, 2018
by
Matija Obreza
Browse files
Tiles: directly target backend tile server
- Skips proxy
parent
3874ae82
Changes
2
Hide whitespace changes
Inline
Side-by-side
server/config.ts
View file @
22e9402b
...
...
@@ -16,7 +16,7 @@ const config = {
frontendPath
:
argv
[
'
frontend-path
'
]
||
''
,
// Backend
apiTimeout
:
+
(
argv
[
'
api-timeout
'
]
||
5000
),
apiUrl
:
argv
[
'
api-url
'
]
||
'
localhost:8080
'
,
apiUrl
:
argv
[
'
api-url
'
]
||
'
http://
localhost:8080
'
,
clientId
:
argv
[
'
client-id
'
]
||
'
defaultclient@localhost
'
,
clientSecret
:
argv
[
'
client-secret
'
]
||
'
changeme
'
,
googleClientId
:
argv
[
'
google-client-id
'
]
||
''
,
...
...
src/ui/pages/accessions/MapPage.tsx
View file @
22e9402b
...
...
@@ -16,9 +16,8 @@ import PrettyFilters from '../../common/filter/PrettyFilters';
let
Map
;
let
TileLayer
;
import
{
API_ROOT
}
from
'
constants/apiURLS
'
;
interface
IMapPageProps
extends
React
.
ClassAttributes
<
any
>
{
apiUrl
:
string
;
paged
:
FilteredPage
<
Accession
>
;
currentTab
:
string
;
classes
:
any
;
...
...
@@ -80,10 +79,10 @@ class BrowsePage extends React.Component<IMapPageProps, any> {
public
render
()
{
const
position
=
[
30
,
0
];
const
{
paged
,
currentTab
,
classes
,
filterCode
}
=
this
.
props
;
const
{
paged
,
currentTab
,
classes
,
filterCode
,
apiUrl
}
=
this
.
props
;
// const color = 'f00ba0';
const
layerUrl
=
`
${
API_ROOT
}
/acn/tile/{z}/{x}/{y}?f=
${
filterCode
?
filterCode
:
''
}
`
;
// `&color=${color}`;
const
layerUrl
=
`
${
apiUrl
}
/acn/tile/{z}/{x}/{y}?f=
${
filterCode
?
filterCode
:
''
}
`
;
// `&color=${color}`;
return
(
<
PageLayout
>
...
...
@@ -130,6 +129,7 @@ class BrowsePage extends React.Component<IMapPageProps, any> {
}
const
mapStateToProps
=
(
state
,
ownProps
)
=>
({
apiUrl
:
state
.
applicationConfig
.
apiUrl
,
paged
:
state
.
accessions
.
paged
||
undefined
,
filterCode
:
ownProps
.
match
.
params
.
filterCode
||
''
,
currentTab
:
ownProps
.
match
.
params
.
tab
||
'
map
'
,
// current tab, or ownProps.location.pathname
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment