$ npm install geoposition-to-geojsonTurn an HTML5 Geoposition object into a GeoJSON Point.
Pairs well with geolocation-stream and mapbox.js.
See also geoposition-to-object.
npm install geoposition-to-geojson --save
var geojsonify = require('geoposition-to-geojson')
navigator.geolocation.getCurrentPosition(function(position) {
console.log(geojsonify(position))
})
{
type: "Feature",
geometry: {
type: "Point",
coordinates: [-104.8483681, 38.792024999999995]
},
properties: {
timestamp: "123",
accuracy: 26,
altitude: null,
altitudeAccuracy: null,
heading: null,
speed: null
}
}
npm install
npm test
None
MIT
Generated by package-json-to-readme