caltopo-json

2.0.0 • Public • Published

caltopo-json

npm-version build-status dependencies dev-dependencies

Get the underlying JSON from a CalTopo map.

npm install caltopo-json

usage example

Get the JSON for CalTopo map https://caltopo.com/m/F56K

// ES6
import getJson from 'caltopo-json';
 
getJson('F56K').then(json => console.log(json.Marker));
  
/*
[
  {
    "comments": "commentz",
    "id": 0,
    "label": "Test Point",
    "position": {
      "id": 23773245,
      "lat": 39.46486419970058,
      "lng": -106.64050943389896
    },
    "updated": "1479945025000",
    "url": "#FF0000"
  }
]
*/
// ES5
const getJson = require('caltopo-json').default;
 
getJson('F56K').then(json => console.log(json.Marker));
  
/*
[
  {
    "comments": "commentz",
    "id": 0,
    "label": "Test Point",
    "position": {
      "id": 23773245,
      "lat": 39.46486419970058,
      "lng": -106.64050943389896
    },
    "updated": "1479945025000",
    "url": "#FF0000"
  }
]
*/

Readme

Keywords

Package Sidebar

Install

npm i caltopo-json

Weekly Downloads

0

Version

2.0.0

License

MIT

Last publish

Collaborators

  • scott113341