I have been having issues with the tools that I created for my javascript application, such as zoom in, measure, etc. I narrowed it down to the code that converts the screen point to x,y map point. This works in the 4.10 version, but not in the 4.11 version. The strange thing is that I have been using the 4.11 version since April 9 and this just broke 2 days ago. Switching back to 4.10 works fine.
So for instance drawing the box polygon, I did a console.log for the variable values at the mouse points. The POINT = is the screen x,y and the second line is the x,y of the 2 envelope points (NW and SE).
4.11 version:
POINT = 954,313
NaN,0,NaN,0
POINT = 958,317
NaN,0,NaN,0
...
In 4.10 I get these values:
POINT = 976,312
746618.9368489848,850462.2705078744,746727.4440104435,850353.7633464157
POINT = 989,326
746618.9368489848,850462.2705078744,748138.0371094076,848834.6630859929
...
The code that converts screen point to map point is pretty straightforward:
if(event.action=="update") {
var sPoint = {
x: event.x,
y: event.y
}
ptUpdate=view.toMap(sPoint.x, sPoint.y);
console.log("POINT = " + sPoint.x + "," + sPoint.y);
//where view is the mapView and ptUpdate is the point to be calculated to map coordinates and passed to the boxpolygon function.
I haven't seen any notices that this toMap function has changed. If there is something I am missing with the 4.11 upgrade and the ability to convert screen coordinates to map coordinates I haven't been able to find it.
Thanks in advance for any assistance or guidance provided.