I have a situation where I need to process an array of points in a loop. Within the loop I need to get the projected coordinates of the point - so I can do some additional processing. However, the call to get the projected coordinates is an asynchronous call so the loop continues BEFORE I have my projected coordinates back from the server. Can someone explain how to make this work? Below is my code:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7, IE=9, IE=10">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">