jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • GeoServer
  • GEOS-994

Better labels on lines in KML

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.5.0-RC3
  • Fix Version/s: 1.5.2, 1.6.0-beta1
  • Component/s: Google Earth KML Output
  • Labels:
    None

Description

This needs investigation, as I'm not sure how wide the options are in google earth. But right now we take the centroid of the line, put a point there that has the label, even if it's not actually on the line. And we put a big old placemark icon there, which looks like crap - when you're zoomed out you just see a ton of points, no lines.

I believe we should be able to just put a label on the line. The place where it may break down is being able to click on the placemark and get all the attribute details. If we just put a label on the line we might not be able to do that - as that's definitely the case in polygons. So if people want attributes enabled perhaps we could find a better algorithm for the placement of the attribute point, and also something that makes the default not such a big point.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Chris Holmes added a comment - 09/Apr/07 9:52 PM

This may not be a nice easy fix, like just properly putting a linestrong label, see: http://bbs.keyhole.com/ubb/showflat.php?Number=63620&page=0

But we should at least try to maybe find the center point of a line and put the label there...

Show
Chris Holmes added a comment - 09/Apr/07 9:52 PM This may not be a nice easy fix, like just properly putting a linestrong label, see: http://bbs.keyhole.com/ubb/showflat.php?Number=63620&page=0 But we should at least try to maybe find the center point of a line and put the label there...
Hide
Permalink
Justin Deoliveira added a comment - 19/Jun/07 12:36 AM

fixed on trunk and 1.5.x. Not much we can do about label placement, as the thread indicates there is no real way besides returning an overlay to do it. However i made the icon the smallest placemark icon available, and also made sure that the point returned is the midpoint of the line segment and not just the centroid. This in conjunction with turning off the default fid label is the best we can do for now.

Show
Justin Deoliveira added a comment - 19/Jun/07 12:36 AM fixed on trunk and 1.5.x. Not much we can do about label placement, as the thread indicates there is no real way besides returning an overlay to do it. However i made the icon the smallest placemark icon available, and also made sure that the point returned is the midpoint of the line segment and not just the centroid. This in conjunction with turning off the default fid label is the best we can do for now.
Hide
Permalink
Oliver Slay added a comment - 03/Nov/10 9:59 AM

I had the same problem with my KML output - but instead of outputting LineStrings .. I outputted one MultiGeometry for each line.

The user can enter how often they want Labels added

I then calculated from one Line point to the next, the distance. If the distance is greater than the User's Label distance, I added a Point midway along the string... then worked out the difference from that point to the next point .. and so on .. adding points along the line ...

Now in Google Earth the line has clickable points along the line...

<MultiGeometry>
<LineString>
<coordinates>-2.35816858443578,53.2960351928275,0 -2.35767695935002,53.2958769090056,0 -2.35735754021865,53.2957387213517,0 -2.35696888130087,53.2955492049005,0 -2.35650195408699,53.2952568506953,0 -2.35608655555568,53.2949540338942,0 -2.35568866526586,53.2946872383551,0 -2.35533400010231,53.2944460804399,0 -2.35470239111831,53.2939996052485,0 -2.3541140990623,53.2935890731528,0 -2.35365551483188,53.2932606099197,0 -2.35339599411101,53.2930810068657,0</coordinates>
</LineString>
<Point>
<coordinates>-2.35816858443578,53.2960351928275,0</coordinates>
</Point>
<Point>
<coordinates>-2.35594146682538,53.2948567487289,0</coordinates>
</Point>
<Point>
<coordinates>-2.35398278533922,53.2934950197063,0</coordinates>
</Point>
<Point>
<coordinates>-2.35339599411101,53.2930810068657,0</coordinates>
</Point>
</MultiGeometry>

Show
Oliver Slay added a comment - 03/Nov/10 9:59 AM I had the same problem with my KML output - but instead of outputting LineStrings .. I outputted one MultiGeometry for each line. The user can enter how often they want Labels added I then calculated from one Line point to the next, the distance. If the distance is greater than the User's Label distance, I added a Point midway along the string... then worked out the difference from that point to the next point .. and so on .. adding points along the line ... Now in Google Earth the line has clickable points along the line... <MultiGeometry> <LineString> <coordinates>-2.35816858443578,53.2960351928275,0 -2.35767695935002,53.2958769090056,0 -2.35735754021865,53.2957387213517,0 -2.35696888130087,53.2955492049005,0 -2.35650195408699,53.2952568506953,0 -2.35608655555568,53.2949540338942,0 -2.35568866526586,53.2946872383551,0 -2.35533400010231,53.2944460804399,0 -2.35470239111831,53.2939996052485,0 -2.3541140990623,53.2935890731528,0 -2.35365551483188,53.2932606099197,0 -2.35339599411101,53.2930810068657,0</coordinates> </LineString> <Point> <coordinates>-2.35816858443578,53.2960351928275,0</coordinates> </Point> <Point> <coordinates>-2.35594146682538,53.2948567487289,0</coordinates> </Point> <Point> <coordinates>-2.35398278533922,53.2934950197063,0</coordinates> </Point> <Point> <coordinates>-2.35339599411101,53.2930810068657,0</coordinates> </Point> </MultiGeometry>

People

  • Assignee:
    Justin Deoliveira
    Reporter:
    Chris Holmes
Vote (0)
Watch (0)

Dates

  • Created:
    26/Mar/07 8:49 PM
    Updated:
    03/Nov/10 9:59 AM
    Resolved:
    19/Jun/07 12:36 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.