Fandom

Megaverse Wiki

Geo (microformat)

52pages on
this wiki
Add New Page
Comments0 Share
File:GeoGreatBarr.png

Geo is a microformat used for marking up WGS84 geographical coordinates (latitude;longitude) in (X)HTML.[1] Although termed a "draft" specification, this is a formality, and the format is stable and in widespread use;[2] not least as a sub-set of the published hCalendar[3] and hCard[4] microformat specifications, neither of which is still a draft.[3][4]

Use of Geo allows parsing tools (for example other websites, or Firefox's Operator extension) to extract the locations, and display them using some other website or mapping tool, or to load them into a GPS device, index or aggregate them, or convert them into an alternative format.

UsageEdit

  • If latitude is present, so must be longitude, and vice versa.
  • The same number of decimal places should be used in each value, including trailing zeroes.[note 1]

There are two ways to convert ordinary (X)HTML into a geo microformat:

Three classesEdit

Adding three classes. For example the marked-up text:

<div>Belvide: 52.686; -2.193</div>

becomes:

<div class="geo">Belvide: <span class="latitude">52.686</span>; <span class="longitude">-2.193</span></div>

by adding the class-attribute values "geo", "latitude" and "longitude".

This will display

Belvide: 52.686; -2.193

and a geo microformat for that location, Belvide Reservoir, which will be detected, on this page, by microformat parsing tools.

One classEdit

In some cases, a shorthand version may be used, with just the outer class. Latitude must be first:

Belvide Reservoir is at 52.686; -2.193.

becomes:

Belvide Reservoir is at <span class="geo">52.686; -2.193</span>.

Note that the separator must be a semi-colon (;). If the display of some other separator is desired, then the abbr element can be used, with the value to be interpreted placed in its title attribute:

Belvide Reservoir is at <abbr class="geo" title="52.686;-2.193">52.686, -2.193</abbr>.

This can also be used to display the location using some other schema:

Belvide Reservoir is at <abbr class="geo" title="52.686;-2.193">Grid reference SJ870099</abbr>.

However, it is considered bad practice to use abbr to hide the location completely:

Belvide Reservoir is <abbr class="geo" title="52.686;-2.193">nice to visit</abbr>.

Accessibility concernsEdit

Concerns have been expressed [5] that the use of the abbr element (using the so-called abbr-design-pattern) in the above manner causes accessibility problems, not least for users of screen readers and aural browsers. Work is underway to find an alternative method of presenting coordinates.

hCardEdit

Each Geo microformat may be wrapped in an hCard microformat, allowing for the inclusion of personal, organisational or venue names, postal addresses, telephone contacts, URLs, pictures, etc.

ExtensionsEdit

There are three active proposals, none mutually-exclusive, to extend the geo microformat:

  • geo-extension - for representing coordinates on other planets, moons etc., and with non-WGS84 schema
  • geo-elevation - for representing altitude
  • geo-waypoint - for representing routes and boundaries, using waypoints

UsersEdit

Organisations and websites using Geo include:

Many[which?] of the organisations publishing hCard include a geo as part of that.

NotesEdit

ReferencesEdit

External linksEdit

fr:Geo (microformat) it:Geo (microformat) ru:Geo (микроформат) uk:Geo (мікроформат) zh:Geo


Cite error: <ref> tags exist for a group named "note", but no corresponding <references group="note"/> tag was found.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.