示例#1
0
        public override Pixel LngLatToPixel(LngLat lngLat, double zoom)
        {
            Point  point     = this.LngLatToMercator(lngLat);
            double zoomUnits = ProjectionUtil.GetZoomUnits(zoom);

            return(new Pixel((int)Math.Round(point.X / zoomUnits), (int)Math.Round(point.Y / zoomUnits)));
        }
示例#2
0
        public override LngLat PixelToLngLat(Pixel pixel, double zoom)
        {
            double zoomUnits = ProjectionUtil.GetZoomUnits(zoom);
            Point  point     = new Point((double)pixel.X * zoomUnits, (double)pixel.Y * zoomUnits);

            return(this.MercatorToLngLat(point));
        }