geo parsing tests

This page was design to test the parsing of geo and its output to the newer JSON structure of micorformats 2. These tests are part of the micorformats 2 test suite.

Theses are backwards compatibility tests for the older version 1 microformats specification. Please do not use this as a reference for authoring microformats.

Just a name (geo parsing test)

On my way to The Bricklayer's Arms (Geo: 51.513458;-0.14812)

The expected JSON output:


{
    "items": [{
        "type": ["h-geo"],
        "properties": {
            "name": ["51.513458;-0.14812"]
        }
    }]
}

Broken into properties (geo parsing test)

We are meeting at The Bricklayer's Arms (Geo: 51.513458: -0.14812)

The expected JSON output:


{
    "items": [{ 
        "type": ["h-geo"],
        "properties": {
            "latitude": ["51.513458"],
            "longitude": ["-0.14812"],
            "name": ["The Bricklayer's Arms (Geo: 51.513458: -0.14812)"]
        }
    }]
}

Value-title class pattern (geo parsing test)

N 51° 51.345, W -0° 14.812

The expected JSON output:


{
    "items": [{ 
        "type": ["h-geo"],
        "properties": {
            "latitude": ["51.513458"],
            "longitude": ["-0.14812"],
            "name": ["N 51° 51.345, W -0° 14.812"]
        }
    }]
}

Hidden value-title pattern (geo parsing test)

The Bricklayer's Arms

The expected JSON output:


{
    "items": [{ 
        "type": ["h-geo"],
        "properties": {
            "latitude": ["51.513458"],
            "longitude": ["-0.14812"],
            "name": ["The Bricklayer's Arms"]
        }
    }]
}

The <abbr> tag pattern (geo parsing test)

N 37° 24.491, W 122° 08.313

The expected JSON output:


{
    "items": [{ 
        "type": ["h-geo"],
        "properties": {
            "latitude": ["37.408183"],
            "longitude": ["-122.13855"],
            "name": ["N 37° 24.491, W 122° 08.313"]
        }
    }]
}

Change log:

Contributors:

The orginal test also had contributions from: