Skip to content

Album documentation

zache-fi edited this page Mar 17, 2022 · 8 revisions

Ajapaik Flutter applications transport format is GeoJSON with project-specific properties.

Flowchart

Documentation

URL-parameters

The app will add the following URL parameters to the request

  • latitude, longitude : WGS84 latitude and longitude when location tracking is enabled
  • search : search key
  • limit : 100
  • orderby : ( "'''distance'''", "alphabetical" )
  • language : target language of the content

The Server-side may or may not respect the parameters given. If the target geojson is a static file then parameters are static.

GeoJSON response

Currently, the only supported structure is

 * List
 ** FeatureCollection 
 *** Features 
 **** Feature 1
 **** Feature 2
 **** Feature 3

Notes

  • only single FeatureCollection is allowed
  • only "point" type geometries with single coordinate pair are allowed

Example

Source code

[
    {
        "type": "FeatureCollection",
        "features": [
            {
                "type": "Feature",
                "geometry": {
                    "type": "Point",
                    "coordinates": [
                        49.84180109,
                        24.03141477
                    ]
                },
                "properties": {
                    "id": 150256,
                    "name": "Lw\u00f3w.Panorama miasta",
                    "description": "",
                    "date": "before 1924",
                    "author": "M. M\u00fcnz",
                    "source_url": "https:\/\/commons.wikimedia.org\/wiki\/File:Lw%C3%B3w.Panorama_miasta.jpg",
                    "source_label": "Wikimedia Commons 56886006",
                    "favorites": false,
                    "rephotos": 2,
                    "thumbnail": "https:\/\/ajapaik.ee\/photo-thumb\/150256\/1024\/",
                    "distance": 0.006113014245952291
                }
            },
            {
                "type": "Feature",
                "geometry": {
                    "type": "Point",
                    "coordinates": [
                        "59.436832239",
                        "24.789470767"
                    ]
                },
                "properties": {
                    "id": "http:\/\/www.wikidata.org\/entity\/Q25516670",
                    "name": "Noortepargi kivi",
                    "description": "kaitsealune r\u00e4ndrahn Tallinnas",
                    "date": "",
                    "author": "",
                    "source_url": "http:\/\/www.wikidata.org\/entity\/Q25516670",
                    "source_label": "Wikidata",
                    "favorites": "",
                    "rephotos": 0,
                    "thumbnail": "https:\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/8\/82\/Lastepargi_kivi.JPG\/640px-Lastepargi_kivi.JPG",
                    "distance": 2.0296966859364636,
                    "geojson": "https:\/\/fiwiki-tools.toolforge.org\/api\/wikidataitem.php?qid=Q25516670"
                }
            },
            ...
        ]
    }
]

Feature

Properties

  • id: Unique id inside album ** TBD: Should id be unique URI which would be pointing to the item?
  • name : Item name in requested language.
  • description : Item description in requested language.
  • source_url : more info link url
  • source_label : more info link text
  • thumbnail : thumbnail image for the item
  • image : highres image for the item (OPTIONAL)
  • distance: server side generated distance to the feature ** TBD: calculate this in client ?

Metadata for the album features

  • favorites : Number of favorites in album
  • rephotos : Number of rephotos in album
  • geojson : Url for loading album content

Metadata for the non-album (=photo) features

  • date : Item date as string in requested language.
  • author: Author name as string in requested language.

Misc

  • licence_url : ** Do we need licence info for albums?
  • licence_text : ** Do we need licence info for albums?
Clone this wiki locally