Advertisement
Guest User

Untitled

a guest
Dec 9th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. gpstrack = {
  2. "type": "FeatureCollection",
  3. "features": [],
  4. },
  5. var x = e.latlng.lat, y = e.latlng.lng
  6. gpsPoint = {};
  7. gpsPoint.type = "Feature";
  8. gpsPoint.properties = {};
  9. gpsPoint.geometry = JSON.parse(JSON.stringify({"type": 'Point', "coordinates": [x,y]}));
  10. gpstrack.features.push(gpsPoint);
  11.  
  12. gpsRectangle ={};
  13. gpsRectangle.type = "Feature";
  14. gpsRectangle.properties = {};
  15. gpsRectangle.geometry = JSON.parse(JSON.stringify({"type": 'track', "coordinates": [x,y]}));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement