Skip to content

Instantly share code, notes, and snippets.

var getTop = function(el) {
var id = el.attr('href');
return $(id).offset().top;
};
var getBottom = function(el) {
var id = el.attr('href');
return $(document).height() - ($(id).offset().top + $(id).height());
};
cat data/locales/cs.js data/locales/da.js data/locales/de.js data/locales/en.js data/locales/es.js data/locales/fr.js data/locales/hr.js data/locales/hu.js data/locales/it.js data/locales/ja.js data/locales/lv.js data/locales/nl.js data/locales/pl.js data/locales/pt.js data/locales/ru.js data/locales/sk.js data/locales/sv.js data/locales/tr.js data/locales/uk.js data/locales/vi.js data/locales/zh.js data/locales/zh_TW.js > data/locales.js
node build.js
cat js/lib/bootstrap-tooltip.js js/lib/d3.v3.js js/lib/d3.combobox.js js/lib/d3.geo.tile.js js/lib/d3.jsonp.js js/lib/d3.keybinding.js js/lib/d3.one.js js/lib/d3.size.js js/lib/d3.trigger.js js/lib/d3.typeahead.js js/lib/d3.curtain.js js/lib/jxon.js js/lib/lodash.js js/lib/osmauth.js js/lib/rtree.js js/lib/togeojson.js js/lib/marked.js js/id/start.js js/id/id.js js/id/connection.js js/id/services/taginfo.js js/id/services/wikipedia.js js/id/util.js js/id/geo.js js/id/geo/extent.js js/id/actions.js js/id/actions/add_entity.js js/id/actions/add_midpoint.js js/id/
npm WARN prefer global marked@0.2.8 should be installed with -g
npm WARN package.json jade@0.26.3 No README.md file found!
npm WARN package.json cssom@0.2.5 No README.md file found!
npm WARN package.json nwmatcher@1.3.1 No README.md file found!
node build.js
module.js:340
throw err;
^
Error: Cannot find module 'lru-cache'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
node_modules/.bin/smash node_modules/d3/src/start.js node_modules/d3/src/arrays/index.js node_modules/d3/src/behavior/behavior.js node_modules/d3/src/behavior/zoom.js node_modules/d3/src/core/index.js node_modules/d3/src/event/index.js node_modules/d3/src/geo/mercator.js node_modules/d3/src/geo/path.js node_modules/d3/src/geo/stream.js node_modules/d3/src/geom/polygon.js node_modules/d3/src/selection/index.js node_modules/d3/src/transition/index.js node_modules/d3/src/xhr/index.js node_modules/d3/src/end.js > js/lib/d3.v3.js
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
TypeError: undefined is not a function
at smash (/Users/saman/work_repos/iD/node_modules/smash/index.js:16:11)
at Object.<anonymous> (/Users/saman/work_repos/iD/node_modules/smash/smash:50:1)
at Module._compile (module.js:432:26)
at Object..js (module.js:450:10)

The current OpenStreetMap logo works well at large sizes and in full color, but loses clarity and definition when grayscaled or used at small sizes. There should be an alternative logo available for those circumstances - one that simplifies the OSM logo down to it's essentials for clarity and adaptability. Here's our solution:

connection.putChangeset(
history.changes(),
e.comment,
history.imagery_used(),
function(err, changeset_id) {
loading.remove();
if (err) {
iD.ui.confirm(context.container())
.select('.modal-section.header')
.append('h3')
@samanpwbb
samanpwbb / farm.svg
Last active December 14, 2015 14:59
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Website

  • (John F) Make map more central to the web design
  • (John F) Bring in more map tools, like openstreetbugs

Toggle between two versions, with clear purposes: 1) big map (default if not logged in). 2) activity feed (default if logged in).

Exporting / Extracting:

  • Tools for taking / reusing OSM data and maps (everything from shapefiles to vector shapes)
var locked = true,
b = $('.branding');
$('body').mousemove(function() {
locked = false;
setInterval(function() {
if (!locked) b.removeClass('visible');
locked = true;
}, 5000 );
b.addClass('visible');