Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
web-et-numerique
web-et-numerique-internet
data.grandlyon.com
web-portal
components
custom-apps
web-app
Commits
38c29492
Commit
38c29492
authored
Oct 22, 2019
by
FORESTIER Fabien
Browse files
Make sure cache is not used for real time data + Use 2018 version of orthophoto
parent
c1ba1246
Pipeline
#1784
passed with stages
in 13 minutes and 30 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/app/geosource/models/elasticsearch-options.model.ts
View file @
38c29492
...
...
@@ -34,6 +34,7 @@ export interface IElasticsearchOptions {
'
shouldAggregateResultCount
'
:
boolean
;
'
shouldAggregateFilters
'
:
boolean
;
'
scope
'
:
IScope
;
'
useCache
'
:
boolean
;
}
export
class
ElasticsearchOptions
{
...
...
@@ -47,7 +48,8 @@ export class ElasticsearchOptions {
'
shouldAggregateFilters
'
:
boolean
;
'
fromAutocompletion
'
:
boolean
;
'
scope
'
:
IScope
;
otherLicenceAggregations
:
string
[];
'
useCache
'
:
boolean
;
'
otherLicenceAggregations
'
:
string
[];
constructor
(
data
?)
{
this
.
from
=
(
data
&&
data
.
from
!=
null
)
?
data
.
from
:
0
;
...
...
@@ -59,6 +61,7 @@ export class ElasticsearchOptions {
this
.
fromAutocompletion
=
false
;
this
.
scope
=
(
data
.
scope
)
?
data
.
scope
:
scopesResearch
.
all
;
this
.
otherLicenceAggregations
=
[];
this
.
useCache
=
(
data
&&
data
.
useCache
!=
null
)
?
data
.
useCache
:
true
;
// Need to be done in order to avoid object reference copy
this
.
_sortOptions
=
{
...
...
src/app/geosource/services/dataset-detail.service.ts
View file @
38c29492
...
...
@@ -95,6 +95,9 @@ export class DatasetDetailService {
this
.
_dataset
.
metadata
=
metadata
;
this
.
_dataset
.
editorialMetadata
=
new
EditorialMetadata
(
e
.
hits
.
hits
[
0
].
_source
[
'
editorial-metadata
'
]);
// Disable cache for real time dataset
this
.
_elasticSearchOptions
.
useCache
=
this
.
datasetEditorialMetadata
.
isRealTime
?
false
:
true
;
}
else
{
this
.
_dataset
.
metadata
=
new
Metadata
();
}
...
...
src/app/geosource/services/elasticsearch.service.ts
View file @
38c29492
...
...
@@ -162,8 +162,12 @@ export class ElasticsearchService {
},
];
}
const
headers
=
options
.
useCache
?
{}
:
{
nocache
:
'
True
'
};
return
this
.
_http
.
request
<
IElasticsearchResponse
>
(
'
POST
'
,
this
.
elasticSearchUrl
,
{
body
,
headers
,
withCredentials
:
true
,
}).
pipe
(
catchError
(
...
...
src/assets/mapbox-gl-styles/satellite.json
View file @
38c29492
{
"version"
:
8
,
"sources"
:
{
"raster-tiles"
:
{
"type"
:
"raster"
,
"tiles"
:
[
"https://ortho.data.grandlyon.com/?bbox={bbox-epsg-3857}&format=image/jpeg&service=WMS&version=1.1.1&request=GetMap&srs=EPSG:3857&width=512&height=512&transparent=true&layers=ortho2015"
],
"maxzoom"
:
21
,
"attribution"
:
"© <a href='https://www.openstreetmap.org/copyright'>OpenStreetMap</a> contributors"
"version"
:
8
,
"sources"
:
{
"raster-tiles"
:
{
"type"
:
"raster"
,
"tiles"
:
[
"https://ortho.data.grandlyon.com/?bbox={bbox-epsg-3857}&format=image/jpeg&service=WMS&version=1.1.1&request=GetMap&srs=EPSG:3857&width=512&height=512&transparent=true&layers=ortho2018"
],
"maxzoom"
:
21
,
"attribution"
:
"© <a href='https://www.openstreetmap.org/copyright'>OpenStreetMap</a> contributors"
},
"openmaptiles"
:
{
"type"
:
"vector"
,
"tiles"
:
[
"https://openmaptiles.data.grandlyon.com/data/v3/{z}/{x}/{y}.pbf"
],
"minzoom"
:
0
,
"maxzoom"
:
22
}
},
"glyphs"
:
"https://openmaptiles.geo.data.gouv.fr/fonts/{fontstack}/{range}.pbf"
,
"layers"
:
[
{
"id"
:
"simple-tiles"
,
"type"
:
"raster"
,
"source"
:
"raster-tiles"
},
{
"id"
:
"road_major_label"
,
"type"
:
"symbol"
,
"source"
:
"openmaptiles"
,
"source-layer"
:
"transportation_name"
,
"filter"
:
[
"=="
,
"$type"
,
"LineString"
],
"layout"
:
{
"symbol-placement"
:
"line"
,
"text-field"
:
"{name:latin} {name:nonlatin}"
,
"text-font"
:
[
"Noto Sans Regular"
],
"text-transform"
:
"uppercase"
,
"text-letter-spacing"
:
0.1
,
"text-size"
:
{
"base"
:
1.4
,
"stops"
:
[
[
10
,
8
],
[
20
,
14
]
]
},
"openmaptiles"
:
{
"type"
:
"vector"
,
"tiles"
:
[
"https://openmaptiles.data.grandlyon.com/data/v3/{z}/{x}/{y}.pbf"
],
"minzoom"
:
0
,
"maxzoom"
:
22
}
},
"glyphs"
:
"https://openmaptiles.geo.data.gouv.fr/fonts/{fontstack}/{range}.pbf"
,
"layers"
:
[{
"id"
:
"simple-tiles"
,
"type"
:
"raster"
,
"source"
:
"raster-tiles"
"text-rotation-alignment"
:
"map"
},
{
"id"
:
"road_major_label"
,
"type"
:
"symbol"
,
"source"
:
"openmaptiles"
,
"source-layer"
:
"transportation_name"
,
"filter"
:
[
"paint"
:
{
"text-color"
:
"#fff"
,
"text-halo-color"
:
"black"
,
"text-halo-width"
:
2
}
},
{
"id"
:
"place_label_other"
,
"type"
:
"symbol"
,
"source"
:
"openmaptiles"
,
"source-layer"
:
"place"
,
"minzoom"
:
8
,
"filter"
:
[
"all"
,
[
"=="
,
"$type"
,
"
LineString
"
"
Point
"
],
"layout"
:
{
"symbol-placement"
:
"line"
,
"text-field"
:
"{name:latin} {name:nonlatin}"
,
"text-font"
:
[
"Noto Sans Regular"
],
"text-transform"
:
"uppercase"
,
"text-letter-spacing"
:
0.1
,
"text-size"
:
{
"base"
:
1.4
,
"stops"
:
[
[
10
,
8
],
[
20
,
14
]
]
},
"text-rotation-alignment"
:
"map"
},
"paint"
:
{
"text-color"
:
"#fff"
,
"text-halo-color"
:
"black"
,
"text-halo-width"
:
2
}
},
{
"id"
:
"place_label_other"
,
"type"
:
"symbol"
,
"source"
:
"openmaptiles"
,
"source-layer"
:
"place"
,
"minzoom"
:
8
,
"filter"
:
[
"all"
,
[
"!in"
,
"class"
,
"city"
,
"state"
,
"country"
,
"continent"
]
],
"layout"
:
{
"text-field"
:
"{name:latin}
\n
{name:nonlatin}"
,
"text-font"
:
[
"Noto Sans Regular"
],
"text-max-width"
:
6
,
"text-size"
:
{
"stops"
:
[
[
"=="
,
"$type"
,
"Point"
6
,
10
],
[
"!in"
,
"class"
,
"city"
,
"state"
,
"country"
,
"continent"
12
,
14
]
],
"layout"
:
{
"text-field"
:
"{name:latin}
\n
{name:nonlatin}"
,
"text-font"
:
[
"Noto Sans Regular"
],
"text-max-width"
:
6
,
"text-size"
:
{
"stops"
:
[
[
6
,
10
],
[
12
,
14
]
]
},
"visibility"
:
"visible"
,
"text-anchor"
:
"center"
},
"paint"
:
{
"text-color"
:
"#fff"
,
"text-halo-color"
:
"black"
,
"text-halo-blur"
:
0
,
"text-halo-width"
:
2
}
}
]
}
]
},
"visibility"
:
"visible"
,
"text-anchor"
:
"center"
},
"paint"
:
{
"text-color"
:
"#fff"
,
"text-halo-color"
:
"black"
,
"text-halo-blur"
:
0
,
"text-halo-width"
:
2
}
}
]
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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