View Full Version : PointPlacemark picking location
nlneilson
03-16-2011, 03:42 PM
When picking on a PointPlacemark only the top-right corner works correctly.
When picking on the center or anywhere else, except the top-right, then the
move to action is involved which is irritating.
I have tried this on two computers each with Win XP and Linux (Ubuntu 10.10).
Is there any way to change this without changing the core SDK code?
Neil
heidtmare
03-16-2011, 04:06 PM
i can not duplicate your issue.
i can pick anywhere on my placemark.
r u clicking in a transparent section of an icon?
nlneilson
03-16-2011, 06:02 PM
I am picking on the PointPlacemark, there is no transparency.
This is using the default image for the point
attrs1.setUsePointAsDefaultImage(true)
On Win this is a filled circle ~5 to 8 pixels wide
On Linux it is square
Picking off the point to top-right almost the distance of the width of the point will "pick" the point. I am using the default cursor in Win and Linux.
mike.emery
03-16-2011, 06:33 PM
I'm seeing this to some extent as well. I have trouble reproducing consistently, but I am getting the occasional pick nearby but outside the rendered point and sometimes the point is not picked when the mouse is clearly within the point. I hadn't really noticed it until I saw this post- I thought I was just missing with the mouse :rolleyes:
nlneilson
03-16-2011, 07:28 PM
I have the PointPlacemark at a junction of a polyline where one leg is usually parallel to
the terrain and the other leg is always vertical to the terrain.
http://www.nlneilson.com/wwposts/VertLines.jpg
This problem is most notable when looking straight down.
When the pitch is changed it still has problems to "pick" but less of a problem with
moving the image as when picking on the terrain, it looks like the pick event is being consumed but the pick action is not doing what it should.
I noticed it was the same way when using roll over.
michaelmahoney
03-17-2011, 01:09 AM
I am seeing the same type of problem with the TerrainProfiler.
There is my thread:
http://forum.worldwindcentral.com/showthread.php?t=29985
Once you tilt the view the problem goes away.
nlneilson
03-17-2011, 05:59 AM
As Patmurris suggested in the BasicSceneController comment out the last render pass (post #6):
http://forum.worldwindcentral.com/showthread.php?t=24016&highlight=picking
The polylines and PointPlacemarks are visible like rollover/hover.
A PointPlacemark shows as a square.
Whenever the cursor point is left or below the center of the PointPlacemark it disapears
and is no longer "pickable".
edit: To make the polyline easier to pick it looks like the width was made 8.
For the PointPlacemark it appears it was made bigger for picking purposes but only in
the positive direction. Extending that from the center in the negative direction also
may correct the problem.
nlneilson
03-19-2011, 03:39 AM
For the PointPlacemark it appears it was made bigger for picking purposes but only in
the positive direction. Extending that from the center in the negative direction also
may correct the problem.
Where in the core SDK code could this be changed?
edit: Looking at the code in render/PointPlacemark.java there may be two things involved:
setting the size bigger, w and h, and changing the where it is placed similar to line #1216
protected void computeImageOffset(DrawContext dc)
From what appears when in the picking mode the PointPlacemark the size for actual picking is not increased but the lower left corner has been moved to the center.
Neil
These problems have been fixed in the April 5, 2011 release. There were two problems, both exclusive to PointPlacemark when a point rather than an image was drawn:
1) The item was selected only when the cursor is over the upper right quadrant.
2) Only the rear-most visible placemark was selectable.
There was also a third bug, now fixed: PointPlacemark lines were not pickable.
Thanks for reporting the problems.
nlneilson
04-05-2011, 06:36 AM
Thanks for fixing the problem.
As a hack just to get it working I did this:
/render/PointPlacemark.java lines 1210 and 1211 replace "+ dx and + dy" with "- 5"
double x = this.screenPoint.x - 5; //+ this.dx;
double y = this.screenPoint.y - 5; //+ this.dy;
It will be interesting to see how it was done in the SDK.
Neil
nlneilson
04-05-2011, 09:02 PM
PointPlacemark picking of the default point image works good with 0.6.784
double x = this.screenPoint.x + (this.isDrawPoint(dc) ? -0.5 * s : this.dx);
double y = this.screenPoint.y + (this.isDrawPoint(dc) ? -0.5 * s : this.dy);
vBulletin® v3.7.1, Copyright ©2000-2013, Jelsoft Enterprises Ltd.