Microformats

From OpenStreetMap Wiki
Jump to: navigation, search

In the wiki

The Geo microformat (along with an hCard microformat) is now automatically added to pages which use the browse link, city or place templates.

In the web site

The geo microformat is also added to the GPS trace pages and diary entry pages.

In your web page

geo format

<div class="geo">
 <b>lat: </b><span class="latitude">45.035</span>
 <b>lon: </b><span class="longitude">3.4567</span>
</div>

gives :

lat: 45.035 lon: 3.4567

The line above contains geographic informations for semantic web in microformat.

hCard format

<div id="hcard-Firstname-Familly" class="vcard">
 <div class="url fn" >Firstname Familly</div>
 <div class="org">OpenStreetMap</div>
 <div class="adr">
  <span class="value-type" title="home"> </span>
  <div class="street-address">Chemin Sans Fin</div>
  <span class="postal-code">01999</span>
  <span class="locality">Somewhere</span>
  <span class="country-name">France</span>
 </div>
 <div class="adr">
  <span class="value-type" title="work"> </span>
  <div class="street-address">Rue de Nulle Part</div>
  <span class="postal-code">01999</span>
  <span class="locality">Nowhere</span>
  <span class="country-name">France</span>
 </div>
 <div class="tel">+33 (0)1 23 45 67 89</div>
 <div class="geo">
 <b>lat : </b><span class="latitude">45.035</span>
 <b>lon : </b><span class="longitude">3.4567</span>
 </div>
</div>

gives:

Firstname Familly
OpenStreetMap

Chemin Sans Fin

01999 Somewhere France

Rue de Nulle Part

01999 Nowhere France

+33 (0)1 23 45 67 89

lat : 45.035 lon : 3.4567

The lines above contains hCard informations for semantic web in microformat.

The two addresses above can be used with Nominatim.

The geo data can be used with OpenStreetMap

With Firefox

The firefox extension Operator[1] make use of several microformats. But actualy (version Operator 0.9.5.1 ) does not know OpenStreetMap.

A little hack add OpenStreetMap as maps available[2].

See also Geotagging.

Notes

  1. https://addons.mozilla.org/en/firefox/addon/4106
  2. See User:FrViPofm/Operator (French but easy to understand)