Remove goog.isDef from coordinate.js
This commit is contained in:
@@ -164,7 +164,7 @@ ol.coordinate.degreesToStringHDMS_ = function(degrees, hemispheres) {
|
|||||||
* @api stable
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.coordinate.format = function(coordinate, template, opt_fractionDigits) {
|
ol.coordinate.format = function(coordinate, template, opt_fractionDigits) {
|
||||||
if (goog.isDef(coordinate)) {
|
if (coordinate) {
|
||||||
return template
|
return template
|
||||||
.replace('{x}', coordinate[0].toFixed(opt_fractionDigits))
|
.replace('{x}', coordinate[0].toFixed(opt_fractionDigits))
|
||||||
.replace('{y}', coordinate[1].toFixed(opt_fractionDigits));
|
.replace('{y}', coordinate[1].toFixed(opt_fractionDigits));
|
||||||
@@ -295,7 +295,7 @@ ol.coordinate.squaredDistanceToSegment = function(coordinate, segment) {
|
|||||||
* @api stable
|
* @api stable
|
||||||
*/
|
*/
|
||||||
ol.coordinate.toStringHDMS = function(coordinate) {
|
ol.coordinate.toStringHDMS = function(coordinate) {
|
||||||
if (goog.isDef(coordinate)) {
|
if (coordinate) {
|
||||||
return ol.coordinate.degreesToStringHDMS_(coordinate[1], 'NS') + ' ' +
|
return ol.coordinate.degreesToStringHDMS_(coordinate[1], 'NS') + ' ' +
|
||||||
ol.coordinate.degreesToStringHDMS_(coordinate[0], 'EW');
|
ol.coordinate.degreesToStringHDMS_(coordinate[0], 'EW');
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user