Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

get_collection_map does not parse the transparent query parameter

Abierto
#2,444 0 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@tomkralidis ya está trabajando en esto.

Desde el 18/10/2026.

  • #2445 de @ozenyunus35 — cerrado sin fusionar

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python
Área
api

Línea de trabajo

The string transparent is copied into query_args without conversion in pygeoapi/api/maps.py near line 135, and MapScriptProvider in pygeoapi/provider/mapscript_.py around lines 185-188 tests it as a truthy value. Read both, then check how the other parsed parameters are converted. Done means the API passes a real bool and the provider's check works for 'false'. Pull request #2445 is already open against this issue, so review or coordinate with it before writing a new patch.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug OGC API - Maps

When handling an OGC API Maps request, pygeoapi does not parse the transparent query parameter into a bool, as seen in:

https://github.com/geopython/pygeoapi/blob/990e5f72ec938b3ad7aca5e493dda736806ebd6a/pygeoapi/api/maps.py#L135

As seen above, if request.params['transparent'] exists, then it is stored as is in query_args['transparent'] - i.e. as a string.

This means that map providers are left to parse this parameter, unlike all other parameters, which are parsed by pygeoapi before calling the map provider.

This is also causing a bug in the built-in MapScriptProvider. This provider does not parse the transparent parameter either. It simply tries to use it, as seen in:

https://github.com/geopython/pygeoapi/blob/990e5f72ec938b3ad7aca5e493dda736806ebd6a/pygeoapi/provider/mapscript_.py#L185-L188

In the above snippet, as explained before, it is possible that transparent is a string. When that is the case, the above if check will not work as intended (because in Python all strings are truthy, i.e. if "false" evaluates to True).

Lenguaje dominante
Python
Estrellas
626
Forks
339
Merge medio
2 d 9 h
PR fusionados (30 d)
5

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de geopython/pygeoapi

Todos los issues de geopython/pygeoapi

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.