fix issue with FromLatLng so that it supports latLng cooridinates that involve 0.

This commit is contained in:
Patrick 2016-08-16 22:00:34 -07:00
parent 0cc25036e5
commit a4e97ba0a9
1 changed files with 1 additions and 1 deletions

View File

@ -242,7 +242,7 @@ S2.S2Cell = function(){};
//static method to construct
S2.S2Cell.FromLatLng = function(latLng, level) {
if (!latLng.lat || !latLng.lng) {
if (latLng.lat == null || latLng.lng == null) {
throw new Error("Pass { lat: lat, lng: lng } to S2.S2Cell.FromLatLng");
}
var xyz = S2.LatLngToXYZ(latLng);