fix issue with FromLatLng so that it supports latLng cooridinates that involve 0.
This commit is contained in:
parent
0cc25036e5
commit
a4e97ba0a9
|
@ -242,7 +242,7 @@ S2.S2Cell = function(){};
|
||||||
|
|
||||||
//static method to construct
|
//static method to construct
|
||||||
S2.S2Cell.FromLatLng = function(latLng, level) {
|
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");
|
throw new Error("Pass { lat: lat, lng: lng } to S2.S2Cell.FromLatLng");
|
||||||
}
|
}
|
||||||
var xyz = S2.LatLngToXYZ(latLng);
|
var xyz = S2.LatLngToXYZ(latLng);
|
||||||
|
|
Loading…
Reference in New Issue