Skip to content
This repository was archived by the owner on Jul 7, 2022. It is now read-only.

whosonfirst/js-mapzen-whosonfirst

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 

Repository files navigation

js-mapzen-whosonfirst

JavaScript libraries for working with Who's On First data.

Caveats

  • 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.

mapzen.whosonfirst.brands

Example

Please write me.

Dependencies

mapzen.whosonfirst.data

This has been deprecated. Please use mapzen.whosonfirst.uri instead.

mapzen.whosonfirst.enmapify

Example

Please write me.

Dependencies

mapzen.whosonfirst.footnotes

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.

Example

var source_el = document.getElementById("content");
var target_el =	document.getElementById("content");

mapzen.whosonfirst.footnotes.add_footnotes(source_el, target_el, {'class': 'wof-footnote'});

Dependencies

None

mapzen.whosonfirst.geojson

Example

Please write me.

Dependencies

None

mapzen.whosonfirst.leaflet

Example

Please write me.

Dependencies

mapzen.whosonfirst.leaflet.handlers

Example

Please write me.

Dependencies

mapzen.whosonfirst.leaflet.styles

Example

Please write me.

Dependencies

mapzen.whosonfirst.leaflet.tangram

Example

Please write me.

Dependencies

mapzen.whosonfirst.log

Example

Please write me.

Dependencies

mapzen.whosonfirst.namify

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.

Example

mapzen.whosonfirst.namify.namify_wof();

Dependencies

mapzen.whosonfirst.net

Example

Please write me.

Dependencies

None

mapzen.whosonfirst.php

Example

Please write me.

Dependencies

None

mapzen.whosonfirst.placetypes

Example

Please write me.

Dependencies

None

mapzen.whosonfirst.uri

Helper methods for generating absolute and relative URIs for Who's On First documents.

Example

var endpoint = mapzen.whosonfirst.uri.endpoint();
var url = mapzen.whosonfirst.uri.id2abspath(endpoint, 102112179);

var rel_path = mapzen.whosonfirst.uri.id2relpath(102112179);

Dependencies

mapzen.whosonfirst.whereami

Example

Please write me.

Dependencies

See also

About

JavaScript libraries for working with Who's On First data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •