[Geoserver-devel] Previewing style legend on the style page

Hi,
I’m looking into a request to add a legend preview in the style dialog, so that
one can see how the legend would look like while editing the style.

This would be similar, if you want, to the legend preview we have in the layers
dialog, although it would not be possible to reuse the same code, as the legend
is not yet saved here (the code in the layer page really calls a normal GetLegendGraphics instead)

Interaction wise, it would be a preview button like the validate one I guess.
Actually… another option would be to show the preview as a side effect of the user
pressing the validation button.

Opinions?

Cheers
Andrea

==
Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


On Wed, Mar 19, 2014 at 10:10 AM, Andrea Aime
<andrea.aime@anonymised.com>wrote:

Hi,
I'm looking into a request to add a legend preview in the style dialog, so
that
one can see how the legend would look like while editing the style.

This would be similar, if you want, to the legend preview we have in the
layers
dialog, although it would not be possible to reuse the same code, as the
legend
is not yet saved here (the code in the layer page really calls a normal
GetLegendGraphics instead)

Interaction wise, it would be a preview button like the validate one I
guess.
Actually... another option would be to show the preview as a side effect
of the user
pressing the validation button.

Opinions?

My preference would be something explicit, do a dedicated button. $0.02

Cheers
Andrea

--

Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

--
*Justin Deoliveira*
Vice President, Engineering | Boundless
jdeolive@anonymised.com
@j_deolive <https://twitter.com/j_deolive&gt;

Hi

Sounds great to get a preview! I vote for integrated with validate button.

How will the functionality support filter expressions? The style may differ a lot between scale levels, and it would be really nice if its possible to see the different stylings in preview.

Regards

Anders Erlandsson

···

---------- Vidarebefordrat meddelande ----------
Från: Andrea Aime <andrea.aime@anonymised.com>
Datum: onsdagen den 19:e mars 2014
Ämne: [Geoserver-devel] Previewing style legend on the style page
Till: Geoserver-devel <geoserver-devel@lists.sourceforge.net>

Hi,

I’m looking into a request to add a legend preview in the style dialog, so that

one can see how the legend would look like while editing the style.

This would be similar, if you want, to the legend preview we have in the layers

dialog, although it would not be possible to reuse the same code, as the legend

is not yet saved here (the code in the layer page really calls a normal GetLegendGraphics instead)

Interaction wise, it would be a preview button like the validate one I guess.

Actually… another option would be to show the preview as a side effect of the user

pressing the validation button.

Opinions?

Cheers

Andrea

==

Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK

for more information.

==

Ing. Andrea Aime

@geowolf

Technical Lead

GeoSolutions S.A.S.

Via Poggio alle Viti 1187

55054 Massarosa (LU)

Italy

phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

http://www.geo-solutions.it

http://twitter.com/geosolutions_it


Hi,
Would it be possible to make this as a POST to GetLegendGraphic with payload (SLD_BODY) as the document being edited?
Similar to WMS GetMap. A legend for WMS GetMap POST.
Perhaps this is already supported?

In this case it would be possible for outside usage.
I could issue a GET but for gigantic SLD:s it would hit the browser URL length bounds.

Regards,
Olle Markljung

···

On Wed, Mar 19, 2014 at 5:38 PM, Justin Deoliveira <jdeolive@anonymised.com> wrote:


Learn Graph Databases - Download FREE O’Reilly Book
“Graph Databases” is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech


Geoserver-devel mailing list
Geoserver-devel@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

On Wed, Mar 19, 2014 at 10:10 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

Hi,
I’m looking into a request to add a legend preview in the style dialog, so that
one can see how the legend would look like while editing the style.

This would be similar, if you want, to the legend preview we have in the layers
dialog, although it would not be possible to reuse the same code, as the legend
is not yet saved here (the code in the layer page really calls a normal GetLegendGraphics instead)

Interaction wise, it would be a preview button like the validate one I guess.
Actually… another option would be to show the preview as a side effect of the user
pressing the validation button.

Opinions?

My preference would be something explicit, do a dedicated button. $0.02

Cheers
Andrea

==
Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it



Learn Graph Databases - Download FREE O’Reilly Book
“Graph Databases” is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech


Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Justin Deoliveira
Vice President, Engineering | Boundless
jdeolive@anonymised.com
@j_deolive

On Wed, Mar 26, 2014 at 8:23 AM, Erlandsson Anders <
anders.erlandsson@anonymised.com> wrote:

Hi

Sounds great to get a preview! I vote for integrated with validate button.

How will the functionality support filter expressions? The style may
differ a lot between scale levels, and it would be really nice if its
possible to see the different stylings in preview.

It will not, the funding is limited to replicating what the layer page
already does.
If you are interested in that extra functionality no-one will stop you from
coding it and make a pull request though :slight_smile:

Cheers
Andrea

--

Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

On Wed, Mar 19, 2014 at 5:38 PM, Justin Deoliveira <
jdeolive@anonymised.com> wrote:

Interaction wise, it would be a preview button like the validate one I

guess.
Actually... another option would be to show the preview as a side effect
of the user
pressing the validation button.

Opinions?

My preference would be something explicit, do a dedicated button. $0.02

All right, how does this look?

!image.png|363x244

And with the usual topp:states style:

!image.png|376x623

Cheers
Andrea

--

Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

Looks pretty nice to me.

(attachments)

image.png
image.png

···

On Mon, May 19, 2014 at 6:34 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

Justin Deoliveira
Vice President, Engineering | Boundless
jdeolive@anonymised.com
@j_deolive

On Wed, Mar 19, 2014 at 5:38 PM, Justin Deoliveira <jdeolive@anonymised.com> wrote:

All right, how does this look?

Inline image 1

And with the usual topp:states style:

Inline image 2

Cheers

Andrea

==
Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


Interaction wise, it would be a preview button like the validate one I guess.

Actually… another option would be to show the preview as a side effect of the user
pressing the validation button.

Opinions?

My preference would be something explicit, do a dedicated button. $0.02

Would the “Preview Legend” click event require processing through the validation code? What happens if I miss a closing element, or just the angle bracket and click the preview?

Chris Snider

Senior Software Engineer

Intelligent Software Solutions, Inc.

Description: Description: Description: cid:image001.png@...3926...

(attachments)

image001.png
image.png
image005.png

···

Looks pretty nice to me.

On Mon, May 19, 2014 at 6:34 AM, Andrea Aime <andrea.aime@…1268…> wrote:

On Wed, Mar 19, 2014 at 5:38 PM, Justin Deoliveira <jdeolive@…3839…> wrote:

Interaction wise, it would be a preview button like the validate one I guess.

Actually… another option would be to show the preview as a side effect of the user

pressing the validation button.

Opinions?

My preference would be something explicit, do a dedicated button. $0.02

All right, how does this look?

Inline image 1

And with the usual topp:states style:

Inline image 2

Cheers

Andrea

==

Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK

for more information.

==

Ing. Andrea Aime

@geowolf

Technical Lead

GeoSolutions S.A.S.

Via Poggio alle Viti 1187

55054 Massarosa (LU)

Italy

phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

http://www.geo-solutions.it

http://twitter.com/geosolutions_it


Justin Deoliveira
Vice President, Engineering | Boundless
jdeolive@…3839…
@j_deolive

On Tue, May 20, 2014 at 3:28 PM, Chris Snider <chris.snider@anonymised.com>wrote:

Would the “Preview Legend” click event require processing through the
validation code? What happens if I miss a closing element, or just the
angle bracket and click the preview?

No, the validation does xml schema validation, the preview does a parse of
the sld and the parser itself is lenient.
But not so lenient as handling unclosed elements, you'd get a broken image
in that case

Cheers
Andrea

--

Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

Hi Andrea,
This looks good.

One thought - at least for me on 19201080 and 12801024 monitors, the style editor already takes up the entire height. Therefore the style will appear slightly lower and require scrolling down on the page; not a big thing for one-offs but for hundreds of layers as part of a workflow it gets quite annoying (having done this sort of thing before).

Possible solution - maybe use a HTML anchor set to the “Name” box that is scrolled to (either on page load, or when this preview button is pressed). The page will scroll down about 4cm, all pertinent info for styling will still be on screen, and it will show most legends fine too.

This transmission is intended for the named addressee(s) only and may contain confidential, sensitive or personal information and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

(attachments)

image.png
image.png

···

Cheers,
Jonathan

On 19 May 2014 13:34, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Wed, Mar 19, 2014 at 5:38 PM, Justin Deoliveira <jdeolive@anonymised.com> wrote:

All right, how does this look?

Inline image 1

And with the usual topp:states style:

Inline image 2

Cheers
Andrea

==
Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


Interaction wise, it would be a preview button like the validate one I guess.

Actually… another option would be to show the preview as a side effect of the user
pressing the validation button.

Opinions?

My preference would be something explicit, do a dedicated button. $0.02

On Wed, May 21, 2014 at 11:41 AM, Jonathan Moules <
jonathanmoules@anonymised.com> wrote:

Hi Andrea,
This looks good.

One thought - at least for me on 1920*1080 and 1280*1024 monitors, the
style editor already takes up the entire height. Therefore the style will
appear slightly lower and require scrolling down on the page; not a big
thing for one-offs but for hundreds of layers as part of a workflow it gets
quite annoying (having done this sort of thing before).

Possible solution - maybe use a HTML anchor set to the "Name" box that is
scrolled to (either on page load, or when this preview button is pressed).
The page will scroll down about 4cm, all pertinent info for styling will
still be on screen, and it will show most legends fine too.

This behavior would be somewhat unique to this page... I see there is a lot
of white space at the top, maybe the workspace editor could
be put on the left of the style name instead?
Devs, opinions?

Cheers
Andrea

--

Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------