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

Can't upload layer with SVG icon point style #39

Closed
thatbudakguy opened this issue May 3, 2016 · 13 comments
Closed

Can't upload layer with SVG icon point style #39

thatbudakguy opened this issue May 3, 2016 · 13 comments

Comments

@thatbudakguy
Copy link

Dragging a layer with an SVG icon style to the "layers" listing throws a 404 error:

Error uploading SVG icon to GeoServer: 404 Client Error: Not Found 
Traceback (most recent call last):
  File "/Users/budak/.qgis2/python/plugins/geoserverexplorer/gui/explorer.py", line 101, in run
    command(*params)
  File "/Users/budak/.qgis2/python/plugins/geoserverexplorer/gui/confirm.py", line 18, in publishLayer
    catalog.publishLayer(layer, workspace, True, name)
  File "/Users/budak/.qgis2/python/plugins/geoserverexplorer/qgis/catalog.py", line 493, in publishLayer
    sld = self.publishStyle(layer, overwrite, name) if style is None else None
  File "/Users/budak/.qgis2/python/plugins/geoserverexplorer/qgis/catalog.py", line 163, in publishStyle
    self.uploadIcons(icons)
  File "/Users/budak/.qgis2/python/plugins/geoserverexplorer/qgis/catalog.py", line 179, in uploadIcons
    raise Exception ("Error uploading SVG icon to GeoServer:\n" + str(e))
Exception: Error uploading SVG icon to GeoServer:
404 Client Error: Not Found

reproduced in this post.

@mprins
Copy link

mprins commented Aug 9, 2016

Apparently you need to have the /geoserver/app/api/icons endpoint (https://github.com/boundlessgeo/suite/blob/master/geoserver/webapp/src/main/java/com/boundlessgeo/geoserver/api/controllers/IconController.java) that provides the Icons API (https://github.com/boundlessgeo/suite/wiki/Icons-API) which seems to only be available in the Boundless suite product (and not as a geoserver extension)

@ddespres
Copy link
Contributor

Hello, i've juste sent a pull request that may resolve this issue. I'm uploading icons using the geoserver standard API

@gioman
Copy link
Contributor

gioman commented Dec 2, 2016

@volaya @luipir I can confirm that on stock Geoserver the above error is thrown while on Boundless Suite the import goes well. I guess that the error would be better be caught to return a better warning.

@volaya
Copy link
Contributor

volaya commented Dec 2, 2016 via email

@ddespres
Copy link
Contributor

ddespres commented Dec 2, 2016

@volaya plain geoserver has a rest/resource/styles services which is equivalent to app/api/icons of Boundless Suite service. I've changed the service used in uploadIcons function in my pull request and i think you've just merged it in #51 So this error will not appear any more if i'm correct

@gioman gioman added the question label Dec 4, 2016
@gioman
Copy link
Contributor

gioman commented Dec 4, 2016

@volaya is the SVG file defined in QGIS supposed to be automatically uploaded to the server and applied in the resulting SLD style?

@volaya
Copy link
Contributor

volaya commented Dec 5, 2016

@ddespres I was not aware of that. Great news. Will take a look at the PR and merge it

@gioman Yes, if the style uses SVG icons, the icons are uploaded. That is the problem now, that the upload is only available for suite geoserver, since standard geoserver didnt have that capability. Hopefully with the new version and this PR that @ddespres wrote, we will fix that :-)

@volaya
Copy link
Contributor

volaya commented Dec 5, 2016

Ah, I had already merged the PR :-)

Thanks again, @ddespres !

@ddespres
Copy link
Contributor

ddespres commented Dec 5, 2016

No problem, that wasn't a big work ;-)

@gioman
Copy link
Contributor

gioman commented Dec 5, 2016

@gioman Yes, if the style uses SVG icons, the icons are uploaded. That is the problem now, that the upload is only available for suite geoserver, since standard geoserver didnt have that capability. Hopefully with the new version and this PR that @ddespres wrote, we will fix that :-)

@volaya Hi Victor, thanks for the feedback. It works if the layer is loaded back as WMS, but if loaded as WFS the SVG symbol apparently fails to load and in QGIS canvas is replaced with the "?" one. Not sure anyway if this is also supposed to work for WFS.

@volaya
Copy link
Contributor

volaya commented Dec 5, 2016 via email

@gioman
Copy link
Contributor

gioman commented Dec 5, 2016

good catch. I guess the icon has to be downloaded back, but that is not implemented at the moment

added a feature request here:

#55

@gioman gioman closed this as completed Dec 5, 2016
@gioman
Copy link
Contributor

gioman commented Dec 5, 2016

I guess we can tag it as a limitation, adding it to the documentation, for now

also added a note here: https://github.com/boundlessgeo/qgis-geoserver-plugin/blob/master/docs/source/intro.rst

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

No branches or pull requests

5 participants