GeoJSON

Maparoni is a file-based app. Each collection is a file, using the standard GeoJSON format.

New collections created in Maparoni are stored either in its iCloud Drive folder, or locally on the device. Maparoni can also directly work with files stored in any of the locations in your Files app, including Box, Dropbox, Google Drive or Working Copy. You can use those to collaborate on collections with others.

When working with files that can be modified externally – no matter if it’s by you or someone else – Maparoni will always show the latest content of the file and auto-save any changes you make it.

Working with GeoJSON

Each collection is a plain text file using the GeoJSON format. This means that Maparoni can work with files generated with other desktop, mobile and web apps supporting that format or can also be used to display data from the various web APIs using this format.

You can for example:

How Maparoni uses GeoJSON

GeoJSON is a fairly generic and flexible format. When working with GeoJSON files directly it’s good to understand how Maparoni is using them:

When creating and modifying files, Maparoni will always use the FeatureCollection style at the top level. Each item added to a collection is Feature in that collection.

The rich representations of GeoJSON files in Maparoni are based on three concepts:

  1. Configuration of the collection itself, which stores the name and description of the collection, but also defines the look of the collection and which fields are available - which brings us to:
  2. Property Schemas that define each field, which means in GeoJSON terms that they define what kind of value is expected for a certain property within the properties field of a GeoJSON Feature.
  3. Actions are a special kind of property schema, that define what action buttons should be available for a location and what should happen when you tap them.

As you see, these work together: The Configurations of the collections have a list of Property Schemas, and Actions are a special type of Property Schemas.

Configuration

The configuration of the collection is stores in a top level maparoni dictionary, which has the following notable key-value pairs:

  • name and description as strings
  • schemas defines the available fields and is stored as described below
  • A pretty-print boolean that tells Maparoni to write the GeoJSON in pretty-printed form

Property Schemas

When opening a file, Maparoni will use the property schema defined by the file, or, if none, a small default set of schemas to look for names, URLs, address, and phone numbers.

A Property Schema defines how certain properties entries should be interpreted and what editing field should be available for them. Each schema is made up of:

  • A key string which will be matched against the key used in the properties.
  • A title string which will be used when as the title when presenting the matched property.
  • A type which is one of text, long_text, url, integer, decimal, date, time, dateTime or color .

Examples:

Additionally, Maparoni will always look for and use the following fields:

  • maparoni-pin-color is of type color and will be used to colour map markers
  • maparoni-pin-letter is of type text and will be used as the text inside map markers

Actions

Per-location actions are added through property schemas of the action type, which require a separate action string. This will turn them into buttons on each locations which then trigger actions specific to that location. In those action strings you can use the following placeholders which will then get filled in according to the values of each item:

  • {latitude}
  • {longitude}
  • {title}

For example, a deep-link to get a route in TripGo would have this schema:

{
  "key": "tripgo",
  "title": "Route in TripGo",
  "type": "action",
  "action": "https://tripgo.com/go?tlat={latitude}&tlng={longitude}&name={title}"
}