Skip to content
Snippets Groups Projects
Commit 287bf112 authored by Joni Laukka's avatar Joni Laukka
Browse files

PositionToGeoJSON function added to UserMap.js

parent db71aea9
No related branches found
No related tags found
2 merge requests!11Combine gamelist and new game form,!6PositionToGeoJSON function added to UserMap.js
......@@ -63,6 +63,19 @@ class UserMap extends Component {
}
}
positionToGeoJSON(position){
let geoJSON = {
type: "Feature",
properties: {},
geometry: {
type: "Point",
coordinates: [position.coords.longitude, position.coords.latitude]
}
}
return JSON.stringify(geoJSON);
}
render() {
return (
<Map className='map' center={this.props.position} zoom={this.props.zoom}>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment