Skip to content

Instantly share code, notes, and snippets.

@jpoehnelt
Last active October 9, 2019 22:22
Show Gist options
  • Save jpoehnelt/a0c3da2c027bfc5a4beaad8771a04f73 to your computer and use it in GitHub Desktop.
Save jpoehnelt/a0c3da2c027bfc5a4beaad8771a04f73 to your computer and use it in GitHub Desktop.
var getTileUrl = function(coordinates, zoom) {
return (
"https://www.mrlc.gov/geoserver/NLCD_Land_Cover/wms?" +
"&REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1" +
"&LAYERS=mrlc_display%3ANLCD_2016_Land_Cover_L48" +
"&FORMAT=image%2Fpng" +
"&SRS=EPSG:3857&WIDTH=256&HEIGHT=256" +
"&BBOX=" +
xyzToBounds(coordinates.x, coordinates.y, zoom).join(",")
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment