Select to view content in your preferred language

How to get correct mapPoint from mouse events in Stereo Map

1114
4
03-16-2018 10:42 AM
DominicStubbins
Esri Contributor

I'm having trouble using the SDK to return correct mapPoints from a mouse event when using the stereo view.

There are 2 issues

1)There is no Z value being returned, although the cursor has a height in this view

2) The X and Y being returned appear incorrect, in my sample data they are a few hundred meters out (this may be related to lack of z values)

The simplest way to demonstrate this is to use the community sample arcgis-pro-sdk-community-samples/Map-Exploration/MapToolWithOverlayControl at master · Esri/arcgis-p... 

this works with maps and scenes but show the same error I'm seeing in my code, when used with a StereoMap.

Is there an additional approach needed when working with events in the stereo map or is it a bug in ClientToMap when used in a stereo map.

thx

Dom

Tags (2)
0 Kudos
4 Replies
by Anonymous User
Not applicable

Try using ScreenToMap instead.

Alternatively I find it easier to use a point sketch tool for most of these things and get the returned geometry as a mappoint (with x,y,z coords).

0 Kudos
DominicStubbins
Esri Contributor

Thanks for the suggestions, sadly screentomap suffers the same fate. Although a sketch would work in the sample code it doesn’t work for the actual use case as we need to track the mouse move rather than clicks or sketch completion.  The sketch geometry is only correctly returned on completion.

UPDATE*** looking at this a little more it seems related to the fact that the stereo map is not oriented as a map but is oriented to provide left right images for stereo, essentialy it is rotated, but the ToMapPoint doesn't reflect this, clearly the info is in there somewhere as sketch tools work on completion.

Dom

0 Kudos
by Anonymous User
Not applicable

Hi Dominic,

We looked into it further and this a bug with ClientToMap in the stereo view. This will be addressed in Pro 2.2.

0 Kudos
DominicStubbins
Esri Contributor

Sean,

Thats great, thanks for looking into it and for the upcoming fix.

0 Kudos