mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
replace parseFloat with Number
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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])])
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user