Hello,
I'm new with Cartaro, and is't a great feature once you got it working.
Everything runs fine now, but i'm having to following issue.
I am trying to figure out how to:
1) change the look and colors of the Geometry type you can add.
Things like the color of a polygon, color and thickness of a line, size of point, etc.
2) activate OpenLayers Styles (Home » Administration » Structure » OpenLayers » Styles)
I managed to create custom extra styles, but it seems i am missing something.
How and where can i activate them, use them in my layers?
There seems to be no description anywhere on how to use your custom styles.
Thx in advance
Comments
Comment #1
VBN CreditAttribution: VBN commentedI tried to follow the instructions here, but is't not working
http://docs.geoserver.org/latest/en/user/styling/sld-cookbook/points.htm...
Comment #2
ulim CreditAttribution: ulim commentedWe are working on more detailed documentation of custom styling in Cartaro. Until this is done please refer to the HowTo on the Cartaro site and the documentation for the OpenLayers module:
http://cartaro.org/blog/14-how-use-qgis-great-looking-symbols-cartaro
https://drupal.org/node/1585880
If this doesn't help, please be a little more sepcific in your explanation what you want to do and which errors you see.
Comment #3
VBN CreditAttribution: VBN commentedI'll do some tests, thx
Comment #4
VBN CreditAttribution: VBN commentedI do find the QGIS way to complicated for a style change.
I just want to activate some symbols i created in the openlayers styles
If i check everything in the style layer selection menu (capture 0), there are no changes.
The default icon stays the same on the map.
Comment #5
VBN CreditAttribution: VBN commentedMeanwhile i figured out that any changes in the SLD (style Layer descriptor) are not registered.
Layer style changes wont work, the layer stays gray.
What do i do wrong?
Comment #6
VBN CreditAttribution: VBN commentedComment #7
azuledu CreditAttribution: azuledu commentedHi Nico.
The problem is that you are applying a Openlayers Style over a WFS GeoServer layer. Currently, the Geoserver module does not allow override GeoServer styles with OpenLayers styles. This is a functionality we want to implement in the future but there is no date for it.
The way of achieve what you want is defining SLD styles directly in GeoServer (http://docs.geoserver.org/latest/en/user/styling/index.html). You can also define dynamic styles using SLD filters.
Comment #8
VBN CreditAttribution: VBN commentedOk, thx for the WFS Geoserver layer info.
No need to apply then.
But i still have a problem when modifying the geoserver SLD style under drupal.
I get the following error:
"Failed to completely update style. See the log for details."
Logfile:
Error when attempting to create style capital: Access to http://[myserver]/geoserver/rest/workspaces/cartaro/styles.sld?name=capital returned HTTP status code 404.
Comment #9
azuledu CreditAttribution: azuledu commentedAnnoying, "random" and not-easily reproducible error....
Reported here: https://drupal.org/node/2098941
As a workaround, I added a new line at the end of the SLD definition inside Drupal. Sometimes, GeoServer do the same when a style is saved using the GeoServer UI.
Comment #10
VBN CreditAttribution: VBN commentedOk, i'll give it a try
Comment #11
azuledu CreditAttribution: azuledu commentedThe layer SLD style can be defined in GeoServer directly or using the Drupal GeoServer module.
The layer displayed style (screenshot 1) should be the same as the displayed style inside Drupal (screenshot 2) if you are using the WFS layer of GeoServer from Openlayers module.
Comment #12
VBN CreditAttribution: VBN commentedI deployed a new geoserver in tomcat and started over.
It seems there was a problem with the settings of "Using Drupal users and roles" in GeoServer.
The way to go was this:
I added a user with the drupal login and pass into geoserver and returned to default settings (for Active Role Service).
-> this results into the following: I need to add every Drupal member also in geoserver with the correct pass, in order to project the map in Drupal.
A bit of a hassle, but it works.
Now the SLD is indeed projected the way i want.
Phew, this still asks a lot of works guys.
Hope i could help in some way, keep up the good work
Comment #13
azuledu CreditAttribution: azuledu commentedDrupal and Geoserver user, roles and permissions synchronization can be done automatically with the Geoserver-Drupal extension. Documentation can be found here: https://drupal.org/node/1778042
Data permissions are explained here: https://drupal.org/node/2138329
Thanks for your help offer. Suggestions for improve Cartaro or patches to its modules are always welcome. Now that you are installing and testing, adding your findings to the documentation or clarify obscure points will be the best.
Comment #14
VBN CreditAttribution: VBN commentedLast question:
Why does the SLD looks different in Drupal then the default SLD information (cookbook version)?
I'll give an example:
Default code
And the Drupal version to insert:
If that sld: is not in front, i get following error:
-> Failed to completely update style. See the log for details.
Log details:
-> Error when attempting to update style capital: Access to http://[mysite]/geoserver/rest/workspaces/cartaro/styles/capital.sld returned HTTP status code 500.
Why is the sld: addition in front of every command?
Comment #15
VBN CreditAttribution: VBN commentedNobody?
Comment #16
augustus.kling CreditAttribution: augustus.kling commentedIt should not matter if the
sld:
is in front of the elements as it points to the same namespace that is also the default namespace. See http://www.w3.org/TR/xml-names/#defaulting for details.That being said both documents can be considered equal, thus both should work. Check your GeoServer log file for details.
Comment #17
Anonymous (not verified) CreditAttribution: Anonymous commented