Digital Sovereignty for everyone

REST API

All routes are under the lh-places/v1 namespace.

GET /geojson/{id}

This route is public. It returns one published post as a GeoJSON Feature whose properties are id, title, url and address. A post that is not published, or has no geodata, returns 404.

{
  "type": "Feature",
  "geometry": { "type": "Point", "coordinates": [144.9631, -37.8136] },
  "properties": {
    "id": 42,
    "title": "Melbourne CBD",
    "url": "https://example.com/melbourne-cbd/",
    "address": "Swanston St, Melbourne VIC 3000"
  }
}

GET /geojson

This route is public. It returns a FeatureCollection of published posts that have geodata, with the same properties on each feature. Only published posts are ever returned; there is no status parameter (one was registered but ignored before 1.30.3).

Parameter Default Notes
post_type post Post type to query.
posts_per_page 50 Capped at 500.
category none Category ID.

GET /attachment-exif-gps/{id}

This route backs Import from media and requires edit_post on the post. It returns latitude, longitude, attachment_id and attachment_title for the first image attached to post {id} that has usable EXIF GPS data. Out-of-range coordinates, and 0,0, are treated as missing.

If you like this plugin please consider making a donation to further development

Install LHero.org

lhero.org

Open it straight from your home screen, full screen and quicker to load.

  1. Tap the Share button . If you cannot see it, tap ••• first.
  2. Scroll down and tap Add to Home Screen.
  3. Tap Add.
  1. Tap the browser menu â‹®.
  2. Tap Install app or Add to Home screen.
  1. In the menu bar, choose File, then Add to Dock.

Use your browser's menu to install this site or add it to your home screen.