Hi,
I have a question, I use SketchViewModel to draw the shape on map, I want to keep the shape located in center (not moving) when the map is moving by pan or drag; how can I implement it?
Thanks in advance.
Get the extent of the map.Pick a corner of the map and store it in a variable (startingPoint).Listen for the map to move. When it does, get the new extent.Check the change from startingPoint to the new extent. (Ex. +3 degrees lat, -2 long)Get the geometry of the shape you drew.Loop through each point on the shape and adjust the coordinates by the same amount the startingPoint shifted.
Thanks! Good solution.
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.