Skip to content
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

Improve map settings #719

Merged
merged 8 commits into from
Jun 30, 2022
Merged

Improve map settings #719

merged 8 commits into from
Jun 30, 2022

Conversation

dtrucs
Copy link
Collaborator

@dtrucs dtrucs commented Jun 27, 2022

BREAKING CHANGE: Improvements of map settings:

  • Ability to display different layers depending on the zoom
  • Ability to define bounds to some layers -> Related to Basemap différente en fonction de la zone affichée #689 ticket.
  • Live change attributions to match with the current display layer(s)
  • Ability to define an exclusive layer registered for offline use.

@camillemonchicourt
Copy link
Member

Nous devrions aussi et surtout modifier le fichier https://github.com/GeotrekCE/Geotrek-rando-v3/blob/Improve-map-settings/frontend/config/map.json qui est celui qui va être utilisé par défaut, si il n'est pas surcouché dans la customisation du Geotrek-rando-v3.

{
"url": "https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png",
"options": {
"attribution": "OpenTopoMap"
Copy link
Member

@camillemonchicourt camillemonchicourt Jun 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Le crédit correct d'OTM fait plus mal et doit être :

Map data: © <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors, SRTM | Map style: © <a href="https://opentopomap.org" target="_blank">OpenTopoMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/" target="_blank">CC-BY-SA</a>)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Voir #720

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

"mapOfflineLayer": {
"url": "https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png",
"options": {
"attribution": "OpenTopoMap"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Le crédit correct d'OTM fait plus mal et doit être :

Map data: © <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors, SRTM | Map style: © <a href="https://opentopomap.org" target="_blank">OpenTopoMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/" target="_blank">CC-BY-SA</a>)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Voir #720

"mapCredits": "OpenTopoMap",
"mapClassicLayerUrl": "https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png",
"mapSatelliteLayerUrl": "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
"mapClassicLayers": [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je ne vois comment on peut faire ça : Ability to display different layers depending on the zoom
On pourrait mettre un exemple plus complet avec ce cas vu que c'est un fichier d'exemple qui n'est pas utilisé par l'application ?
Par exemple mettre OTM à large échelle et IGN PLAN V2 (https://wxs.ign.fr/cartes/geoportail/wmts?&REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE=normal&TILEMATRIXSET=PM&FORMAT=image/png&LAYER=GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}) du zoom 15 au 18 pour l'exemple ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Voir #720

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Configuration added

Copy link
Member

@camillemonchicourt camillemonchicourt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quelques précisions sur les fonds et leurs attributions dans l'exemple du custo

@dtrucs dtrucs force-pushed the Improve-map-settings branch 6 times, most recently from 372ebaf to 7418f90 Compare June 28, 2022 09:58
```
- `mapClassicLayers`: array of `LayerObjects` for the default version.
- `mapSatelliteLayers`: array of `LayerObjects` for the satellite version.
- `mapOfflineLayer`: `LayerObject` registered for offline use. If not defined, the application uses the first layer of `mapClassicLayers` as a fallback.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If not defined, it will use the one set in frontend/config/map.json.
So we should rather say, If set to undefined or to null ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! Fixed

@camillemonchicourt camillemonchicourt merged commit 9f1d1cf into develop Jun 30, 2022
@camillemonchicourt camillemonchicourt deleted the Improve-map-settings branch June 30, 2022 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants