replace parseFloat with Number

This commit is contained in:
Martin Raifer
2022-11-24 20:10:27 +01:00
parent d759c9e3f4
commit 60ee70f016
2 changed files with 5 additions and 5 deletions

View File

@@ -503,8 +503,8 @@ rendererBackgroundSource.Esri = function(data) {
vintage: vintage,
source: clean(result.NICE_NAME),
description: clean(result.NICE_DESC),
resolution: clean(+parseFloat(result.SRC_RES).toFixed(4)),
accuracy: clean(+parseFloat(result.SRC_ACC).toFixed(4))
resolution: clean(+Number(result.SRC_RES).toFixed(4)),
accuracy: clean(+Number(result.SRC_ACC).toFixed(4))
};
// append units - meters

View File

@@ -126,7 +126,7 @@ export function uiFeatureList(context) {
var locationMatch = sexagesimal.pair(q.toUpperCase()) || q.match(/^(-?\d+\.?\d*)\s+(-?\d+\.?\d*)$/);
if (locationMatch) {
var loc = [parseFloat(locationMatch[0]), parseFloat(locationMatch[1])];
var loc = [Number(locationMatch[0]), Number(locationMatch[1])];
result.push({
id: -1,
geometry: 'point',
@@ -205,8 +205,8 @@ export function uiFeatureList(context) {
type: type,
name: d.display_name,
extent: new geoExtent(
[parseFloat(d.boundingbox[3]), parseFloat(d.boundingbox[0])],
[parseFloat(d.boundingbox[2]), parseFloat(d.boundingbox[1])])
[Number(d.boundingbox[3]), Number(d.boundingbox[0])],
[Number(d.boundingbox[2]), Number(d.boundingbox[1])])
});
}
});