Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- gpstrack = {
- "type": "FeatureCollection",
- "features": [],
- },
- var x = e.latlng.lat, y = e.latlng.lng
- gpsPoint = {};
- gpsPoint.type = "Feature";
- gpsPoint.properties = {};
- gpsPoint.geometry = JSON.parse(JSON.stringify({"type": 'Point', "coordinates": [x,y]}));
- gpstrack.features.push(gpsPoint);
- gpsRectangle ={};
- gpsRectangle.type = "Feature";
- gpsRectangle.properties = {};
- gpsRectangle.geometry = JSON.parse(JSON.stringify({"type": 'track', "coordinates": [x,y]}));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement