Skip to content
Snippets Groups Projects
Commit 3de72438 authored by ncastejon's avatar ncastejon
Browse files

Improve a little the style.

parent 0d8062b2
No related branches found
No related tags found
No related merge requests found
......@@ -123,6 +123,24 @@ To do so, a `variables.scss` file that contains our project variables, overrides
* interactions
* detail of a data on map feature click
For each geographical dataset it's possible to display the data on a map. Here is what have been done to make this happen.
Mapbox GL JS
On the client side, the library [Mapbox GL JS](https://github.com/mapbox/mapbox-gl-js) is used. This is a very interesting tool improving quickly. The only drawback using it with Angular is that we cannot always use its last version. Indeed as we are using Typescript, we need to wait until the @types are updated.
### Styling
Mapbox use the [Mapbox style specification](https://docs.mapbox.com/mapbox-gl-js/style-spec/) to define the visual appearance of a map.
In our project we have created different styles depending on how we want to display the map. For example when we display the aerial layer, we don't necessary want the names of, say the roads and the river, to have the same color than when we display the vectorial layer.
So when we change these layers, we load the appropriate style.
### How is the data fetched ?
Initially we were using Web Feature Service (WFS) and Web Map Service protocols to get the data (geojson or images). But for WFS we realized that when our needs became more complex and precise, this could sometimes be not so easy (filters are not the most funny thing to do).
So we used...Elasticsearch. It is super fast and even have geographical research. We fetch the data from ES, format it into a `.geojson` and voilà ! This will also allow us in the future to have more advanced features on the map (like filters).
#### Fullscreen
#### Toggle Map/data
......@@ -148,24 +166,6 @@ Here are the features existing on the portal:
Of course there is a plenty of room for improvements for these features (and for new ones). ES is very powerful but also very complex to master. It's in a constant improvement.
## Map features
For each geographical dataset it's possible to display the data on a map. Here is what have been done to make this happen.
### Mapbox GL JS
On the client side, the library [Mapbox GL JS](https://github.com/mapbox/mapbox-gl-js) is used. This is a very interesting tool improving quickly. The only drawback using it with Angular is that we cannot always use its last version. Indeed as we are using Typescript, we need to wait until the @types are updated.
### Styling
Mapbox use the [Mapbox style specification](https://docs.mapbox.com/mapbox-gl-js/style-spec/) to define the visual appearance of a map.
In our project we have created different styles depending on how we want to display the map. For example when we display the aerial layer, we don't necessary want the names of, say the roads and the river, to have the same color than when we display the vectorial layer.
So when we change these layers, we load the appropriate style.
### How is the data fetched ?
Initially we were using Web Feature Service (WFS) and Web Map Service protocols to get the data (geojson or images). But for WFS we realized that when our needs became more complex and precise, this could sometimes be not so easy (filters are not the most funny thing to do).
So we used...Elasticsearch. It is super fast and even have geographical research. We fetch the data from ES, format it into a `.geojson` and voilà ! This will also allow us in the future to have more advanced features on the map (like filters).
## API & Downloads feature
......
body {
background: #f2f2f2;
}
.md-content {
background: white;
border: 1px solid #dcd9d9;
margin-bottom: 2rem;
}
\ No newline at end of file
......@@ -17,6 +17,8 @@ theme:
feature:
tabs: false
extra_css: [extra.css]
markdown_extensions:
- plantuml_markdown:
server: http://www.plantuml.com/plantuml
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment