{"action":"created","comment":{"url":"https://api.github.com/repos/Esri/esri-leaflet/pulls/comments/26586372","id":26586372,"diff_hunk":"@@ -90,6 +90,15 @@ EsriLeaflet.Layers.DynamicMapLayer = EsriLeaflet.Layers.RasterLayer.extend({\n     var ne = this._map.options.crs.project(bounds._northEast);\n     var sw = this._map.options.crs.project(bounds._southWest);\n \n+    //ensure that we don't ask ArcGIS Server for a taller image than we have actual map displaying\n+    var total = this._map.getSize();\n+    var top = this._map.latLngToLayerPoint(bounds._northEast);\n+    var bottom = this._map.latLngToLayerPoint(bounds._southWest);\n+\n+    if (top.y > 0 || bottom.y < total.y){\n+      size.y = total.y - top.y - (total.y - bottom.y);","path":"src/Layers/DynamicMapLayer.js","position":10,"original_position":10,"commit_id":"35d3e8ddd5a37cdcf2a299a19c07fc802ff37840","original_commit_id":"35d3e8ddd5a37cdcf2a299a19c07fc802ff37840","user":{"login":"jgravois","id":3011734,"avatar_url":"https://avatars.githubusercontent.com/u/3011734?v=3","gravatar_id":"","url":"https://api.github.com/users/jgravois","html_url":"https://github.com/jgravois","followers_url":"https://api.github.com/users/jgravois/followers","following_url":"https://api.github.com/users/jgravois/following{/other_user}","gists_url":"https://api.github.com/users/jgravois/gists{/gist_id}","starred_url":"https://api.github.com/users/jgravois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgravois/subscriptions","organizations_url":"https://api.github.com/users/jgravois/orgs","repos_url":"https://api.github.com/users/jgravois/repos","events_url":"https://api.github.com/users/jgravois/events{/privacy}","received_events_url":"https://api.github.com/users/jgravois/received_events","type":"User","site_admin":false},"body":"i'm still using `total` in the check above, but :+1: for simpler maths!","created_at":"2015-03-17T16:00:25Z","updated_at":"2015-03-17T16:00:25Z","html_url":"https://github.com/Esri/esri-leaflet/pull/484#discussion_r26586372","pull_request_url":"https://api.github.com/repos/Esri/esri-leaflet/pulls/484","_links":{"self":{"href":"https://api.github.com/repos/Esri/esri-leaflet/pulls/comments/26586372"},"html":{"href":"https://github.com/Esri/esri-leaflet/pull/484#discussion_r26586372"},"pull_request":{"href":"https://api.github.com/repos/Esri/esri-leaflet/pulls/484"}}},"pull_request":{"url":"https://api.github.com/repos/Esri/esri-leaflet/pulls/484","id":31344129,"html_url":"https://github.com/Esri/esri-leaflet/pull/484","diff_url":"https://github.com/Esri/esri-leaflet/pull/484.diff","patch_url":"https://github.com/Esri/esri-leaflet/pull/484.patch","issue_url":"https://api.github.com/repos/Esri/esri-leaflet/issues/484","number":484,"state":"open","locked":false,"title":"trim height of export requests when necessary","user":{"login":"jgravois","id":3011734,"avatar_url":"https://avatars.githubusercontent.com/u/3011734?v=3","gravatar_id":"","url":"https://api.github.com/users/jgravois","html_url":"https://github.com/jgravois","followers_url":"https://api.github.com/users/jgravois/followers","following_url":"https://api.github.com/users/jgravois/following{/other_user}","gists_url":"https://api.github.com/users/jgravois/gists{/gist_id}","starred_url":"https://api.github.com/users/jgravois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgravois/subscriptions","organizations_url":"https://api.github.com/users/jgravois/orgs","repos_url":"https://api.github.com/users/jgravois/repos","events_url":"https://api.github.com/users/jgravois/events{/privacy}","received_events_url":"https://api.github.com/users/jgravois/received_events","type":"User","site_admin":false},"body":"resolves #450\r\n\r\ni was able to correct the distortion seen in DynamicMapLayer overlays in scenarios where whitespace surrounds the map by introducing a quick check into `_buildExportParams` to compare the height of the div to the top and bottom y values of the actual map (in screen coordinates) and trimming if appropriate.\r\n\r\nconfirmed that display behavior is improved for web mercator basemaps, even when L.tileLayer noWrap is set to true\r\nconfirmed that display behavior is appropriate in leaflet-1.0 branch as well (with the exception of the fact that the area below 85deg south isn't cropped appropriately)\r\n\r\nhappy to include relevant tests prior to merge, just wanted to make sure everyone's happy with the methodology first.\r\ncc @nixta","created_at":"2015-03-17T15:12:50Z","updated_at":"2015-03-17T16:00:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e7fbe4f66800af52bf142be72c604eb5d95d885b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Esri/esri-leaflet/pulls/484/commits","review_comments_url":"https://api.github.com/repos/Esri/esri-leaflet/pulls/484/comments","review_comment_url":"https://api.github.com/repos/Esri/esri-leaflet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Esri/esri-leaflet/issues/484/comments","statuses_url":"https://api.github.com/repos/Esri/esri-leaflet/statuses/35d3e8ddd5a37cdcf2a299a19c07fc802ff37840","head":{"label":"jgravois:dyn-align","ref":"dyn-align","sha":"35d3e8ddd5a37cdcf2a299a19c07fc802ff37840","user":{"login":"jgravois","id":3011734,"avatar_url":"https://avatars.githubusercontent.com/u/3011734?v=3","gravatar_id":"","url":"https://api.github.com/users/jgravois","html_url":"https://github.com/jgravois","followers_url":"https://api.github.com/users/jgravois/followers","following_url":"https://api.github.com/users/jgravois/following{/other_user}","gists_url":"https://api.github.com/users/jgravois/gists{/gist_id}","starred_url":"https://api.github.com/users/jgravois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgravois/subscriptions","organizations_url":"https://api.github.com/users/jgravois/orgs","repos_url":"https://api.github.com/users/jgravois/repos","events_url":"https://api.github.com/users/jgravois/events{/privacy}","received_events_url":"https://api.github.com/users/jgravois/received_events","type":"User","site_admin":false},"repo":{"id":17520674,"name":"esri-leaflet","full_name":"jgravois/esri-leaflet","owner":{"login":"jgravois","id":3011734,"avatar_url":"https://avatars.githubusercontent.com/u/3011734?v=3","gravatar_id":"","url":"https://api.github.com/users/jgravois","html_url":"https://github.com/jgravois","followers_url":"https://api.github.com/users/jgravois/followers","following_url":"https://api.github.com/users/jgravois/following{/other_user}","gists_url":"https://api.github.com/users/jgravois/gists{/gist_id}","starred_url":"https://api.github.com/users/jgravois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgravois/subscriptions","organizations_url":"https://api.github.com/users/jgravois/orgs","repos_url":"https://api.github.com/users/jgravois/repos","events_url":"https://api.github.com/users/jgravois/events{/privacy}","received_events_url":"https://api.github.com/users/jgravois/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jgravois/esri-leaflet","description":"A lightweight set of tools for working with ArcGIS services with Leaflet.","fork":true,"url":"https://api.github.com/repos/jgravois/esri-leaflet","forks_url":"https://api.github.com/repos/jgravois/esri-leaflet/forks","keys_url":"https://api.github.com/repos/jgravois/esri-leaflet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jgravois/esri-leaflet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jgravois/esri-leaflet/teams","hooks_url":"https://api.github.com/repos/jgravois/esri-leaflet/hooks","issue_events_url":"https://api.github.com/repos/jgravois/esri-leaflet/issues/events{/number}","events_url":"https://api.github.com/repos/jgravois/esri-leaflet/events","assignees_url":"https://api.github.com/repos/jgravois/esri-leaflet/assignees{/user}","branches_url":"https://api.github.com/repos/jgravois/esri-leaflet/branches{/branch}","tags_url":"https://api.github.com/repos/jgravois/esri-leaflet/tags","blobs_url":"https://api.github.com/repos/jgravois/esri-leaflet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jgravois/esri-leaflet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jgravois/esri-leaflet/git/refs{/sha}","trees_url":"https://api.github.com/repos/jgravois/esri-leaflet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jgravois/esri-leaflet/statuses/{sha}","languages_url":"https://api.github.com/repos/jgravois/esri-leaflet/languages","stargazers_url":"https://api.github.com/repos/jgravois/esri-leaflet/stargazers","contributors_url":"https://api.github.com/repos/jgravois/esri-leaflet/contributors","subscribers_url":"https://api.github.com/repos/jgravois/esri-leaflet/subscribers","subscription_url":"https://api.github.com/repos/jgravois/esri-leaflet/subscription","commits_url":"https://api.github.com/repos/jgravois/esri-leaflet/commits{/sha}","git_commits_url":"https://api.github.com/repos/jgravois/esri-leaflet/git/commits{/sha}","comments_url":"https://api.github.com/repos/jgravois/esri-leaflet/comments{/number}","issue_comment_url":"https://api.github.com/repos/jgravois/esri-leaflet/issues/comments{/number}","contents_url":"https://api.github.com/repos/jgravois/esri-leaflet/contents/{+path}","compare_url":"https://api.github.com/repos/jgravois/esri-leaflet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jgravois/esri-leaflet/merges","archive_url":"https://api.github.com/repos/jgravois/esri-leaflet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jgravois/esri-leaflet/downloads","issues_url":"https://api.github.com/repos/jgravois/esri-leaflet/issues{/number}","pulls_url":"https://api.github.com/repos/jgravois/esri-leaflet/pulls{/number}","milestones_url":"https://api.github.com/repos/jgravois/esri-leaflet/milestones{/number}","notifications_url":"https://api.github.com/repos/jgravois/esri-leaflet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jgravois/esri-leaflet/labels{/name}","releases_url":"https://api.github.com/repos/jgravois/esri-leaflet/releases{/id}","created_at":"2014-03-07T16:50:15Z","updated_at":"2015-03-12T19:55:23Z","pushed_at":"2015-03-17T14:44:57Z","git_url":"git://github.com/jgravois/esri-leaflet.git","ssh_url":"git@github.com:jgravois/esri-leaflet.git","clone_url":"https://github.com/jgravois/esri-leaflet.git","svn_url":"https://github.com/jgravois/esri-leaflet","homepage":"http://esri.github.io/esri-leaflet","size":9877,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Esri:master","ref":"master","sha":"18f5a7ff809fd1be9164e27054e5dbabb7af8b04","user":{"login":"Esri","id":628795,"avatar_url":"https://avatars.githubusercontent.com/u/628795?v=3","gravatar_id":"","url":"https://api.github.com/users/Esri","html_url":"https://github.com/Esri","followers_url":"https://api.github.com/users/Esri/followers","following_url":"https://api.github.com/users/Esri/following{/other_user}","gists_url":"https://api.github.com/users/Esri/gists{/gist_id}","starred_url":"https://api.github.com/users/Esri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Esri/subscriptions","organizations_url":"https://api.github.com/users/Esri/orgs","repos_url":"https://api.github.com/users/Esri/repos","events_url":"https://api.github.com/users/Esri/events{/privacy}","received_events_url":"https://api.github.com/users/Esri/received_events","type":"Organization","site_admin":false},"repo":{"id":10066825,"name":"esri-leaflet","full_name":"Esri/esri-leaflet","owner":{"login":"Esri","id":628795,"avatar_url":"https://avatars.githubusercontent.com/u/628795?v=3","gravatar_id":"","url":"https://api.github.com/users/Esri","html_url":"https://github.com/Esri","followers_url":"https://api.github.com/users/Esri/followers","following_url":"https://api.github.com/users/Esri/following{/other_user}","gists_url":"https://api.github.com/users/Esri/gists{/gist_id}","starred_url":"https://api.github.com/users/Esri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Esri/subscriptions","organizations_url":"https://api.github.com/users/Esri/orgs","repos_url":"https://api.github.com/users/Esri/repos","events_url":"https://api.github.com/users/Esri/events{/privacy}","received_events_url":"https://api.github.com/users/Esri/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Esri/esri-leaflet","description":"A lightweight set of tools for working with ArcGIS services with Leaflet.","fork":false,"url":"https://api.github.com/repos/Esri/esri-leaflet","forks_url":"https://api.github.com/repos/Esri/esri-leaflet/forks","keys_url":"https://api.github.com/repos/Esri/esri-leaflet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Esri/esri-leaflet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Esri/esri-leaflet/teams","hooks_url":"https://api.github.com/repos/Esri/esri-leaflet/hooks","issue_events_url":"https://api.github.com/repos/Esri/esri-leaflet/issues/events{/number}","events_url":"https://api.github.com/repos/Esri/esri-leaflet/events","assignees_url":"https://api.github.com/repos/Esri/esri-leaflet/assignees{/user}","branches_url":"https://api.github.com/repos/Esri/esri-leaflet/branches{/branch}","tags_url":"https://api.github.com/repos/Esri/esri-leaflet/tags","blobs_url":"https://api.github.com/repos/Esri/esri-leaflet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Esri/esri-leaflet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Esri/esri-leaflet/git/refs{/sha}","trees_url":"https://api.github.com/repos/Esri/esri-leaflet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Esri/esri-leaflet/statuses/{sha}","languages_url":"https://api.github.com/repos/Esri/esri-leaflet/languages","stargazers_url":"https://api.github.com/repos/Esri/esri-leaflet/stargazers","contributors_url":"https://api.github.com/repos/Esri/esri-leaflet/contributors","subscribers_url":"https://api.github.com/repos/Esri/esri-leaflet/subscribers","subscription_url":"https://api.github.com/repos/Esri/esri-leaflet/subscription","commits_url":"https://api.github.com/repos/Esri/esri-leaflet/commits{/sha}","git_commits_url":"https://api.github.com/repos/Esri/esri-leaflet/git/commits{/sha}","comments_url":"https://api.github.com/repos/Esri/esri-leaflet/comments{/number}","issue_comment_url":"https://api.github.com/repos/Esri/esri-leaflet/issues/comments{/number}","contents_url":"https://api.github.com/repos/Esri/esri-leaflet/contents/{+path}","compare_url":"https://api.github.com/repos/Esri/esri-leaflet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Esri/esri-leaflet/merges","archive_url":"https://api.github.com/repos/Esri/esri-leaflet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Esri/esri-leaflet/downloads","issues_url":"https://api.github.com/repos/Esri/esri-leaflet/issues{/number}","pulls_url":"https://api.github.com/repos/Esri/esri-leaflet/pulls{/number}","milestones_url":"https://api.github.com/repos/Esri/esri-leaflet/milestones{/number}","notifications_url":"https://api.github.com/repos/Esri/esri-leaflet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Esri/esri-leaflet/labels{/name}","releases_url":"https://api.github.com/repos/Esri/esri-leaflet/releases{/id}","created_at":"2013-05-14T23:08:31Z","updated_at":"2015-03-17T09:44:16Z","pushed_at":"2015-03-12T20:13:11Z","git_url":"git://github.com/Esri/esri-leaflet.git","ssh_url":"git@github.com:Esri/esri-leaflet.git","clone_url":"https://github.com/Esri/esri-leaflet.git","svn_url":"https://github.com/Esri/esri-leaflet","homepage":"http://esri.github.io/esri-leaflet","size":12345,"stargazers_count":360,"watchers_count":360,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":289,"mirror_url":null,"open_issues_count":21,"forks":289,"open_issues":21,"watchers":360,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Esri/esri-leaflet/pulls/484"},"html":{"href":"https://github.com/Esri/esri-leaflet/pull/484"},"issue":{"href":"https://api.github.com/repos/Esri/esri-leaflet/issues/484"},"comments":{"href":"https://api.github.com/repos/Esri/esri-leaflet/issues/484/comments"},"review_comments":{"href":"https://api.github.com/repos/Esri/esri-leaflet/pulls/484/comments"},"review_comment":{"href":"https://api.github.com/repos/Esri/esri-leaflet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Esri/esri-leaflet/pulls/484/commits"},"statuses":{"href":"https://api.github.com/repos/Esri/esri-leaflet/statuses/35d3e8ddd5a37cdcf2a299a19c07fc802ff37840"}}}}