Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions example/src/examples/Camera/GetCenter.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,16 @@ class GetCenter extends React.Component {

getLng() {
const { center } = this.state;
return center.length === 2 ? `Lng: ${center[0]}` : 'Not available';
return center.length === 2
? `Lng: ${center[0].toFixed(6)}`
: 'Not available';
}

getLat() {
const { center } = this.state;
return center.length === 2 ? `Lat: ${center[1]}` : 'Not available';
return center.length === 2
? `Lat: ${center[1].toFixed(6)}`
: 'Not available';
}

render() {
Expand Down
2 changes: 1 addition & 1 deletion example/src/examples/Camera/GetZoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class GetZoom extends React.Component {
</MapView>

<Bubble>
<Text>Current zoom: {this.state.zoom}</Text>
<Text>Current zoom: {this.state.zoom.toFixed(2)}</Text>
</Bubble>
</>
);
Expand Down
10 changes: 5 additions & 5 deletions example/src/examples/Map/ShowRegionDidChange.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,13 @@ class ShowRegionDidChange extends React.Component {
return (
<Bubble style={styles.bubble}>
<Text>{this.state.reason}</Text>
<Text>Latitude: {geometry.coordinates[1]}</Text>
<Text>Longitude: {geometry.coordinates[0]}</Text>
<Text>Latitude: {geometry.coordinates[1].toFixed(6)}</Text>
<Text>Longitude: {geometry.coordinates[0].toFixed(6)}</Text>
<Text>Visible Bounds NE: {neCoord}</Text>
<Text>Visible Bounds SW: {swCoord}</Text>
<Text>Zoom Level: {properties.zoomLevel}</Text>
<Text>Heading: {properties.heading}</Text>
<Text>Pitch: {properties.pitch}</Text>
<Text>Zoom Level: {properties.zoomLevel.toFixed(2)}</Text>
<Text>Heading: {properties.heading.toFixed(2)}</Text>
<Text>Pitch: {properties.pitch.toFixed(2)}</Text>
<Text>
Is User Interaction: {properties.isUserInteraction ? 'true' : 'false'}
</Text>
Expand Down
Loading