We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 381a755 commit a979d97Copy full SHA for a979d97
1 file changed
samples/elevation-simple/index.ts
@@ -42,17 +42,17 @@ function displayLocationElevation(
42
if (results[0]) {
43
// Open the infowindow indicating the elevation at the clicked position.
44
infowindow.setContent(
45
- 'The elevation at this point <br>is ' +
46
- results[0].elevation +
47
- ' meters.'
+ `The elevation at this point <br>is ${String(results[0].elevation)} meters.`
48
);
49
} else {
50
infowindow.setContent('No results found');
51
}
52
})
53
- .catch((e) =>
54
- infowindow.setContent('Elevation service failed due to: ' + e)
55
- );
+ .catch((e: unknown) => {
+ infowindow.setContent(
+ `Elevation service failed due to: ${String(e)}`
+ );
+ });
56
57
58
void initMap();
0 commit comments