Skip to content

YY.SphericalMercator

sphericalmercator provides projection math for converting between mercator meters, screen pixels (of 256x256 or configurable-size tiles), and latitude/longitude.mapbox/sphericalmercator

js
// By default, precomputes up to z30
var merc = new SphericalMercator({
    size: 256,
    // antimeridian: true
});

This document is generated by vitepress and Edit by deyihu