{"action":"opened","issue":{"url":"https://api.github.com/repos/AppGeo/GPV/issues/87","labels_url":"https://api.github.com/repos/AppGeo/GPV/issues/87/labels{/name}","comments_url":"https://api.github.com/repos/AppGeo/GPV/issues/87/comments","events_url":"https://api.github.com/repos/AppGeo/GPV/issues/87/events","html_url":"https://github.com/AppGeo/GPV/issues/87","id":128173229,"number":87,"title":"Race condition can result in the wrong External Map","user":{"login":"seansweeney","id":5191004,"avatar_url":"https://avatars.githubusercontent.com/u/5191004?v=3","gravatar_id":"","url":"https://api.github.com/users/seansweeney","html_url":"https://github.com/seansweeney","followers_url":"https://api.github.com/users/seansweeney/followers","following_url":"https://api.github.com/users/seansweeney/following{/other_user}","gists_url":"https://api.github.com/users/seansweeney/gists{/gist_id}","starred_url":"https://api.github.com/users/seansweeney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seansweeney/subscriptions","organizations_url":"https://api.github.com/users/seansweeney/orgs","repos_url":"https://api.github.com/users/seansweeney/repos","events_url":"https://api.github.com/users/seansweeney/events{/privacy}","received_events_url":"https://api.github.com/users/seansweeney/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-22T15:00:40Z","updated_at":"2016-01-22T15:00:40Z","closed_at":null,"body":"There is a race condition in the code that manifests itself when you use the Export Map Extent dropdown to select an external map and immediately click the Go button.  If you don't wait a couple of seconds before clicking Go then you can end up going to the map that was previsouly selected in the dropdown.\r\n\r\nThis happens because [Go button](https://github.com/AppGeo/GPV/blob/6c0544b290de7c843954c0dc61b01fca08a0ad17/WebApp/Scripts/SharePanel.js#L48-L52) uses an external map link stored in it's HTML attributes rather than calculating the link on the fly.  If you click Go before the [attribute](https://github.com/AppGeo/GPV/blob/6c0544b290de7c843954c0dc61b01fca08a0ad17/WebApp/Scripts/SharePanel.js#L70) is [refreshed](https://github.com/AppGeo/GPV/blob/6c0544b290de7c843954c0dc61b01fca08a0ad17/WebApp/Scripts/SharePanel.js#L105-L130) then you'll go to the previously selected external map.\r\n\r\nYou can see the delay in the attached video.\r\n[gpv_export_map_extent.zip](https://github.com/AppGeo/GPV/files/100937/gpv_export_map_extent.zip)\r\n\r\n"}}