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

Orden de parámetros en cli #1

Open
michogar opened this issue Apr 12, 2018 · 1 comment
Open

Orden de parámetros en cli #1

michogar opened this issue Apr 12, 2018 · 1 comment
Labels

Comments

@michogar
Copy link

En la documentación indica que el parámetro id va al final de la orden Doc:

usage: portal portal-layers add [-h] [-f FILE] [-l LABEL] -g GROUP
                                [--infoFile INFOFILE] [--infoLink INFOLINK]
                                [--legend INLINELEGENDURL] [--active]
                                [--no-active] [--feedback] [--no-feedback]
                                [--time-instances TIMEINSTANCES]
                                [--time-styles TIMESTYLES]
                                [--date-format DATE_FORMAT]
                                id

Pero si lo ejecutamos así:

portal portal-layers add -f $LAYERS -l 'Strato' -g test --legend http://snmb.ambiente.gob.ar/geo-server/bosques_umsef_db/wms?service=WMS&version=1.1.0&request=GetLegendgraphic&layer=bosques_umsef_db:mon98pinbn3857&width=30&height=30&format=image/png strato2

da el siguiente mensaje y no crea la capa:

[1] 11498
[2] 11499
[3] 11500
[4] 11501
[5] 11502
[6] 11503
usage: portal portal-layers add [-h] [-f FILE] [-l LABEL] -g GROUP
                                [--infoFile INFOFILE] [--infoLink INFOLINK]
                                [--legend INLINELEGENDURL] [--active]
                                [--no-active] [--feedback] [--no-feedback]
                                [--time-instances TIMEINSTANCES]
                                [--time-styles TIMESTYLES]
                                [--date-format DATE_FORMAT]
                                id
portal portal-layers add: error: the following arguments are required: id
strato2: no se encontró la orden
[1]   Salida 2                portal portal-layers add -f $LAYERS -l 'Strato' -g test --legend http://snmb.ambiente.gob.ar/geo-server/bosques_umsef_db/wms?service=WMS
[2]   Hecho                   version=1.1.0
[3]   Hecho                   request=GetLegendgraphic
[4]   Hecho                   layer=bosques_umsef_db:mon98pinbn3857
[5]-  Hecho                   width=30
[6]+  Hecho                   height=30

Mientras que si cambiamos el orden:

portal portal-layers add -f $LAYERS -l 'Strato' -g test strato2 --legend http://snmb.ambiente.gob.ar/geo-server/bosques_umsef_db/wms?service=WMS&version=1.1.0&request=GetLegendgraphic&layer=bosques_umsef_db:mon98pinbn3857&width=30&height=30&format=image/png

Se ejecuta correctamente y añade la capa.

@michogar michogar added the bug label Apr 12, 2018
@victorzinho
Copy link

Creo que el problema lo tienes con el parámetro --legend. Como lleva & lo tienes que poner entre comillas o si no lo que estás haciendo es usar el operador de bash.

A mí me funciona así:

portal portal-layers add -l 'Strato' -g base --legend "http://snmb.ambiente.gob.ar/geo-server/bosques_umsef_db/wms?service=WMS&version=1.1.0&request=GetLegendgraphic&layer=bosques_umsef_db:mon98pinbn3857&width=30&height=30&format=image/png" strato2
Se ha añadido la capa.

Mira a ver si es eso.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants