![]() |
|
|||||||
| Development Help Help for building applications or diagnosing problems with WWJ |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member Extraordinaire
Join Date: Jan 2009
Location: Arlington, VA
Posts: 82
![]() |
Anyone know if dotted lines are supported, or do i need to extend the polyline class and create my own?
|
|
|
|
|
|
#2 |
|
WWJ Consultant
Join Date: Jun 2005
Location: Saint-Paul de Vence, Alpes Maritimes, France
Posts: 3,412
![]() |
Polyline and SurfacePolyline do support stippling. See setStippleFactor() and setStipplePattern().
|
|
|
|
|
|
#3 |
|
Junior Member Extraordinaire
Join Date: Jan 2009
Location: Arlington, VA
Posts: 82
![]() |
So that works, but when i zoom in closer to the line the stippling stops and the line becomes solid... am i doing something wrong?
RenderableLayer tracksLayer = new RenderableLayer(); gisEditor.insertBeforePlacenames(tracksL ayer); Polyline p = new Polyline(); p.setStippleFactor(3); p.setStipplePattern((short)0xAAAA); gov.nasa.worldwind.geom.Angle a = gov.nasa.worldwind.geom.Angle.fromDegree s(0); gov.nasa.worldwind.geom.Angle b = gov.nasa.worldwind.geom.Angle.fromDegree s(5); List<LatLon> ll = new ArrayList<LatLon>(); ll.add(new LatLon(a,a)); ll.add(new LatLon(b,b)); p.setPositions(ll, 1000); tracksLayer.addRenderable(p); |
|
|
|
|
|
#4 |
|
Junior Member Extraordinaire
Join Date: Jan 2009
Location: Arlington, VA
Posts: 82
![]() |
And the performance is really bad... when i add the stippled polyline zooming and moving around are slowed significantly.
= |
|
|
|
|
|
#5 |
|
WWJ Consultant
Join Date: Jun 2005
Location: Saint-Paul de Vence, Alpes Maritimes, France
Posts: 3,412
![]() |
I tried you code in the context of an ApplicationTemplate subclass and it works as expected. The stippling patterns stays the same at all zoom levels. When getting very close to the line it ends up being clipped by the near plane, but that's expected too.
Try to test this code in a simple app first to see whether it works properly before integrating it to your project. |
|
|
|
|
|
#6 |
|
Junior Member Extraordinaire
Join Date: Jan 2009
Location: Arlington, VA
Posts: 82
![]() |
I'm sorry, i made a stupid mistake.... that was inside of a method being called repetitively so it was creating a new layer every time. This explains why the performance was so bad and the line didn't look dotted anymore. I feel stupid now
![]() |
|
|
|
|
|
#7 |
|
Junior Member Extraordinaire
Join Date: Jan 2009
Location: Arlington, VA
Posts: 82
![]() |
So I am still having some issues though.... My polyline has way to many points for the stipple to work correctly. B/c i want to line to have smooth curves i have a lot of points and it is trying to stipple between the points, which isnt very much room.
Any other ideas? |
|
|
|
|
|
#8 |
|
WWJ Consultant
Join Date: Jun 2005
Location: Saint-Paul de Vence, Alpes Maritimes, France
Posts: 3,412
![]() |
Can you post a screenshot?
|
|
|
|
![]() |
| Tags |
| dotted, hashed, polylines |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| drawing a million polylines | laoballer | Development Help | 15 | 11-24-2009 01:54 PM |
| How to make polylines and points drawn on top of BlueMarble layers... | swingkid | Development Help | 3 | 09-06-2008 06:24 PM |
| Broken Polylines | maltaweel | Development Help | 4 | 06-07-2008 04:38 AM |
| Polylines are too slow... | adrianboimvaser | Development Help | 9 | 12-18-2007 02:54 PM |
| Antialiased polylines | maemigh | Development Help | 4 | 08-22-2007 02:25 PM |