开发者

Why the SouthWest's point.x is not 0 on google maps

开发者 https://www.devze.com 2023-01-16 03:40 出处:网络
this is my code: google.maps.event.addListener(map,\'bounds_changed\', function () { var left_bottom=map.getProjection().fromLatLngToPoint(map.getBounds().getSouthWest())

this is my code:

google.maps.event.addListener(map,'bounds_changed', function () {
            var left_bottom=map.getProjection().fromLatLngToPoint(map.getBounds().getSouthWest())
            console.log(left_bottom)
        });

I think the result may be this:

(0,some number),

but the result is:

(232.31212222222223, 155.07739681860028)

so why开发者_开发技巧 the SouthWest's point.x is not 0?


.getProjection is returning the mercator projection, it's a coordinate system where 0,0 is in the top left of a cylindrical representation of a map (like Google uses) at the north pole and international date line, and icreases as you head east/south. The upper bound is 256.

0

精彩评论

暂无评论...
验证码 换一张
取 消