Microformat tagging #120

wants to merge 2 commits into


None yet
4 participants

petterreinholdtsen commented Jun 9, 2011

The microformat specification make it easier for search engines and automatic web page parsers to extract useful information from a web page. As all FixMyStreet reports are geo located, it seem like a good idea
to make the coordinate available for search engines. This should allow FixMyStreet reports to show up on Google Maps and Google Earth without any more work done from FixMyStreet.

This branch is a draft testing this approach. Since a few minutes ago, it is used on www.fiksgatami.no,
to see if the reports show up on Google Maps as soon as Google starts the indexing of the site. :)


dracos commented Jun 9, 2011

Microformats much prefer visible to invisible data - http://microformats.org/wiki/principles - I'm not sure empty abbr are very semantic, what are you abbreviating? Google (with Yahoo and Microsoft) launched http://schema.org/ last week, which is presumably how they would like you to mark up metadata. http://schema.org/GeoCoordinates is the entry for geo-coordinates.

We're nearly finished with the migrate_to_catalyst branch, which will then become master - which will change all this code to make it better, more structured, with more separation of front/back end. I won't be able to apply this pull request, as this isn't how the map is now displayed. You could easily apply some microdata/format information on the new branch, to templates/web/default/around/display_location.html and templates/web/default/report/new/fill_in_details.html (which as you can see, are much nicer named :) ), to the existing input elements, no need for abbrs.

This pull request has been outstanding for three years? Is it obsolete now, by any chance?

@dracos dracos added 0 - Icebox and removed 1 - Contender labels Nov 14, 2014


dracos commented Sep 23, 2016

Since this was opened, microformats now have version 2 (with no examples of use in the wild on their wiki, though); to cover that, falling back to version 1, plus schema.org, and given we don't publicly show the co-ordinates (though the pin itself is performing a similar service), it looks like you'd have to have something like this:

<div itemscope itemtype="http://schema.org/GeoCoordinates" class="geo h-geo">
    <meta itemprop="latitude" content="[% pin.latitude %]" />
    <meta itemprop="longitude" content="[% pin.longitude %]" />
    <data class="p-latitude latitude" value="[% pin.latitude %]" />
    <data class="p-longitude longitude" value="[% pin.longitude %]" />

(I don't know what a data element is, it's not HTML5, but unless I've not read the docs right, they can't use the same hidden elements which is a shame.)

If we showed the co-ordinates somewhere on the page, this could become the slightly nicer:

<div itemscope itemtype="http://schema.org/GeoCoordinates" class="geo h-geo">
    <span class="p-latitude latitude" itemprop="latitude">[% pin.latitude %]</span>,
    <span class="p-longitude longitude" itemprop="longitude">[% pin.longitude %]</span>

Looks like Flickr, Google Maps, etc have all dropped support for displaying them; I think this is something we can leave and come back if anyone wants it in future.

dracos closed this Sep 23, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment