Skip to content

Commit

Permalink
port fix from #484 to L.esri.imageMapLayer (#774)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgravois committed Apr 26, 2016
1 parent 97b1196 commit 14b59d3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Layers/ImageMapLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,15 @@ export var ImageMapLayer = RasterLayer.extend({
var size = this._map.getSize();
var ne = this._map.options.crs.project(bounds._northEast);
var sw = this._map.options.crs.project(bounds._southWest);

// ensure that we don't ask ArcGIS Server for a taller image than we have actual map displaying
var top = this._map.latLngToLayerPoint(bounds._northEast);
var bottom = this._map.latLngToLayerPoint(bounds._southWest);

if (top.y > 0 || bottom.y < size.y) {
size.y = bottom.y - top.y;
}

var sr = parseInt(this._map.options.crs.code.split(':')[1], 10);

var params = {
Expand Down

0 comments on commit 14b59d3

Please sign in to comment.