Skip to content Skip to sidebar Skip to footer

Google Maps Api: What Are Xa And Pa In Get Bounds?

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

Solution 1:

You should use:

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

Solution 2:

They are "undocumented properties". Do not use them in your code (they change with API releases).

Use the documented methods of the google.maps.LatLngBounds object

getNorthEast() | LatLng | Returns the north-east corner of this bounds.
getSouthWest() | LatLng | Returns the south-west corner of this bounds.

Post a Comment for "Google Maps Api: What Are Xa And Pa In Get Bounds?"