JavaScript libraries for working with Who's On First data.
- This is a work in progress.
- It is not fully documented.
- There is an open ticket to generate minified and bundled versions of each library listed below. As of this writing you still need to include all the dependencies manually.
Please write me.
This has been deprecated. Please use mapzen.whosonfirst.uri instead.
Please write me.
- mapzen.whosonfirst.data
- mapzen.whosonfirst.leaflet
- mapzen.whosonfirst.leaflet.handlers
- mapzen.whosonfirst.leaflet.styles
- mapzen.whosonfirst.net
Generate an ordered list of footnotes from links that are children of a source (DOM) element, optionally filtering on a specific class attribute. Matching links are appended with a sibling sup
element containing their footnote index. The footnotes list itself is appended to a target (DOM) element.
var source_el = document.getElementById("content");
var target_el = document.getElementById("content");
mapzen.whosonfirst.footnotes.add_footnotes(source_el, target_el, {'class': 'wof-footnote'});
None
Please write me.
None
Please write me.
Please write me.
Please write me.
Please write me.
Please write me.
Find all the elements in the current DOM with a wof-namify
class and replace their value with the corresponding name for the Who's On First record as identified by a wof-data-id
attribute. Results are cached client-side using the localForage library.
mapzen.whosonfirst.namify.namify_wof();
- mapzen.whosonfirst.brands
- mapzen.whosonfirst.log
- mapzen.whosonfirst.net
- mapzen.whosonfirst.php
- mapzen.whosonfirst.uri
- localforage
Please write me.
None
Please write me.
None
Please write me.
None
Helper methods for generating absolute and relative URIs for Who's On First documents.
var endpoint = mapzen.whosonfirst.uri.endpoint();
var url = mapzen.whosonfirst.uri.id2abspath(endpoint, 102112179);
var rel_path = mapzen.whosonfirst.uri.id2relpath(102112179);
Please write me.