本文介绍了谷歌地图api:xa和pa在界限中是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Api引用告诉我getBounds()返回SW和NE极值的坐标。当我把它叫做时,它返回给我一个xa和pa作为关键字的对象,每个关键字都有j和k作为关键字,这些坐标看起来是随机的。我试图在文档中找到它们,但什么也没得到。我可以编写自定义代码来查找min和max以自己确定它们,但是我想知道是否可以知道它们的含义。 解决方案

您应该使用:

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


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.

解决方案

You should use:

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

这篇关于谷歌地图api:xa和pa在界限中是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 17:56