Skip to content

Instantly share code, notes, and snippets.

@chilijung
Created November 26, 2015 10:28
Show Gist options
  • Save chilijung/585ef3880a6c2bbe7da7 to your computer and use it in GitHub Desktop.
Save chilijung/585ef3880a6c2bbe7da7 to your computer and use it in GitHub Desktop.
var topLeftX = proj(mapDim.topLine[0])[0];
var topLeftY = proj(mapDim.topLine[0])[1];
var topRightX = proj(mapDim.topLine[mapDim.topLine.length - 1])[0];
var bottomLeftY = proj(mapDim.bottomLine[mapDim.topLine.length - 1])[1];
var extentWidth = topRightX - topLeftX;
var extentHeight = bottomLeftY - topLeftY;
this.extentWidth = extentWidth;
this.extentHeight = extentHeight;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment