I am trying to draw a polyLine to the center of the screen (as the second path, point B) ... I tried referencing the below to get center: any pointers?
coordinatesBx = map.extent.getCenter().getLatitude(); coordinatesBy = map.extent.getCenter().getLongitude();
The above errors with cannot getCenter()
of undefined... should I try to get this in screenPoints
first, then try to convert to lat long?
I am good with my first two start points as lat long coords, i.e. workingStartA
and workingStartB
; however I cannot get the second coordinatesBx
and coordinatesBy
to go to center of screen. I am in arcgis-JS 4.11 specifically.
i.e.
var polyline = { type: "polyline", paths: [ [workingStartA, workingStartB], [coordinatesBx, coordinatesBy] ] };