[Geoserver-users] Please give some suggestions

Hi everyone,

I want to raalize a function, that is, every point in the map has some information, so I want to show the information beside it's point in multiline. But the TextSymbolizer cann't seem to support enough words and multiline.

Otherwise, the layers will be zoomed in or zoomed out together.

Are there any suggestions can realize the function easily?

Thanks a lot!

Youni.

_________________________________________________________________
Ãâ·ÑÏÂÔØ MSN Explorer: http://explorer.msn.com/lccn/

Do you mean you want to show several of the attributes for each point as
a textSymbolizer?
I haven't tried but you might be able to string several attributes together.
At a minimum you can display a couple of attributes by having a
textSymbolizer for each one, then set the vertical offset for each one
enough so that the labels do not overlap. You will have to make sure
there is no buffer around the labels so they all render.

Brent Owens
(The Open Planning Project)

ÓÆ ÄÝ wrote:

Hi everyone,

I want to raalize a function, that is, every point in the map has some
information, so I want to show the information beside it's point in
multiline. But the TextSymbolizer cann't seem to support enough words
and multiline.

Otherwise, the layers will be zoomed in or zoomed out together.

Are there any suggestions can realize the function easily?

Thanks a lot!

Youni.

_________________________________________________________________
Ãâ·ÑÏÂÔØ MSN Explorer: http://explorer.msn.com/lccn/

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

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
------------------------------------------------------------------------

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

Thank you!

This is a good idea. But there seem to be a small defect, that is, when the map is zoomed in or zoomed out, we hope that the vertical offset for the labels of one point is constant, don't we? Hehe, can the method be modified better?

Otherwise, I am trying to test another way. I try to encode one PNG file for each point's attributes with java, and save them into a temporary folder, then request getmap with UserLayer, and show the PNG images as pointSymbolizer. This way can resolve the above issue, but I think it will be very inefficient for many I/O operations.

Youni.

From: Brent Owens <brentowens@anonymised.com>
To: ÓÆ ÄÝ <youni_9@anonymised.com>
CC: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Please give some suggestions
Date: Wed, 10 Jan 2007 22:27:01 -0800

Do you mean you want to show several of the attributes for each point as
a textSymbolizer?
I haven't tried but you might be able to string several attributes

together.

At a minimum you can display a couple of attributes by having a
textSymbolizer for each one, then set the vertical offset for each one
enough so that the labels do not overlap. You will have to make sure
there is no buffer around the labels so they all render.

Brent Owens
(The Open Planning Project)

ÓÆ ÄÝ wrote:
> Hi everyone,
>
> I want to raalize a function, that is, every point in the map has some
> information, so I want to show the information beside it's point in
> multiline. But the TextSymbolizer cann't seem to support enough words
> and multiline.
>
> Otherwise, the layers will be zoomed in or zoomed out together.
>
> Are there any suggestions can realize the function easily?
>
> Thanks a lot!
>
> Youni.
>
> _________________________________________________________________
> Ãâ·ÑÏÂÔØ MSN Explorer: http://explorer.msn.com/lccn/
>
>

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

>
>

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

> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share

your

> opinions on IT & business topics through brief surveys - and earn cash
>

http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

>

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

>
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>

_________________________________________________________________
ÓëÁª»úµÄÅóÓѽøÐн»Á÷£¬ÇëʹÓà MSN Messenger: http://messenger.msn.com/cn

Well the offset in the text symbolizer is based on pixels, so the labels
will always be the same distance apart no matter how zoomed you are. If
it is acting differently then there is a problem.
As for that I'm not sure there are any other good ways, but I can see it
being important to be able to list several values at once.

One other thing you can do, is that when the user hovers the mouse over
the point, a WFS getFeatureRequest is made and all of the returned
attribute information is returned and displayed in a list. Then when the
user moves the mouse away the list disappears. It wouldn't be hard to do
with a little javascript and GeoServer comes with a demo that does this.

hope that helps,

Brent Owens
(The Open Planning Project)

ÓÆ ÄÝ wrote:

Thank you!
This is a good idea. But there seem to be a small defect, that is,
when the map is zoomed in or zoomed out, we hope that the vertical
offset for the labels of one point is constant, don't we? Hehe, can
the method be modified better?

Otherwise, I am trying to test another way. I try to encode one PNG
file for each point's attributes with java, and save them into a
temporary folder, then request getmap with UserLayer, and show the PNG
images as pointSymbolizer. This way can resolve the above issue, but I
think it will be very inefficient for many I/O operations.

Youni.

From: Brent Owens <brentowens@anonymised.com>
To: ÓÆ ÄÝ <youni_9@anonymised.com>
CC: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Please give some suggestions
Date: Wed, 10 Jan 2007 22:27:01 -0800

Do you mean you want to show several of the attributes for each point as
a textSymbolizer?
I haven't tried but you might be able to string several attributes

together.

At a minimum you can display a couple of attributes by having a
textSymbolizer for each one, then set the vertical offset for each one
enough so that the labels do not overlap. You will have to make sure
there is no buffer around the labels so they all render.

Brent Owens
(The Open Planning Project)

ÓÆ ÄÝ wrote:
> Hi everyone,
>
> I want to raalize a function, that is, every point in the map has some
> information, so I want to show the information beside it's point in
> multiline. But the TextSymbolizer cann't seem to support enough words
> and multiline.
>
> Otherwise, the layers will be zoomed in or zoomed out together.
>
> Are there any suggestions can realize the function easily?
>
> Thanks a lot!
>
> Youni.
>
> _________________________________________________________________
> Ãâ·ÑÏÂÔØ MSN Explorer: http://explorer.msn.com/lccn/
>
>

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

>
>

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

> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to
share

your

> opinions on IT & business topics through brief surveys - and earn cash
>

http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

>

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

>
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>

_________________________________________________________________
ÓëÁª»úµÄÅóÓѽøÐн»Á÷£¬ÇëʹÓà MSN Messenger: http://messenger.msn.com/cn

Hi Antonello,

The demo comes with GeoServer under the Demo page. It is the very top
demo called WMS Example
(http://localhost:8080/geoserver/popup_map/index.html)
Just hover over the points and an image will pop up. If you click on the
point the full image will be displayed.
It uses some Ajax techniques to send and parse WFS requests. The source
can be found under [geoserver_home]\webapps\geoserver\popup_map
You will need the binary or windows versions og GeoServer to get the demo.

cheers,

Brent Owens
(The Open Planning Project)

Antonello wrote:

Hi Brent, I found that you said very very interesting: I have just tu do
something like this:

<cite>

One other thing you can do, is that when the user hovers the mouse over
the point, a WFS getFeatureRequest is made and all of the returned
attribute information is returned and displayed in a list. Then when the
user moves the mouse away the list disappears. It wouldn't be hard to do
with a little javascript and GeoServer comes with a demo that does this.

</cite>

Please Brent could you tell me where I can find this demo?

Really thank very much. Regards Antonello

Brent Owens wrote:
  

Well the offset in the text symbolizer is based on pixels, so the labels
will always be the same distance apart no matter how zoomed you are. If
it is acting differently then there is a problem.
As for that I'm not sure there are any other good ways, but I can see it
being important to be able to list several values at once.

One other thing you can do, is that when the user hovers the mouse over
the point, a WFS getFeatureRequest is made and all of the returned
attribute information is returned and displayed in a list. Then when the
user moves the mouse away the list disappears. It wouldn't be hard to do
with a little javascript and GeoServer comes with a demo that does this.

hope that helps,

Brent Owens
(The Open Planning Project)

ÓÆ ÄÝ wrote:
  

Thank you!
This is a good idea. But there seem to be a small defect, that is,
when the map is zoomed in or zoomed out, we hope that the vertical
offset for the labels of one point is constant, don't we? Hehe, can
the method be modified better?

Otherwise, I am trying to test another way. I try to encode one PNG
file for each point's attributes with java, and save them into a
temporary folder, then request getmap with UserLayer, and show the PNG
images as pointSymbolizer. This way can resolve the above issue, but I
think it will be very inefficient for many I/O operations.

Youni.

From: Brent Owens <brentowens@anonymised.com>
To: ÓÆ ÄÝ <youni_9@anonymised.com>
CC: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Please give some suggestions
Date: Wed, 10 Jan 2007 22:27:01 -0800

Do you mean you want to show several of the attributes for each point as
a textSymbolizer?
I haven't tried but you might be able to string several attributes
      

together.
    

At a minimum you can display a couple of attributes by having a
textSymbolizer for each one, then set the vertical offset for each one
enough so that the labels do not overlap. You will have to make sure
there is no buffer around the labels so they all render.

Brent Owens
(The Open Planning Project)

ÓÆ ÄÝ wrote:
      

Hi everyone,

I want to raalize a function, that is, every point in the map has some
information, so I want to show the information beside it's point in
multiline. But the TextSymbolizer cann't seem to support enough words
and multiline.

Otherwise, the layers will be zoomed in or zoomed out together.

Are there any suggestions can realize the function easily?

Thanks a lot!

Youni.

_________________________________________________________________
Ãâ·ÑÏÂÔØ MSN Explorer: http://explorer.msn.com/lccn/

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

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

Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to
        

share
      

your
    

opinions on IT & business topics through brief surveys - and earn cash

http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
    
------------------------------------------------------------------------
    

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

_________________________________________________________________
ÓëÁª»úµÄÅóÓѽøÐн»Á÷£¬ÇëʹÓà MSN Messenger: http://messenger.msn.com/cn

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

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
------------------------------------------------------------------------

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

Thank you for your help, it's very useful! I will apply it to my project. :slight_smile:

In addition, It will be more excellent if Geotools supports some functions in "<Label>", such as:
      <TextSymbolizer>
        <Label>
          <ogc:PropertyName>subString(GroupName,0,indexOf(GroupName,';'))</ogc:PropertyName>

        </Label>
(That's mean, the label's content is a substring of the property named GroupName, the substring begins at the first character and extends to the first character ';')
Or some other ways can achieve the above function.

That is only my expectation, I am greedy, hehe.:stuck_out_tongue:

Thank you again.
Youni

From: Brent Owens <brentowens@anonymised.com>
To: ÓÆ ÄÝ <youni_9@anonymised.com>
CC: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Please give some suggestions
Date: Thu, 11 Jan 2007 07:41:23 -0800

Well the offset in the text symbolizer is based on pixels, so the labels
will always be the same distance apart no matter how zoomed you are. If
it is acting differently then there is a problem.
As for that I'm not sure there are any other good ways, but I can see it
being important to be able to list several values at once.

One other thing you can do, is that when the user hovers the mouse over
the point, a WFS getFeatureRequest is made and all of the returned
attribute information is returned and displayed in a list. Then when the
user moves the mouse away the list disappears. It wouldn't be hard to do
with a little javascript and GeoServer comes with a demo that does this.

hope that helps,

Brent Owens
(The Open Planning Project)

ÓÆ ÄÝ wrote:
> Thank you!
> This is a good idea. But there seem to be a small defect, that is,
> when the map is zoomed in or zoomed out, we hope that the vertical
> offset for the labels of one point is constant, don't we? Hehe, can
> the method be modified better?
>
> Otherwise, I am trying to test another way. I try to encode one PNG
> file for each point's attributes with java, and save them into a
> temporary folder, then request getmap with UserLayer, and show the PNG
> images as pointSymbolizer. This way can resolve the above issue, but I
> think it will be very inefficient for many I/O operations.
>
> Youni.
>
>> From: Brent Owens <brentowens@anonymised.com>
>> To: ÓÆ ÄÝ <youni_9@anonymised.com>
>> CC: geoserver-users@lists.sourceforge.net
>> Subject: Re: [Geoserver-users] Please give some suggestions
>> Date: Wed, 10 Jan 2007 22:27:01 -0800
>>
>> Do you mean you want to show several of the attributes for each point

as

>> a textSymbolizer?
>> I haven't tried but you might be able to string several attributes
> together.
>> At a minimum you can display a couple of attributes by having a
>> textSymbolizer for each one, then set the vertical offset for each one
>> enough so that the labels do not overlap. You will have to make sure
>> there is no buffer around the labels so they all render.
>>
>> Brent Owens
>> (The Open Planning Project)
>>
>> ÓÆ ÄÝ wrote:
>> > Hi everyone,
>> >
>> > I want to raalize a function, that is, every point in the map has

some

>> > information, so I want to show the information beside it's point in
>> > multiline. But the TextSymbolizer cann't seem to support enough

words

>> > and multiline.
>> >
>> > Otherwise, the layers will be zoomed in or zoomed out together.
>> >
>> > Are there any suggestions can realize the function easily?
>> >
>> > Thanks a lot!
>> >
>> > Youni.
>> >
>> > _________________________________________________________________
>> > Ãâ·ÑÏÂÔØ MSN Explorer: http://explorer.msn.com/lccn/
>> >
>

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

>> >
>

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

>> > Take Surveys. Earn Cash. Influence the Future of IT
>> > Join SourceForge.net's Techsay panel and you'll get the chance to
>> share
> your
>> > opinions on IT & business topics through brief surveys - and earn

cash

>> >
>

http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

>> >
>

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

>> >
>> > _______________________________________________
>> > Geoserver-users mailing list
>> > Geoserver-users@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/geoserver-users
>> >
>
> _________________________________________________________________
> ÓëÁª»úµÄÅóÓѽøÐн»Á÷£¬ÇëʹÓà MSN Messenger: http://messenger.msn.com/cn
>

_________________________________________________________________
ÓëÁª»úµÄÅóÓѽøÐн»Á÷£¬ÇëʹÓà MSN Messenger: http://messenger.msn.com/cn