Skip to content
Snippets Groups Projects
Commit 1ea581b1 authored by M3034's avatar M3034
Browse files

Merge branch '24-laitteen-sijainti-geojsoniksi' into 'development'

PositionToGeoJSON function added to UserMap.js

See merge request !6
parents db71aea9 287bf112
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