Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

The Api reference tells me that getBounds() returns the coordinates for SW and NE extremes. When I call it, it returns me with a object with xa and pa as keys, each of them having j and k as keys where the coordinates are, seemingly randomly. I have tried to find them in the documentation but get nothing. I can write out custom code to find min and max to determine them myself, but I'm wondering if I can know what they mean.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
168 views
Welcome To Ask or Share your Answers For Others

1 Answer

You should use:

var bounds = map.getBounds();
var NE = bounds.getNorthEast();
var SW = bounds.getSouthWest();

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...