Skip to content

Instantly share code, notes, and snippets.

@Pop-Code
Last active December 18, 2015 11:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pop-Code/5773501 to your computer and use it in GitHub Desktop.
Save Pop-Code/5773501 to your computer and use it in GitHub Desktop.
var xyzZoomLevel = new OpenLayers.Layer.XYZ("xyzZoomLevel",
["http://mapserver.local/${z}/${x}/${y}.png"], {
sphericalMercator: true,
transitionEffect: "resize",
wrapDateLine: true,
minResolution: 2445.9849, //The lowest resolution on the map
maxResolution: 611.4962, //The max resolution on the map
resolutions: [2445.9849, 1222.9925, 611.4962], //The list of resolution on the map.
numZoomLevel: 3,//The number of zoom on the map, (= resolution length)
//The resolution start from 2445.9849 socorrespondig
//zoom = 6 when bounds are cropped using Mapnik)
zoomOffset: 6
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment