openstreetmap/iD

Add a parameter to support custom {tileSize} of WMTS backgrounds

Aberta

#8.688 aberto em 13 de set. de 2021

 (1 comentário) (0 reação) (0 responsável)JavaScript (1.449 forks)github user discovery
help wanted

Métricas do repositório

Stars
 (3.818 estrelas)
Métricas de merge de PR
 (Mesclagem média 29d 14h) (82 fundiu PRs em 30d)

Description

I see the current logic is 256 by default

https://github.com/openstreetmap/iD/blob/bc0c1895f7b240a35e1beb6b9220eb15d8c36a70/modules/renderer/background_source.js#L51

Of course for some exceptions there are few hacks:

https://github.com/openstreetmap/iD/blob/1ee45ee1f03f0fe4d452012c65ac6ff7649e229f/scripts/update_imagery.js#L94-L101

Wouldn't it be better to add a parameter for custom backgrounds to define the tileSize by themselves? If iD supports this, ELI will be able to add more WMTS sources.

Currently only JOSM can handle 512x512 automatically because it reads WMTSCapabilities directly.

A WMTS service cannot be opened in iD 2.20.1: https://geodata.md.gov/imap/rest/services/Imagery/MD_SixInchImagery/MapServer/WMTS/1.0.0/WMTSCapabilities.xml

Guia do colaborador