How do i get the coordinates of all four corners o

2019-07-20 15:54发布

How can i retrieve OR calculate the coordinates of the NW or SE corners of a Rectangle?

I'm using Google Maps API v3 and I know there is the getBounds() method which returns the NE and SW coordinates of the rectangle.

I need all four coordinates because KML 2.2 does not have a rectangle schema spec, it only has the polygon schema and i need to be able to export my rectangle into a kml as a polygon.

1条回答
手持菜刀,她持情操
2楼-- · 2019-07-20 16:28

NW coordinates - (x1, y1)
SE coordinates - (x2, y2)
NE coordinates - (x2, y1)
SW coordinates - (x1, y2)

查看更多
登录 后发表回答