Merge branch 'wheres_this' of https://github.com/pnorman/openstreetmap-website into...
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 15 Nov 2017 18:24:14 +0000 (18:24 +0000)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 15 Nov 2017 18:25:51 +0000 (18:25 +0000)
Fixes #412

925 files changed:
.mailmap
.rubocop.yml
.rubocop_todo.yml
.travis.yml
CONTRIBUTING.md
FAQ.md [new file with mode: 0644]
Gemfile
Gemfile.lock
INSTALL.md
README.md
Rakefile
VAGRANT.md
Vagrantfile
Vendorfile
app/assets/images/banners/.keep [moved from db/MAKE_MIGRATIONS_AND_TEST_THEM_DONT_PUT_SQL_HERE_ANY_MORE with 100% similarity]
app/assets/images/banners/banner-sotmus2017.png [new file with mode: 0644]
app/assets/images/banners/osmf-membership-drive-2017.png [new file with mode: 0644]
app/assets/images/banners/sotmasia-2017-banner.png [new file with mode: 0644]
app/assets/images/browse/shop_car_parts.16.png [new file with mode: 0644]
app/assets/images/github.png [new file with mode: 0644]
app/assets/images/google.png
app/assets/images/key/cyclemap/bicycle_parking.png [new file with mode: 0644]
app/assets/images/key/cyclemap/bicycle_shop.png [new file with mode: 0644]
app/assets/images/key/cyclemap/common.png [new file with mode: 0644]
app/assets/images/key/cyclemap/cycleway.png [new file with mode: 0644]
app/assets/images/key/cyclemap/cycleway_local.png [new file with mode: 0644]
app/assets/images/key/cyclemap/cycleway_local13.png [new file with mode: 0644]
app/assets/images/key/cyclemap/cycleway_national.png [new file with mode: 0644]
app/assets/images/key/cyclemap/cycleway_national13.png [new file with mode: 0644]
app/assets/images/key/cyclemap/cycleway_regional.png [new file with mode: 0644]
app/assets/images/key/cyclemap/cycleway_regional13.png [new file with mode: 0644]
app/assets/images/key/cyclemap/footway.png [new file with mode: 0644]
app/assets/images/key/cyclemap/forest.png [new file with mode: 0644]
app/assets/images/key/cyclemap/lake.png [new file with mode: 0644]
app/assets/images/key/cyclemap/motorway.png [new file with mode: 0644]
app/assets/images/key/cyclemap/motorway12.png [new file with mode: 0644]
app/assets/images/key/cyclemap/primary.png [new file with mode: 0644]
app/assets/images/key/cyclemap/primary12.png [new file with mode: 0644]
app/assets/images/key/cyclemap/rail.png [new file with mode: 0644]
app/assets/images/key/cyclemap/rail14.png [new file with mode: 0644]
app/assets/images/key/cyclemap/secondary.png [new file with mode: 0644]
app/assets/images/key/cyclemap/secondary12.png [new file with mode: 0644]
app/assets/images/key/cyclemap/toilets.png [new file with mode: 0644]
app/assets/images/key/cyclemap/track.png [new file with mode: 0644]
app/assets/images/key/cyclemap/trunk.png [new file with mode: 0644]
app/assets/images/key/cyclemap/trunk12.png [new file with mode: 0644]
app/assets/images/osm_logo_30.png [new file with mode: 0644]
app/assets/images/routing-sprite.png
app/assets/images/routing-sprite.svg [new file with mode: 0644]
app/assets/images/tab-icon.svg [new file with mode: 0644]
app/assets/images/wikipedia.png [new file with mode: 0644]
app/assets/images/wordpress.png
app/assets/javascripts/application.js
app/assets/javascripts/edit/id.js.erb [new file with mode: 0644]
app/assets/javascripts/edit/potlatch.js.erb [new file with mode: 0644]
app/assets/javascripts/edit/potlatch2.js.erb [new file with mode: 0644]
app/assets/javascripts/embed.js.erb
app/assets/javascripts/id.js
app/assets/javascripts/index.js
app/assets/javascripts/index/contextmenu.js [new file with mode: 0644]
app/assets/javascripts/index/directions.js
app/assets/javascripts/index/directions/graphhopper.js
app/assets/javascripts/index/directions/mapquest.js
app/assets/javascripts/index/directions/mapzen.js
app/assets/javascripts/index/directions/osrm.js
app/assets/javascripts/index/new_note.js
app/assets/javascripts/index/note.js
app/assets/javascripts/index/notes.js
app/assets/javascripts/index/query.js
app/assets/javascripts/index/search.js
app/assets/javascripts/leaflet.key.js
app/assets/javascripts/leaflet.layers.js
app/assets/javascripts/leaflet.map.js
app/assets/javascripts/leaflet.share.js
app/assets/javascripts/login.js [new file with mode: 0644]
app/assets/javascripts/oauth.js
app/assets/javascripts/osm.js.erb
app/assets/javascripts/user.js
app/assets/opensearch/osm.xml
app/assets/stylesheets/browse.scss
app/assets/stylesheets/common.scss
app/assets/stylesheets/leaflet-all.scss
app/assets/stylesheets/parameters.scss
app/assets/stylesheets/small.scss
app/controllers/amf_controller.rb
app/controllers/api_controller.rb
app/controllers/application_controller.rb
app/controllers/browse_controller.rb
app/controllers/changeset_controller.rb
app/controllers/diary_entry_controller.rb
app/controllers/export_controller.rb
app/controllers/geocoder_controller.rb
app/controllers/message_controller.rb
app/controllers/node_controller.rb
app/controllers/notes_controller.rb
app/controllers/oauth_clients_controller.rb
app/controllers/oauth_controller.rb
app/controllers/old_controller.rb
app/controllers/redactions_controller.rb
app/controllers/relation_controller.rb
app/controllers/search_controller.rb
app/controllers/site_controller.rb
app/controllers/swf_controller.rb
app/controllers/trace_controller.rb
app/controllers/user_blocks_controller.rb
app/controllers/user_controller.rb
app/controllers/user_preference_controller.rb
app/controllers/user_roles_controller.rb
app/controllers/way_controller.rb
app/helpers/application_helper.rb
app/helpers/asset_helper.rb
app/helpers/banner_helper.rb [new file with mode: 0644]
app/helpers/browse_helper.rb
app/helpers/changeset_helper.rb
app/helpers/geocoder_helper.rb
app/helpers/note_helper.rb
app/helpers/notifier_helper.rb
app/helpers/open_graph_helper.rb
app/helpers/title_helper.rb
app/helpers/trace_helper.rb
app/helpers/user_blocks_helper.rb
app/helpers/user_helper.rb
app/helpers/user_roles_helper.rb
app/models/access_token.rb
app/models/acl.rb
app/models/changeset.rb
app/models/changeset_comment.rb
app/models/changeset_tag.rb
app/models/client_application.rb
app/models/diary_comment.rb
app/models/diary_entry.rb
app/models/diary_entry_subscription.rb [new file with mode: 0644]
app/models/friend.rb
app/models/language.rb
app/models/message.rb
app/models/node.rb
app/models/node_tag.rb
app/models/note.rb
app/models/note_comment.rb
app/models/notifier.rb
app/models/oauth2_token.rb
app/models/oauth2_verifier.rb
app/models/oauth_nonce.rb
app/models/oauth_token.rb
app/models/old_node.rb
app/models/old_node_tag.rb
app/models/old_relation.rb
app/models/old_relation_member.rb
app/models/old_relation_tag.rb
app/models/old_way.rb
app/models/old_way_node.rb
app/models/old_way_tag.rb
app/models/redaction.rb
app/models/relation.rb
app/models/relation_member.rb
app/models/relation_tag.rb
app/models/request_token.rb
app/models/trace.rb
app/models/tracepoint.rb
app/models/tracetag.rb
app/models/user.rb
app/models/user_block.rb
app/models/user_preference.rb
app/models/user_role.rb
app/models/user_token.rb
app/models/way.rb
app/models/way_node.rb
app/models/way_tag.rb
app/views/api/permissions.builder
app/views/browse/_relation.html.erb
app/views/browse/_relation_member.html.erb
app/views/browse/_way.html.erb
app/views/browse/changeset.html.erb
app/views/browse/timeout.html.erb
app/views/changeset/_comments.rss.builder
app/views/changeset/comments_feed.rss.builder
app/views/changeset/history.html.erb
app/views/changeset/list.atom.builder
app/views/changeset/list.html.erb
app/views/changeset/timeout.atom.builder
app/views/diary_entry/list.html.erb
app/views/diary_entry/rss.rss.builder
app/views/diary_entry/view.html.erb
app/views/geocoder/search.html.erb
app/views/layouts/_banner.html.erb [new file with mode: 0644]
app/views/layouts/_head.html.erb
app/views/layouts/_header.html.erb
app/views/layouts/_inbox.html.erb
app/views/layouts/_search.html.erb
app/views/layouts/map.html.erb
app/views/layouts/notifier.html.erb [new file with mode: 0644]
app/views/layouts/site.html.erb
app/views/message/_message_count.html.erb
app/views/message/inbox.html.erb
app/views/message/new.html.erb
app/views/message/outbox.html.erb
app/views/message/read.html.erb
app/views/notes/_note.gpx.builder
app/views/notes/_note.json.jsonify
app/views/notes/_note.rss.builder
app/views/notes/_note.xml.builder
app/views/notes/_notes_paging_nav.html.erb
app/views/notes/feed.rss.builder
app/views/notes/index.gpx.builder
app/views/notes/index.rss.builder
app/views/notes/show.gpx.builder
app/views/notes/show.rss.builder
app/views/notifier/_gpx_description.html.erb
app/views/notifier/_message_body.html.erb [new file with mode: 0644]
app/views/notifier/changeset_comment_notification.html.erb
app/views/notifier/changeset_comment_notification.text.erb
app/views/notifier/diary_comment_notification.html.erb
app/views/notifier/friend_notification.html.erb
app/views/notifier/gpx_failure.html.erb
app/views/notifier/gpx_success.html.erb
app/views/notifier/message_notification.html.erb
app/views/notifier/note_comment_notification.html.erb
app/views/notifier/note_comment_notification.text.erb
app/views/oauth/authorize.html.erb
app/views/redactions/show.html.erb
app/views/site/_id.html.erb
app/views/site/_potlatch.html.erb
app/views/site/_potlatch2.html.erb
app/views/site/about.html.erb
app/views/site/edit.html.erb
app/views/site/export.html.erb
app/views/site/help.html.erb
app/views/site/id.html.erb
app/views/site/key.html.erb
app/views/trace/_trace_paging_nav.html.erb
app/views/trace/edit.html.erb
app/views/trace/georss.rss.builder
app/views/trace/view.html.erb
app/views/user/_auth_association.html.erb [new file with mode: 0644]
app/views/user/_contact.html.erb
app/views/user/_terms.html.erb
app/views/user/account.html.erb
app/views/user/api_read.builder
app/views/user/blocked.html.erb
app/views/user/confirm.html.erb
app/views/user/confirm_email.html.erb
app/views/user/list.html.erb
app/views/user/login.html.erb
app/views/user/logout.html.erb
app/views/user/new.html.erb
app/views/user/reset_password.html.erb
app/views/user/save.html.erb [deleted file]
app/views/user/suspended.html.erb
app/views/user/terms.html.erb
app/views/user/view.html.erb
app/views/user_blocks/_block.html.erb
app/views/user_blocks/_blocks.html.erb
app/views/user_blocks/blocks_by.html.erb
app/views/user_blocks/blocks_on.html.erb
app/views/user_blocks/index.html.erb
app/views/user_blocks/show.html.erb
config.ru
config/application.rb
config/banners.yml [new file with mode: 0644]
config/boot.rb
config/environment.rb
config/environments/development.rb
config/environments/production.rb
config/environments/test.rb
config/example.application.yml
config/i18n-js.yml
config/image_optim.yml
config/initializers/abstract_adapter.rb
config/initializers/action_dispatch.rb
config/initializers/assets.rb
config/initializers/banners.rb [new file with mode: 0644]
config/initializers/canonical_rails.rb [new file with mode: 0644]
config/initializers/cookies_serializer.rb
config/initializers/http_accept_language.rb [deleted file]
config/initializers/i18n.rb
config/initializers/konacha.rb
config/initializers/libxml.rb
config/initializers/oauth.rb
config/initializers/omniauth.rb
config/initializers/paperclip.rb
config/initializers/r2.rb
config/initializers/router.rb
config/initializers/sanitize.rb
config/initializers/secure_headers.rb [new file with mode: 0644]
config/initializers/session.rb [deleted file]
config/initializers/session_store.rb
config/initializers/streaming.rb [deleted file]
config/initializers/uri_sanitizer.rb [new file with mode: 0644]
config/initializers/wiki_pages.rb
config/initializers/wrap_parameters.rb
config/key.yml
config/lighttpd-host-blocks.sh [deleted file]
config/lighttpd.conf [deleted file]
config/locales/af.yml
config/locales/aln.yml
config/locales/ar.yml
config/locales/arz.yml
config/locales/ast.yml
config/locales/az.yml
config/locales/be-Tarask.yml
config/locales/be.yml
config/locales/bg.yml
config/locales/bn.yml [new file with mode: 0644]
config/locales/br.yml
config/locales/bs.yml
config/locales/ca.yml
config/locales/cs.yml
config/locales/cy.yml
config/locales/da.yml
config/locales/de.yml
config/locales/diq.yml
config/locales/dsb.yml
config/locales/el.yml
config/locales/en-GB.yml
config/locales/en.yml
config/locales/eo.yml
config/locales/es.yml
config/locales/et.yml
config/locales/eu.yml
config/locales/fa.yml
config/locales/fi.yml
config/locales/fr.yml
config/locales/fur.yml
config/locales/ga.yml [new file with mode: 0644]
config/locales/gd.yml
config/locales/gl.yml
config/locales/he.yml
config/locales/hr.yml
config/locales/hsb.yml
config/locales/hu.yml
config/locales/ia.yml
config/locales/id.yml
config/locales/is.yml
config/locales/it.yml
config/locales/ja.yml
config/locales/ka.yml
config/locales/kab.yml [new file with mode: 0644]
config/locales/ko.yml
config/locales/lb.yml
config/locales/lt.yml
config/locales/lv.yml
config/locales/mk.yml
config/locales/mr.yml
config/locales/ms.yml
config/locales/nb.yml
config/locales/ne.yml
config/locales/nl.yml
config/locales/nn.yml
config/locales/oc.yml
config/locales/pa.yml
config/locales/pl.yml
config/locales/pt-BR.yml
config/locales/pt-PT.yml
config/locales/ro.yml
config/locales/ru.yml
config/locales/scn.yml
config/locales/sco.yml
config/locales/sk.yml
config/locales/sl.yml
config/locales/sq.yml
config/locales/sr-Latn.yml
config/locales/sr.yml
config/locales/sv.yml
config/locales/te.yml
config/locales/th.yml [new file with mode: 0644]
config/locales/tl.yml
config/locales/tr.yml
config/locales/uk.yml
config/locales/vi.yml
config/locales/zh-CN.yml
config/locales/zh-TW.yml
config/nginx.conf [deleted file]
config/preinitializer.rb
config/routes.rb
config/secrets.yml
config/wiki_pages.yml
db/README [deleted file]
db/functions/Makefile
db/migrate/001_create_osm_db.rb
db/migrate/002_cleanup_osm_db.rb
db/migrate/003_sql_session_store_setup.rb
db/migrate/004_user_enhancements.rb
db/migrate/005_tile_tracepoints.rb
db/migrate/006_tile_nodes.rb
db/migrate/007_add_relations.rb
db/migrate/008_remove_segments.rb
db/migrate/009_way_nodes_node_idx.rb
db/migrate/010_diary_comments.rb
db/migrate/011_add_user_image.rb
db/migrate/012_add_admin_flag.rb
db/migrate/013_add_email_valid.rb
db/migrate/014_add_new_email.rb
db/migrate/015_add_user_visible.rb
db/migrate/016_add_creation_ip.rb
db/migrate/017_add_gpx_indexes.rb
db/migrate/018_create_acls.rb
db/migrate/019_add_timestamp_indexes.rb
db/migrate/020_populate_node_tags_and_remove.rb
db/migrate/021_move_to_innodb.rb
db/migrate/022_key_constraints.rb
db/migrate/023_add_changesets.rb
db/migrate/024_order_relation_members.rb
db/migrate/025_add_end_time_to_changesets.rb
db/migrate/026_add_changeset_user_index.rb
db/migrate/027_add_changeset_indexes.rb
db/migrate/028_add_more_changeset_indexes.rb
db/migrate/029_add_user_foreign_keys.rb
db/migrate/030_add_foreign_keys.rb
db/migrate/031_create_countries.rb
db/migrate/032_add_user_locale.rb
db/migrate/033_change_diary_entries_language.rb
db/migrate/034_create_languages.rb
db/migrate/035_change_user_locale.rb
db/migrate/036_add_visible_to_message.rb
db/migrate/037_add_sender_visible_to_message.rb
db/migrate/038_add_message_sender_index.rb
db/migrate/039_add_more_controls_to_gpx_files.rb
db/migrate/040_create_oauth_tables.rb
db/migrate/041_add_fine_o_auth_permissions.rb
db/migrate/042_add_foreign_keys_to_oauth_tables.rb
db/migrate/043_add_referer_to_user_token.rb
db/migrate/044_create_user_roles.rb
db/migrate/045_create_user_blocks.rb
db/migrate/046_alter_user_roles_and_blocks.rb
db/migrate/047_add_visible_to_diaries.rb
db/migrate/048_add_diary_creation_indexes.rb
db/migrate/049_improve_changeset_user_index.rb
db/migrate/050_add_user_index_to_diary_comments.rb
db/migrate/051_add_status_to_user.rb
db/migrate/052_add_contributor_terms_to_user.rb
db/migrate/053_add_map_bug_tables.rb
db/migrate/054_refactor_map_bug_tables.rb
db/migrate/055_change_map_bug_comment_type.rb
db/migrate/056_add_date_closed.rb
db/migrate/057_add_map_bug_comment_event.rb
db/migrate/20100513171259_add_user_date_index_to_changeset.rb
db/migrate/20100516124737_add_open_id.rb
db/migrate/20100910084426_add_callback_to_oauth_tokens.rb
db/migrate/20101114011429_add_editor_preference_to_user.rb
db/migrate/20110322001319_add_terms_seen_to_user.rb
db/migrate/20110508145337_cleanup_bug_tables.rb
db/migrate/20110521142405_rename_bugs_to_notes.rb
db/migrate/20110925112722_rename_ids.rb
db/migrate/20111116184519_update_oauth.rb
db/migrate/20111212183945_add_lowercase_user_indexes.rb
db/migrate/20120123184321_switch_to_paperclip.rb
db/migrate/20120208122334_merge_acl_address_and_mask.rb
db/migrate/20120208194454_add_domain_to_acl.rb
db/migrate/20120214210114_add_text_format.rb
db/migrate/20120219161649_add_user_image_fingerprint.rb
db/migrate/20120318201948_create_redactions.rb
db/migrate/20120328090602_drop_session_table.rb
db/migrate/20120404205604_add_user_and_description_to_redaction.rb
db/migrate/20120808231205_add_counter_caches.rb
db/migrate/20121005195010_add_diary_entry_counter_caches.rb
db/migrate/20121012044047_add_image_use_gravatar_to_users.rb
db/migrate/20121119165817_drop_nearby_place_from_notes.rb
db/migrate/20121202155309_remove_author_name_from_note_comment.rb
db/migrate/20121203124841_change_note_address_to_inet.rb
db/migrate/20130328184137_add_write_notes_permission.rb
db/migrate/20131212124700_add_created_at_index_to_note_comments.rb
db/migrate/20140115192822_add_text_index_to_note_comments.rb
db/migrate/20140117185510_drop_countries.rb
db/migrate/20140210003018_add_user_image_content_type.rb
db/migrate/20140507110937_create_changeset_comments.rb
db/migrate/20140519141742_add_join_table_between_users_and_changesets.rb
db/migrate/20150110152606_change_default_formats.rb
db/migrate/20150111192335_subscribe_old_changesets.rb
db/migrate/20150222101847_rename_openid_url.rb
db/migrate/20150818224516_set_default_gravatar_to_false_for_privacy.rb [new file with mode: 0644]
db/migrate/20161002153425_add_join_table_between_users_and_diary_entries.rb [new file with mode: 0644]
db/migrate/20161011010929_subscribe_authors_to_diary_entries.rb [new file with mode: 0644]
db/migrate/20170222134109_add_user_indexes.rb [new file with mode: 0644]
db/seeds.rb
db/structure.sql
lib/auth.rb
lib/bounding_box.rb
lib/classic_pagination/pagination.rb
lib/classic_pagination/pagination_helper.rb
lib/consistency_validations.rb
lib/country.rb
lib/daemons/gpx_import_ctl
lib/diff_reader.rb
lib/editors.rb
lib/geo_record.rb
lib/gpx.rb
lib/id.rb
lib/locale.rb [new file with mode: 0644]
lib/migrate.rb
lib/not_redactable.rb
lib/osm.rb
lib/password_hash.rb
lib/potlatch.rb
lib/potlatch2.rb
lib/quad_tile.rb
lib/quad_tile/quad_tile.h
lib/quova.rb [deleted file]
lib/redactable.rb
lib/rich_text.rb
lib/session_persistence.rb
lib/short_link.rb
lib/tasks/add_version_to_nodes.rake
lib/tasks/auto_annotate_models.rake [new file with mode: 0644]
lib/tasks/testing.rake
public/robots.txt
script/cleanup
script/deliver-message
script/gravatar [new file with mode: 0755]
script/statistics
script/update-spam-blocks
script/vagrant/setup/provision.sh
test/controllers/amf_controller_test.rb
test/controllers/api_controller_test.rb
test/controllers/browse_controller_test.rb
test/controllers/changeset_controller_test.rb
test/controllers/diary_entry_controller_test.rb
test/controllers/export_controller_test.rb
test/controllers/geocoder_controller_test.rb
test/controllers/message_controller_test.rb
test/controllers/node_controller_test.rb
test/controllers/notes_controller_test.rb
test/controllers/oauth_clients_controller_test.rb
test/controllers/old_node_controller_test.rb
test/controllers/old_relation_controller_test.rb
test/controllers/old_way_controller_test.rb
test/controllers/redactions_controller_test.rb
test/controllers/relation_controller_test.rb
test/controllers/search_controller_test.rb
test/controllers/site_controller_test.rb
test/controllers/swf_controller_test.rb
test/controllers/trace_controller_test.rb
test/controllers/user_blocks_controller_test.rb
test/controllers/user_controller_test.rb
test/controllers/user_preference_controller_test.rb
test/controllers/user_roles_controller_test.rb
test/controllers/way_controller_test.rb
test/factories/acls.rb [new file with mode: 0644]
test/factories/changeset_comments.rb [new file with mode: 0644]
test/factories/changeset_tags.rb [new file with mode: 0644]
test/factories/changesets.rb [new file with mode: 0644]
test/factories/client_applications.rb [new file with mode: 0644]
test/factories/diary_comments.rb [new file with mode: 0644]
test/factories/diary_entries.rb [new file with mode: 0644]
test/factories/friends.rb [new file with mode: 0644]
test/factories/languages.rb [new file with mode: 0644]
test/factories/messages.rb [new file with mode: 0644]
test/factories/node.rb [new file with mode: 0644]
test/factories/node_tags.rb [new file with mode: 0644]
test/factories/note_comments.rb [new file with mode: 0644]
test/factories/notes.rb [new file with mode: 0644]
test/factories/old_node.rb [new file with mode: 0644]
test/factories/old_node_tags.rb [new file with mode: 0644]
test/factories/old_relation.rb [new file with mode: 0644]
test/factories/old_relation_member.rb [new file with mode: 0644]
test/factories/old_relation_tags.rb [new file with mode: 0644]
test/factories/old_way.rb [new file with mode: 0644]
test/factories/old_way_node.rb [new file with mode: 0644]
test/factories/old_way_tags.rb [new file with mode: 0644]
test/factories/redaction.rb [new file with mode: 0644]
test/factories/relation.rb [new file with mode: 0644]
test/factories/relation_member.rb [new file with mode: 0644]
test/factories/relation_tags.rb [new file with mode: 0644]
test/factories/tracepoints.rb [new file with mode: 0644]
test/factories/traces.rb [new file with mode: 0644]
test/factories/tracetags.rb [new file with mode: 0644]
test/factories/user.rb [new file with mode: 0644]
test/factories/user_blocks.rb [new file with mode: 0644]
test/factories/user_preferences.rb [new file with mode: 0644]
test/factories/user_role.rb [new file with mode: 0644]
test/factories/way.rb [new file with mode: 0644]
test/factories/way_node.rb [new file with mode: 0644]
test/factories/way_tags.rb [new file with mode: 0644]
test/fixtures/acls.yml [deleted file]
test/fixtures/changeset_comments.yml [deleted file]
test/fixtures/changeset_tags.yml [deleted file]
test/fixtures/changesets.yml [deleted file]
test/fixtures/changesets_subscribers.yml [deleted file]
test/fixtures/client_applications.yml [deleted file]
test/fixtures/countries.yml [deleted file]
test/fixtures/current_node_tags.yml [deleted file]
test/fixtures/current_nodes.yml [deleted file]
test/fixtures/current_relation_members.yml [deleted file]
test/fixtures/current_relation_tags.yml [deleted file]
test/fixtures/current_relations.yml [deleted file]
test/fixtures/current_way_nodes.yml [deleted file]
test/fixtures/current_way_tags.yml [deleted file]
test/fixtures/current_ways.yml [deleted file]
test/fixtures/diary_comments.yml [deleted file]
test/fixtures/diary_entries.yml [deleted file]
test/fixtures/friends.yml [deleted file]
test/fixtures/gps_points.yml [deleted file]
test/fixtures/gpx_file_tags.yml [deleted file]
test/fixtures/gpx_files.yml [deleted file]
test/fixtures/languages.yml [deleted file]
test/fixtures/messages.yml [deleted file]
test/fixtures/node_tags.yml [deleted file]
test/fixtures/nodes.yml [deleted file]
test/fixtures/note_comments.yml [deleted file]
test/fixtures/notes.yml [deleted file]
test/fixtures/redactions.yml [deleted file]
test/fixtures/relation_members.yml [deleted file]
test/fixtures/relation_tags.yml [deleted file]
test/fixtures/relations.yml [deleted file]
test/fixtures/user_blocks.yml [deleted file]
test/fixtures/user_preferences.yml [deleted file]
test/fixtures/user_roles.yml [deleted file]
test/fixtures/users.yml [deleted file]
test/fixtures/way_nodes.yml [deleted file]
test/fixtures/way_tags.yml [deleted file]
test/fixtures/ways.yml [deleted file]
test/gpx/fixtures/a.gif [moved from test/traces/1.gif with 100% similarity]
test/gpx/fixtures/a.gpx [moved from test/traces/1.gpx with 100% similarity]
test/gpx/fixtures/a_icon.gif [moved from test/traces/1_icon.gif with 100% similarity]
test/gpx/fixtures/b.gif [moved from test/traces/2.gif with 100% similarity]
test/gpx/fixtures/b.gpx [moved from test/traces/10.gpx with 100% similarity]
test/gpx/fixtures/b_icon.gif [moved from test/traces/2_icon.gif with 100% similarity]
test/gpx/fixtures/c.gif [moved from test/traces/3.gif with 100% similarity]
test/gpx/fixtures/c.gpx [moved from test/traces/3.gpx with 100% similarity]
test/gpx/fixtures/c_icon.gif [moved from test/traces/3_icon.gif with 100% similarity]
test/gpx/fixtures/d.gif [moved from test/traces/4.gif with 100% similarity]
test/gpx/fixtures/d.gpx [moved from test/traces/4.gpx with 100% similarity]
test/gpx/fixtures/d_icon.gif [moved from test/traces/4_icon.gif with 100% similarity]
test/gpx/fixtures/f.gif [moved from test/traces/6.gif with 100% similarity]
test/gpx/fixtures/f.gpx [moved from test/traces/6.gpx with 100% similarity]
test/gpx/fixtures/f_icon.gif [moved from test/traces/6_icon.gif with 100% similarity]
test/gpx/fixtures/g.gif [moved from test/traces/7.gif with 100% similarity]
test/gpx/fixtures/g.gpx [moved from test/traces/7.gpx with 100% similarity]
test/gpx/fixtures/g_icon.gif [moved from test/traces/7_icon.gif with 100% similarity]
test/gpx/fixtures/h.gif [moved from test/traces/8.gif with 100% similarity]
test/gpx/fixtures/h.gpx [moved from test/traces/8.gpx with 100% similarity]
test/gpx/fixtures/h_icon.gif [moved from test/traces/8_icon.gif with 100% similarity]
test/gpx/fixtures/i.gif [moved from test/traces/9.gif with 100% similarity]
test/gpx/fixtures/i.gpx [moved from test/traces/9.gpx with 100% similarity]
test/gpx/fixtures/i_icon.gif [moved from test/traces/9_icon.gif with 100% similarity]
test/gpx/fixtures/j.gpx [moved from test/traces/2.gpx with 100% similarity]
test/gpx/images/.gitkeep [moved from test/fixtures/user_tokens.yml with 100% similarity]
test/gpx/traces/.gitkeep [new file with mode: 0644]
test/helpers/application_helper_test.rb
test/helpers/browse_helper_test.rb
test/helpers/changeset_helper_test.rb
test/helpers/note_helper_test.rb
test/helpers/title_helper_test.rb
test/helpers/user_blocks_helper_test.rb [new file with mode: 0644]
test/helpers/user_helper_test.rb [new file with mode: 0644]
test/helpers/user_roles_helper_test.rb
test/http/geocoder_ca.yml
test/http/geocoder_us.yml [deleted file]
test/http/geonames.yml
test/http/nominatim.yml
test/http/npemap.yml
test/integration/client_applications_test.rb
test/integration/cors_test.rb
test/integration/locale_test.rb [deleted file]
test/integration/oauth_test.rb
test/integration/page_locale_test.rb [new file with mode: 0644]
test/integration/user_blocks_test.rb
test/integration/user_changeset_comments_test.rb
test/integration/user_creation_test.rb
test/integration/user_diaries_test.rb
test/integration/user_login_test.rb
test/integration/user_roles_test.rb
test/integration/user_terms_seen_test.rb
test/lib/bounding_box_test.rb
test/lib/country_test.rb
test/lib/i18n_test.rb
test/lib/locale_test.rb [new file with mode: 0644]
test/lib/password_hash_test.rb
test/lib/utf8_test.rb
test/models/acl_test.rb
test/models/changeset_comment_test.rb
test/models/changeset_tag_test.rb
test/models/changeset_test.rb
test/models/client_application_test.rb
test/models/diary_comment_test.rb
test/models/diary_entry_test.rb
test/models/friend_test.rb
test/models/language_test.rb
test/models/message_test.rb
test/models/node_tag_test.rb
test/models/node_test.rb
test/models/note_comment_test.rb
test/models/note_test.rb
test/models/oauth_nonce_test.rb
test/models/oauth_token_test.rb
test/models/old_node_tag_test.rb
test/models/old_node_test.rb
test/models/old_relation_tag_test.rb
test/models/old_relation_test.rb
test/models/old_way_tag_test.rb
test/models/old_way_test.rb
test/models/redaction_test.rb
test/models/relation_member_test.rb
test/models/relation_tag_test.rb
test/models/relation_test.rb
test/models/request_token_test.rb [new file with mode: 0644]
test/models/trace_test.rb
test/models/tracepoint_test.rb
test/models/tracetag_test.rb
test/models/user_preference_test.rb
test/models/user_test.rb
test/models/user_token_test.rb
test/models/way_node_test.rb
test/models/way_tag_test.rb
test/models/way_test.rb
test/test_helper.rb
vendor/assets/iD/iD.css.erb
vendor/assets/iD/iD.js
vendor/assets/iD/iD/img/bing_maps.png [deleted file]
vendor/assets/iD/iD/img/cursor-pointer.png [deleted file]
vendor/assets/iD/iD/img/cursor-pointer2x.png [deleted file]
vendor/assets/iD/iD/img/iD-sprite.svg
vendor/assets/iD/iD/img/maki-sprite.svg
vendor/assets/iD/iD/img/traffic-signs/traffic-signs.json [new file with mode: 0644]
vendor/assets/iD/iD/img/traffic-signs/traffic-signs.png [new file with mode: 0644]
vendor/assets/iD/iD/locales/af.json
vendor/assets/iD/iD/locales/ar-AA.json
vendor/assets/iD/iD/locales/ar.json
vendor/assets/iD/iD/locales/ast.json
vendor/assets/iD/iD/locales/bg-BG.json
vendor/assets/iD/iD/locales/bg.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/bn.json
vendor/assets/iD/iD/locales/bs.json
vendor/assets/iD/iD/locales/ca.json
vendor/assets/iD/iD/locales/cs.json
vendor/assets/iD/iD/locales/da.json
vendor/assets/iD/iD/locales/de.json
vendor/assets/iD/iD/locales/dv.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/el.json
vendor/assets/iD/iD/locales/en-GB.json
vendor/assets/iD/iD/locales/en.json
vendor/assets/iD/iD/locales/eo.json
vendor/assets/iD/iD/locales/es.json
vendor/assets/iD/iD/locales/et.json
vendor/assets/iD/iD/locales/eu.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/fa.json
vendor/assets/iD/iD/locales/fi.json
vendor/assets/iD/iD/locales/fil.json [deleted file]
vendor/assets/iD/iD/locales/fr.json
vendor/assets/iD/iD/locales/gan.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/gl.json
vendor/assets/iD/iD/locales/gu.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/he.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/hi.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/hr.json
vendor/assets/iD/iD/locales/hu.json
vendor/assets/iD/iD/locales/hy.json
vendor/assets/iD/iD/locales/ia.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/id.json
vendor/assets/iD/iD/locales/is.json
vendor/assets/iD/iD/locales/it.json
vendor/assets/iD/iD/locales/ja.json
vendor/assets/iD/iD/locales/jv.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/km.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/kn.json
vendor/assets/iD/iD/locales/ko-KR.json [deleted file]
vendor/assets/iD/iD/locales/ko.json
vendor/assets/iD/iD/locales/ku.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/lij.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/lt.json
vendor/assets/iD/iD/locales/lv.json
vendor/assets/iD/iD/locales/mg.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/mk.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/ml.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/mn.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/ms.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/ne.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/nl.json
vendor/assets/iD/iD/locales/nn.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/no.json
vendor/assets/iD/iD/locales/nv.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/pl.json
vendor/assets/iD/iD/locales/pt-BR.json
vendor/assets/iD/iD/locales/pt.json
vendor/assets/iD/iD/locales/rm.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/ro.json
vendor/assets/iD/iD/locales/ru.json
vendor/assets/iD/iD/locales/sc.json
vendor/assets/iD/iD/locales/si.json
vendor/assets/iD/iD/locales/sk.json
vendor/assets/iD/iD/locales/sl.json
vendor/assets/iD/iD/locales/sq.json
vendor/assets/iD/iD/locales/sr.json
vendor/assets/iD/iD/locales/sv.json
vendor/assets/iD/iD/locales/ta.json
vendor/assets/iD/iD/locales/te.json
vendor/assets/iD/iD/locales/th.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/tl.json
vendor/assets/iD/iD/locales/tr.json
vendor/assets/iD/iD/locales/uk.json
vendor/assets/iD/iD/locales/ur.json [new file with mode: 0644]
vendor/assets/iD/iD/locales/vi.json
vendor/assets/iD/iD/locales/yue.json
vendor/assets/iD/iD/locales/zh-CN.json
vendor/assets/iD/iD/locales/zh-HK.json
vendor/assets/iD/iD/locales/zh-TW.json
vendor/assets/iD/iD/locales/zh.json
vendor/assets/iD/iD/mapillary-js/arrow-up-white.svg [new file with mode: 0644]
vendor/assets/iD/iD/mapillary-js/cover-logo.svg [new file with mode: 0644]
vendor/assets/iD/iD/mapillary-js/mapillary.js [new file with mode: 0644]
vendor/assets/iD/iD/mapillary-js/mapillary.js.map [new file with mode: 0644]
vendor/assets/iD/iD/mapillary-js/mapillary.min.css [new file with mode: 0644]
vendor/assets/iD/iD/mapillary-js/mapillary.min.js [new file with mode: 0644]
vendor/assets/iD/iD/mapillary-js/pano-indicator.svg [new file with mode: 0755]
vendor/assets/iD/iD/mapillary-js/pano.svg [new file with mode: 0644]
vendor/assets/iD/iD/mapillary-js/pointer-wheat.svg [new file with mode: 0755]
vendor/assets/iD/iD/mapillary-js/pointer-white.svg [new file with mode: 0755]
vendor/assets/iD/iD/mapillary-js/spinner.svg [new file with mode: 0644]
vendor/assets/iD/iD/mapillary-js/stepper-left.svg [new file with mode: 0644]
vendor/assets/iD/iD/mapillary-js/stepper-play.svg [new file with mode: 0644]
vendor/assets/iD/iD/mapillary-js/stepper-right.svg [new file with mode: 0644]
vendor/assets/iD/iD/mapillary-js/stepper-stop.svg [new file with mode: 0644]
vendor/assets/iD/iD/mapillary-js/turn-around.svg [new file with mode: 0755]
vendor/assets/iD/iD/mapillary-js/turn.svg [new file with mode: 0755]
vendor/assets/iD/imagery.js [deleted file]
vendor/assets/iD/presets.js [deleted file]
vendor/assets/leaflet/images/layers-2x.png
vendor/assets/leaflet/images/layers.png
vendor/assets/leaflet/images/marker-icon-2x.png
vendor/assets/leaflet/images/marker-icon.png
vendor/assets/leaflet/images/marker-shadow.png
vendor/assets/leaflet/leaflet.contextmenu.css [new file with mode: 0644]
vendor/assets/leaflet/leaflet.contextmenu.js [new file with mode: 0644]
vendor/assets/leaflet/leaflet.css
vendor/assets/leaflet/leaflet.js
vendor/assets/leaflet/leaflet.locate.js
vendor/assets/leaflet/leaflet.locationfilter.js
vendor/assets/leaflet/leaflet.osm.js
vendor/assets/leaflet/leaflet.polyline.js
vendor/assets/potlatch2/potlatch2.swf
vendor/assets/potlatch2/potlatch2/assets.zip
vendor/assets/potlatch2/potlatch2/locales/af.swf
vendor/assets/potlatch2/potlatch2/locales/ar.swf
vendor/assets/potlatch2/potlatch2/locales/arc.swf
vendor/assets/potlatch2/potlatch2/locales/ast.swf
vendor/assets/potlatch2/potlatch2/locales/az.swf
vendor/assets/potlatch2/potlatch2/locales/ba.swf
vendor/assets/potlatch2/potlatch2/locales/be-tarask.swf
vendor/assets/potlatch2/potlatch2/locales/be.swf
vendor/assets/potlatch2/potlatch2/locales/bg.swf
vendor/assets/potlatch2/potlatch2/locales/bn.swf
vendor/assets/potlatch2/potlatch2/locales/br.swf
vendor/assets/potlatch2/potlatch2/locales/bs.swf
vendor/assets/potlatch2/potlatch2/locales/ca.swf
vendor/assets/potlatch2/potlatch2/locales/ce.swf
vendor/assets/potlatch2/potlatch2/locales/cs_CZ.swf
vendor/assets/potlatch2/potlatch2/locales/cy.swf [new file with mode: 0644]
vendor/assets/potlatch2/potlatch2/locales/da.swf
vendor/assets/potlatch2/potlatch2/locales/de-formal.swf
vendor/assets/potlatch2/potlatch2/locales/de_DE.swf
vendor/assets/potlatch2/potlatch2/locales/diq.swf
vendor/assets/potlatch2/potlatch2/locales/dsb.swf
vendor/assets/potlatch2/potlatch2/locales/el.swf
vendor/assets/potlatch2/potlatch2/locales/en_GB.swf
vendor/assets/potlatch2/potlatch2/locales/en_US.swf
vendor/assets/potlatch2/potlatch2/locales/eo.swf
vendor/assets/potlatch2/potlatch2/locales/es_ES.swf
vendor/assets/potlatch2/potlatch2/locales/et.swf
vendor/assets/potlatch2/potlatch2/locales/eu.swf
vendor/assets/potlatch2/potlatch2/locales/fa.swf
vendor/assets/potlatch2/potlatch2/locales/fi.swf
vendor/assets/potlatch2/potlatch2/locales/fo.swf
vendor/assets/potlatch2/potlatch2/locales/fr_FR.swf
vendor/assets/potlatch2/potlatch2/locales/fur.swf
vendor/assets/potlatch2/potlatch2/locales/ga.swf
vendor/assets/potlatch2/potlatch2/locales/gd.swf
vendor/assets/potlatch2/potlatch2/locales/gl.swf
vendor/assets/potlatch2/potlatch2/locales/grc.swf
vendor/assets/potlatch2/potlatch2/locales/he.swf
vendor/assets/potlatch2/potlatch2/locales/hr.swf
vendor/assets/potlatch2/potlatch2/locales/hsb.swf
vendor/assets/potlatch2/potlatch2/locales/hu.swf
vendor/assets/potlatch2/potlatch2/locales/ia.swf
vendor/assets/potlatch2/potlatch2/locales/id.swf
vendor/assets/potlatch2/potlatch2/locales/is.swf [new file with mode: 0644]
vendor/assets/potlatch2/potlatch2/locales/it_IT.swf
vendor/assets/potlatch2/potlatch2/locales/ja_JP.swf
vendor/assets/potlatch2/potlatch2/locales/ka.swf
vendor/assets/potlatch2/potlatch2/locales/km.swf
vendor/assets/potlatch2/potlatch2/locales/kn.swf
vendor/assets/potlatch2/potlatch2/locales/ko.swf
vendor/assets/potlatch2/potlatch2/locales/krc.swf
vendor/assets/potlatch2/potlatch2/locales/ksh.swf
vendor/assets/potlatch2/potlatch2/locales/ku-latn.swf
vendor/assets/potlatch2/potlatch2/locales/ky.swf
vendor/assets/potlatch2/potlatch2/locales/lb.swf
vendor/assets/potlatch2/potlatch2/locales/lez.swf
vendor/assets/potlatch2/potlatch2/locales/lt.swf
vendor/assets/potlatch2/potlatch2/locales/lv.swf
vendor/assets/potlatch2/potlatch2/locales/lzz.swf
vendor/assets/potlatch2/potlatch2/locales/mk.swf
vendor/assets/potlatch2/potlatch2/locales/mr.swf
vendor/assets/potlatch2/potlatch2/locales/ms.swf
vendor/assets/potlatch2/potlatch2/locales/nb_NO.swf
vendor/assets/potlatch2/potlatch2/locales/nl_NL.swf
vendor/assets/potlatch2/potlatch2/locales/nn_NO.swf
vendor/assets/potlatch2/potlatch2/locales/oc.swf
vendor/assets/potlatch2/potlatch2/locales/pa.swf
vendor/assets/potlatch2/potlatch2/locales/pl_PL.swf
vendor/assets/potlatch2/potlatch2/locales/ps.swf
vendor/assets/potlatch2/potlatch2/locales/pt_BR.swf
vendor/assets/potlatch2/potlatch2/locales/pt_PT.swf
vendor/assets/potlatch2/potlatch2/locales/ro.swf
vendor/assets/potlatch2/potlatch2/locales/ru.swf
vendor/assets/potlatch2/potlatch2/locales/rue.swf
vendor/assets/potlatch2/potlatch2/locales/sah.swf
vendor/assets/potlatch2/potlatch2/locales/scn.swf
vendor/assets/potlatch2/potlatch2/locales/sk.swf
vendor/assets/potlatch2/potlatch2/locales/sl.swf
vendor/assets/potlatch2/potlatch2/locales/sq.swf
vendor/assets/potlatch2/potlatch2/locales/sr-ec.swf
vendor/assets/potlatch2/potlatch2/locales/sr-el.swf
vendor/assets/potlatch2/potlatch2/locales/sv_SE.swf
vendor/assets/potlatch2/potlatch2/locales/ta.swf
vendor/assets/potlatch2/potlatch2/locales/te.swf
vendor/assets/potlatch2/potlatch2/locales/tl.swf
vendor/assets/potlatch2/potlatch2/locales/tly.swf
vendor/assets/potlatch2/potlatch2/locales/tr.swf
vendor/assets/potlatch2/potlatch2/locales/tyv.swf
vendor/assets/potlatch2/potlatch2/locales/tzm.swf
vendor/assets/potlatch2/potlatch2/locales/uk.swf
vendor/assets/potlatch2/potlatch2/locales/vi_VN.swf
vendor/assets/potlatch2/potlatch2/locales/vo.swf
vendor/assets/potlatch2/potlatch2/locales/yi.swf
vendor/assets/potlatch2/potlatch2/locales/zh_CN.swf
vendor/assets/potlatch2/potlatch2/locales/zh_TW.swf

index c576a560fbb160af75b4765a82cc7b427cc1a837..29f21fde6f1178be3dd239791da197b071f89b44 100644 (file)
--- a/.mailmap
+++ b/.mailmap
@@ -5,4 +5,6 @@ Grant Slater <openstreetmap@firefishy.com> <github@firefishy.com>
 Harry Wood <git@harrywood.co.uk> <mail@harrywood.co.uk> <github@onlineanimals.co.uk>
 Kai Krueger <kakrueger@gmail.com> <kai@aiputerlx.(none)>
 Michael Glanznig <nebulon42@yandex.com>
+Petr Kadlec <mormegil@centrum.cz>
 Richard Fairhurst <richard@systemeD.net> <richard@systemed.net>
+Simon Poole <simon@poole.ch> <simon@rails-dev.poole.ch>
index 213eb27aae9a6d490cf78e0b8f9f9401ae2c060f..55be8141cf31c53115cecdcbe08ffd8d266b9089 100644 (file)
@@ -1,24 +1,73 @@
 inherit_from: .rubocop_todo.yml
 
 AllCops:
-   RunRailsCops: true
+  Include:
+    - '**/*.gemspec'
+    - '**/*.podspec'
+    - '**/*.jbuilder'
+    - '**/*.rake'
+    - '**/*.opal'
+    - '**/config.ru'
+    - '**/Gemfile'
+    - '**/Rakefile'
+    - '**/Capfile'
+    - '**/Guardfile'
+    - '**/Podfile'
+    - '**/Thorfile'
+    - '**/Vagrantfile'
+    - '**/Berksfile'
+    - '**/Cheffile'
+    - '**/Vagabondfile'
+    - '**/Fastfile'
+    - '**/*.builder'
 
-Style/BracesAroundHashParameters:
-  EnforcedStyle: context_dependent
+Rails:
+  Enabled: true
 
-Style/ExtraSpacing:
+Layout/ExtraSpacing:
   AllowForAlignment: true
 
-Style/FileName:
+Lint/PercentStringArray:
+  Exclude:
+    - 'config/initializers/secure_headers.rb'
+    - 'app/controllers/site_controller.rb'
+
+Naming/FileName:
   Exclude:
     - 'script/deliver-message'
     - 'script/locale/reload-languages'
     - 'script/update-spam-blocks'
 
+Rails/ApplicationRecord:
+  Enabled: false
+
+Rails/HasManyOrHasOneDependent:
+  Enabled: false
+
+Rails/HttpPositionalArguments:
+  Enabled: false
+
+Rails/SkipsModelValidations:
+  Exclude:
+    - 'db/migrate/*.rb'
+    - 'app/controllers/user_controller.rb'
+
+Style/BracesAroundHashParameters:
+  EnforcedStyle: context_dependent
+
+Style/FormatStringToken:
+  EnforcedStyle: template
+
+Style/IfInsideElse:
+  Enabled: false
+
 Style/GlobalVars:
   Exclude:
     - 'lib/quad_tile/extconf.rb'
-    
+
+Style/GuardClause:
+  Enabled: false
+
 Style/HashSyntax:
   EnforcedStyle: hash_rockets
   Exclude:
@@ -27,3 +76,6 @@ Style/HashSyntax:
 
 Style/StringLiterals:
   EnforcedStyle: double_quotes
+
+Style/SymbolArray:
+  EnforcedStyle: brackets
index 287fcd9f9611a51f38747ca3b2f93ec969100592..b4104079cb75734dd1f5802d9a4401482fe7e598 100644 (file)
@@ -1,11 +1,19 @@
 # This configuration was generated by
 # `rubocop --auto-gen-config`
-# on 2015-08-18 20:27:49 +0100 using RuboCop version 0.33.0.
+# on 2017-10-05 10:04:24 +0100 using RuboCop version 0.50.0.
 # The point is for the user to remove these configuration records
 # one by one as the offenses are removed from the code base.
 # Note that changes in the inspected code, or installation of new
 # versions of RuboCop, may require this file to be generated again.
 
+# Offense count: 1
+# Cop supports --auto-correct.
+# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
+# SupportedStyles: aligned, indented
+Layout/MultilineOperationIndentation:
+  Exclude:
+    - 'lib/bounding_box.rb'
+
 # Offense count: 34
 Lint/AmbiguousOperator:
   Exclude:
@@ -14,11 +22,11 @@ Lint/AmbiguousOperator:
     - 'test/lib/bounding_box_test.rb'
     - 'test/lib/country_test.rb'
 
-# Offense count: 115
+# Offense count: 124
 Lint/AmbiguousRegexpLiteral:
   Enabled: false
 
-# Offense count: 29
+# Offense count: 32
 # Configuration parameters: AllowSafeAssignment.
 Lint/AssignmentInCondition:
   Exclude:
@@ -36,113 +44,161 @@ Lint/AssignmentInCondition:
     - 'lib/osm.rb'
     - 'script/deliver-message'
 
-# Offense count: 3
-Lint/FormatParameterMismatch:
-  Exclude:
-    - 'app/controllers/swf_controller.rb'
-
-# Offense count: 5
+# Offense count: 4
 Lint/HandleExceptions:
   Exclude:
     - 'app/controllers/amf_controller.rb'
     - 'app/controllers/user_controller.rb'
-    - 'config/initializers/session.rb'
 
-# Offense count: 8
-Lint/ParenthesesAsGroupedExpression:
+# Offense count: 3
+Lint/InterpolationCheck:
   Exclude:
-    - 'test/controllers/amf_controller_test.rb'
-    - 'test/lib/bounding_box_test.rb'
-    - 'test/models/user_preference_test.rb'
+    - 'test/controllers/node_controller_test.rb'
+
+# Offense count: 2
+Lint/RescueWithoutErrorClass:
+  Exclude:
+    - 'app/helpers/browse_helper.rb'
+
+# Offense count: 2
+Lint/ShadowingOuterLocalVariable:
+  Exclude:
+    - 'app/views/changeset/list.atom.builder'
 
-# Offense count: 671
+# Offense count: 666
 Metrics/AbcSize:
-  Max: 277
+  Max: 280
+
+# Offense count: 41
+# Configuration parameters: CountComments, ExcludedMethods.
+Metrics/BlockLength:
+  Max: 240
 
 # Offense count: 12
+# Configuration parameters: CountBlocks.
 Metrics/BlockNesting:
   Max: 5
 
-# Offense count: 62
+# Offense count: 63
 # Configuration parameters: CountComments.
 Metrics/ClassLength:
-  Max: 1653
+  Max: 1796
 
-# Offense count: 67
+# Offense count: 71
 Metrics/CyclomaticComplexity:
   Max: 20
 
-# Offense count: 2535
-# Configuration parameters: AllowURI, URISchemes.
+# Offense count: 3004
+# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
+# URISchemes: http, https
 Metrics/LineLength:
-  Max: 962
+  Max: 1073
 
-# Offense count: 628
+# Offense count: 675
 # Configuration parameters: CountComments.
 Metrics/MethodLength:
   Max: 179
 
-# Offense count: 1
+# Offense count: 2
 # Configuration parameters: CountComments.
 Metrics/ModuleLength:
-  Max: 126
+  Max: 147
 
 # Offense count: 4
 # Configuration parameters: CountKeywordArgs.
 Metrics/ParameterLists:
   Max: 9
 
-# Offense count: 69
+# Offense count: 71
 Metrics/PerceivedComplexity:
   Max: 23
 
+# Offense count: 5
+Naming/AccessorMethodName:
+  Exclude:
+    - 'app/controllers/application_controller.rb'
+    - 'app/helpers/title_helper.rb'
+    - 'app/models/old_way.rb'
+    - 'lib/osm.rb'
+    - 'lib/potlatch.rb'
+
+# Offense count: 8
+# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
+# NamePrefix: is_, has_, have_
+# NamePrefixBlacklist: is_, has_, have_
+# NameWhitelist: is_a?
+Naming/PredicateName:
+  Exclude:
+    - 'spec/**/*'
+    - 'app/models/changeset.rb'
+    - 'app/models/old_node.rb'
+    - 'app/models/old_relation.rb'
+    - 'app/models/old_way.rb'
+    - 'app/models/user.rb'
+    - 'lib/classic_pagination/pagination.rb'
+
 # Offense count: 2
 # Configuration parameters: Include.
+# Include: app/**/*.rb, config/**/*.rb, lib/**/*.rb
+Rails/Exit:
+  Exclude:
+    - 'lib/**/*.rake'
+    - 'lib/daemons/gpx_import.rb'
+
+# Offense count: 2
+# Configuration parameters: Include.
+# Include: app/models/**/*.rb
 Rails/HasAndBelongsToMany:
   Exclude:
     - 'app/models/changeset.rb'
     - 'app/models/user.rb'
 
-# Offense count: 66
+# Offense count: 5
+# Configuration parameters: Include.
+# Include: db/migrate/*.rb
+Rails/NotNullColumn:
+  Exclude:
+    - 'db/migrate/002_cleanup_osm_db.rb'
+    - 'db/migrate/020_populate_node_tags_and_remove.rb'
+    - 'db/migrate/021_move_to_innodb.rb'
+    - 'db/migrate/025_add_end_time_to_changesets.rb'
+    - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
+
+# Offense count: 20
+Rails/OutputSafety:
+  Exclude:
+    - 'app/controllers/user_controller.rb'
+    - 'app/helpers/application_helper.rb'
+    - 'app/helpers/changeset_helper.rb'
+    - 'app/helpers/geocoder_helper.rb'
+    - 'app/helpers/note_helper.rb'
+    - 'app/helpers/open_graph_helper.rb'
+    - 'app/helpers/user_blocks_helper.rb'
+    - 'app/helpers/user_roles_helper.rb'
+    - 'lib/rich_text.rb'
+    - 'test/helpers/application_helper_test.rb'
+
+# Offense count: 86
 # Configuration parameters: EnforcedStyle, SupportedStyles.
+# SupportedStyles: strict, flexible
 Rails/TimeZone:
   Enabled: false
 
-# Offense count: 5
-Style/AccessorMethodName:
-  Exclude:
-    - 'app/controllers/application_controller.rb'
-    - 'app/helpers/title_helper.rb'
-    - 'app/models/old_way.rb'
-    - 'lib/osm.rb'
-    - 'lib/potlatch.rb'
-
 # Offense count: 1
 Style/AsciiComments:
   Exclude:
     - 'test/models/message_test.rb'
 
-# Offense count: 310
+# Offense count: 219
 Style/Documentation:
   Enabled: false
 
-# Offense count: 38
-# Configuration parameters: MinBodyLength.
-Style/GuardClause:
+# Offense count: 1
+# Cop supports --auto-correct.
+# Configuration parameters: MaxLineLength.
+Style/IfUnlessModifier:
   Exclude:
-    - 'app/controllers/application_controller.rb'
-    - 'app/controllers/diary_entry_controller.rb'
-    - 'app/controllers/message_controller.rb'
-    - 'app/controllers/notes_controller.rb'
-    - 'app/controllers/site_controller.rb'
-    - 'app/controllers/user_blocks_controller.rb'
-    - 'app/controllers/user_controller.rb'
-    - 'app/controllers/user_roles_controller.rb'
-    - 'app/helpers/application_helper.rb'
-    - 'app/models/changeset.rb'
-    - 'app/models/user.rb'
-    - 'lib/diff_reader.rb'
-    - 'lib/object_metadata.rb'
+    - 'app/controllers/way_controller.rb'
 
 # Offense count: 60
 # Cop supports --auto-correct.
@@ -159,46 +215,15 @@ Style/LineEndConcatenation:
     - 'test/controllers/relation_controller_test.rb'
     - 'test/controllers/way_controller_test.rb'
 
-# Offense count: 69
+# Offense count: 75
 # Cop supports --auto-correct.
+# Configuration parameters: Strict.
 Style/NumericLiterals:
   MinDigits: 11
 
-# Offense count: 42
+# Offense count: 95
 # Cop supports --auto-correct.
-Style/PerlBackrefs:
-  Exclude:
-    - 'app/controllers/amf_controller.rb'
-    - 'app/controllers/application_controller.rb'
-    - 'app/helpers/browse_helper.rb'
-    - 'config/initializers/paperclip.rb'
-    - 'lib/id.rb'
-    - 'lib/potlatch.rb'
-    - 'test/lib/i18n_test.rb'
-
-# Offense count: 8
-# Configuration parameters: NamePrefix, NamePrefixBlacklist.
-Style/PredicateName:
-  Exclude:
-    - 'app/models/changeset.rb'
-    - 'app/models/old_node.rb'
-    - 'app/models/old_relation.rb'
-    - 'app/models/old_way.rb'
-    - 'app/models/user.rb'
-    - 'lib/classic_pagination/pagination.rb'
-
-# Offense count: 97
 # Configuration parameters: EnforcedStyle, SupportedStyles.
+# SupportedStyles: compact, exploded
 Style/RaiseArgs:
   Enabled: false
-
-# Offense count: 2
-Style/RescueModifier:
-  Exclude:
-    - 'app/helpers/browse_helper.rb'
-
-# Offense count: 8
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, SupportedStyles.
-Style/StringLiteralsInInterpolation:
-  Enabled: false
index 1af42245277b028b42beee4c463596c2500d8769..48ddb4a1d09d4e3f1ca0b508c123ee39b0a96b31 100644 (file)
@@ -1,13 +1,13 @@
 sudo: false
 language: ruby
 rvm:
-  - 1.9.3
+  - 2.3.1
 cache: bundler
 addons:
-  postgresql: 9.1
+  postgresql: 9.5
   apt:
     packages:
-      - postgresql-server-dev-9.1
+      - postgresql-server-dev-9.5
 services:
   - memcached
 env:
@@ -18,12 +18,13 @@ before_script:
   - psql -U postgres -c "CREATE DATABASE openstreetmap"
   - psql -U postgres -c "CREATE EXTENSION btree_gist" openstreetmap
   - make -C db/functions libpgosm.so
-  - psql -U postgres -c "CREATE FUNCTION maptile_for_point(int8, int8, int4) RETURNS int4 AS '${PWD}/db/functions/libpgosm', 'maptile_for_point' LANGUAGE C STRICT" openstreetmap
-  - psql -U postgres -c "CREATE FUNCTION tile_for_point(int4, int4) RETURNS int8 AS '${PWD}/db/functions/libpgosm', 'tile_for_point' LANGUAGE C STRICT" openstreetmap
-  - psql -U postgres -c "CREATE FUNCTION xid_to_int4(xid) RETURNS int4 AS '${PWD}/db/functions/libpgosm', 'xid_to_int4' LANGUAGE C STRICT" openstreetmap
+  - ln db/functions/libpgosm.so /tmp
+  - psql -U postgres -c "CREATE FUNCTION maptile_for_point(int8, int8, int4) RETURNS int4 AS '/tmp/libpgosm', 'maptile_for_point' LANGUAGE C STRICT" openstreetmap
+  - psql -U postgres -c "CREATE FUNCTION tile_for_point(int4, int4) RETURNS int8 AS '/tmp/libpgosm', 'tile_for_point' LANGUAGE C STRICT" openstreetmap
+  - psql -U postgres -c "CREATE FUNCTION xid_to_int4(xid) RETURNS int4 AS '/tmp/libpgosm', 'xid_to_int4' LANGUAGE C STRICT" openstreetmap
   - cp config/travis.database.yml config/database.yml
   - bundle exec rake db:migrate
 script:
   - bundle exec rubocop -f fuubar
   - bundle exec rake jshint
-  - bundle exec rake test
+  - bundle exec rake test:db
index 9da33fe8c21cfa3d78cfadbd2486962a4c7e964b..477e8c63f5f9272b2fb99e27bddeb6478b286168 100644 (file)
@@ -6,7 +6,7 @@
 When writing code it is generally a good idea to try and match your
 formatting to that of any existing code in the same file, or to other
 similar files if you are writing new code. Consistency of layout is
-far more important that the layout itself as it makes reading code
+far more important than the layout itself as it makes reading code
 much easier.
 
 One golden rule of formatting -- please don't use tabs in your code
diff --git a/FAQ.md b/FAQ.md
new file mode 100644 (file)
index 0000000..423ef70
--- /dev/null
+++ b/FAQ.md
@@ -0,0 +1,30 @@
+## How do I create a banner to promote my OpenStreetMap event?
+
+We occasionally display banner images on the main page of [openstreetmap.org](https://www.openstreetmap.org/) to
+promote a large OpenStreetMap focused conference or host a worldwide donation
+drive.  This is a great way to reach a lot of people!
+
+1. Please review [openstreetmap/operations#150](https://github.com/openstreetmap/operations/issues/150) to
+know whether your event qualifies for a front-page banner.
+
+2. Create the banner image.  Some guidelines:
+  * Image should be 350px wide (exactly) x 350px tall (or shorter).
+  * Use a standard web image format (.gif, .jpg, .png)
+  * Note that a close 'X' button will be drawn over the top right 60x60px
+  corner of the banner, so please do not put anything important in that space.
+
+3. Prepare a pull request which includes the following:
+  * The banner should be saved under the
+  [`app/assets/images/banners/`](https://github.com/openstreetmap/openstreetmap-website/tree/master/app/assets/images/banners) folder, and should have a name that makes it clear what it is for (e.g. `donate-2017.jpg`)
+  * Edit [`config/banners.yml`](https://github.com/openstreetmap/openstreetmap-website/blob/master/config/banners.yml)
+  to contain an entry for the event banner.  It should contain the following:
+    * `id` - a unique identifier (e.g. `donate2017`)
+    * `alt` - alt name for the image (e.g. `OpenStreetMap Funding Drive 2017`)
+    * `link` - URL for your event page (e.g. `https://donate.openstreetmap.org/`)
+    * `img` - the filename for the banner image (e.g. `banners/donate-2017.jpg`)
+    * `enddate` - the final date that the banner will be shown (e.g. `2017-oct-31`)
+  * (optional) Feel free to cleanup the old images from the `app/assets/images/banners/`
+  folder and old entries in the `config/banners.yml` file.
+
+See [PR #1296](https://github.com/openstreetmap/openstreetmap-website/pull/1296)
+as an example.
diff --git a/Gemfile b/Gemfile
index 8f81ab3ec943e7b46bbd6eea9cb15eb374e93179..fee5fa4d106d28e32e56d3821e65822f63135b50 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -1,7 +1,7 @@
 source "https://rubygems.org"
 
 # Require rails
-gem "rails", "4.2.5"
+gem "rails", "5.1.4"
 
 # Require things which have moved to gems in ruby 1.9
 gem "bigdecimal", "~> 1.1.0", :platforms => :ruby_19
@@ -22,7 +22,7 @@ gem "sass-rails", "~> 5.0"
 gem "uglifier", ">= 1.3.0"
 
 # Use CoffeeScript for .js.coffee assets and views
-gem "coffee-rails", "~> 4.1.0"
+gem "coffee-rails", "~> 4.2"
 
 # Use jquery as the JavaScript library
 gem "jquery-rails"
@@ -32,33 +32,39 @@ gem "jquery-rails"
 gem "jsonify-rails"
 
 # Use R2 for RTL conversion
-gem "r2"
+gem "r2", "~> 0.2.7"
 
 # Use autoprefixer to generate CSS prefixes
 gem "autoprefixer-rails"
 
 # Use image_optim to optimise images
-gem "image_optim", ">= 0.22.0"
+gem "image_optim_rails"
 
 # Load rails plugins
-gem "rails-i18n", "~> 4.0.0"
+gem "actionpack-page_caching"
+gem "composite_primary_keys", "~> 10.0.0"
 gem "dynamic_form"
-gem "rinku", ">= 1.2.2", :require => "rails_rinku"
-gem "oauth-plugin", ">= 0.5.1"
-gem "validates_email_format_of", ">= 1.5.1"
-gem "composite_primary_keys", "~> 8.1.0"
 gem "http_accept_language", "~> 2.0.0"
+gem "i18n-js", ">= 3.0.0"
+gem "oauth-plugin", ">= 0.5.1"
+gem "openstreetmap-deadlock_retry", ">= 1.3.0", :require => "deadlock_retry"
 gem "paperclip", "~> 4.0"
-gem "deadlock_retry", ">= 1.2.0"
-gem "i18n-js", ">= 3.0.0.rc10"
 gem "rack-cors"
-gem "actionpack-page_caching"
+gem "rails-i18n", "~> 4.0.0"
+gem "record_tag_helper"
+gem "rinku", ">= 1.2.2", :require => "rails_rinku"
+gem "validates_email_format_of", ">= 1.5.1"
+
+# Sanitise URIs
+gem "rack-uri_sanitizer"
 
 # Omniauth for authentication
 gem "omniauth"
-gem "omniauth-openid"
-gem "omniauth-google-oauth2", ">= 0.2.7"
 gem "omniauth-facebook"
+gem "omniauth-github"
+gem "omniauth-google-oauth2", ">= 0.2.7"
+gem "omniauth-mediawiki", ">= 0.0.3"
+gem "omniauth-openid"
 gem "omniauth-windowslive"
 
 # Markdown formatting support
@@ -68,8 +74,8 @@ gem "redcarpet"
 gem "libxml-ruby", ">= 2.0.5", :require => "libxml"
 
 # Use for HTML sanitisation
-gem "sanitize"
 gem "htmlentities"
+gem "sanitize"
 
 # Load SystemTimer for implementing request timeouts
 gem "SystemTimer", ">= 1.1.3", :require => "system_timer", :platforms => :ruby_18
@@ -77,33 +83,45 @@ gem "SystemTimer", ">= 1.1.3", :require => "system_timer", :platforms => :ruby_1
 # Load faraday for mockable HTTP client
 gem "faraday"
 
-# Load httpclient and soap4r for SOAP support for Quova GeoIP queries
-gem "httpclient"
-gem "soap4r-ruby1.9"
+# Load geoip for querying Maxmind GeoIP database
+gem "geoip"
+
+# Load rotp to generate TOTP tokens
+gem "rotp"
 
 # Load memcache client in case we are using it
 gem "dalli"
 gem "kgio"
 
+# Load secure_headers for Content-Security-Policy support
+gem "secure_headers"
+
+# Load canonical-rails to generate canonical URLs
+gem "canonical-rails"
+
 # Used to generate logstash friendly log files
 gem "logstasher"
 
 # Gems useful for development
 group :development do
+  gem "annotate"
+  gem "listen"
   gem "vendorer"
 end
 
 # Gems needed for running tests
 group :test do
-  gem "rubocop"
-  gem "timecop"
   gem "minitest", "~> 5.1", :platforms => [:ruby_19, :ruby_20]
+  gem "rails-controller-testing"
+  gem "rubocop"
+  gem "webmock"
 end
 
 # Needed in development as well so rake can see konacha tasks
 group :development, :test do
+  gem "coveralls", :require => false
+  gem "factory_bot_rails"
   gem "jshint"
-  gem "konacha"
+  #  gem "konacha"
   gem "poltergeist"
-  gem "coveralls", :require => false
 end
index 18015c244f9d307ce8ed5dd7d2328fe32cdb2a75..08e6c60b440e9f039c303bb5152d5d45c0540f94 100644 (file)
@@ -2,159 +2,173 @@ GEM
   remote: https://rubygems.org/
   specs:
     SystemTimer (1.2.3)
-    actionmailer (4.2.5)
-      actionpack (= 4.2.5)
-      actionview (= 4.2.5)
-      activejob (= 4.2.5)
+    actioncable (5.1.4)
+      actionpack (= 5.1.4)
+      nio4r (~> 2.0)
+      websocket-driver (~> 0.6.1)
+    actionmailer (5.1.4)
+      actionpack (= 5.1.4)
+      actionview (= 5.1.4)
+      activejob (= 5.1.4)
       mail (~> 2.5, >= 2.5.4)
-      rails-dom-testing (~> 1.0, >= 1.0.5)
-    actionpack (4.2.5)
-      actionview (= 4.2.5)
-      activesupport (= 4.2.5)
-      rack (~> 1.6)
-      rack-test (~> 0.6.2)
-      rails-dom-testing (~> 1.0, >= 1.0.5)
+      rails-dom-testing (~> 2.0)
+    actionpack (5.1.4)
+      actionview (= 5.1.4)
+      activesupport (= 5.1.4)
+      rack (~> 2.0)
+      rack-test (>= 0.6.3)
+      rails-dom-testing (~> 2.0)
       rails-html-sanitizer (~> 1.0, >= 1.0.2)
-    actionpack-page_caching (1.0.2)
-      actionpack (>= 4.0.0, < 5)
-    actionview (4.2.5)
-      activesupport (= 4.2.5)
+    actionpack-page_caching (1.1.0)
+      actionpack (>= 4.0.0, < 6)
+    actionview (5.1.4)
+      activesupport (= 5.1.4)
       builder (~> 3.1)
-      erubis (~> 2.7.0)
-      rails-dom-testing (~> 1.0, >= 1.0.5)
-      rails-html-sanitizer (~> 1.0, >= 1.0.2)
-    activejob (4.2.5)
-      activesupport (= 4.2.5)
-      globalid (>= 0.3.0)
-    activemodel (4.2.5)
-      activesupport (= 4.2.5)
-      builder (~> 3.1)
-    activerecord (4.2.5)
-      activemodel (= 4.2.5)
-      activesupport (= 4.2.5)
-      arel (~> 6.0)
-    activesupport (4.2.5)
+      erubi (~> 1.4)
+      rails-dom-testing (~> 2.0)
+      rails-html-sanitizer (~> 1.0, >= 1.0.3)
+    activejob (5.1.4)
+      activesupport (= 5.1.4)
+      globalid (>= 0.3.6)
+    activemodel (5.1.4)
+      activesupport (= 5.1.4)
+    activerecord (5.1.4)
+      activemodel (= 5.1.4)
+      activesupport (= 5.1.4)
+      arel (~> 8.0)
+    activesupport (5.1.4)
+      concurrent-ruby (~> 1.0, >= 1.0.2)
       i18n (~> 0.7)
-      json (~> 1.7, >= 1.7.7)
       minitest (~> 5.1)
-      thread_safe (~> 0.3, >= 0.3.4)
       tzinfo (~> 1.1)
-    addressable (2.3.8)
-    arel (6.0.3)
-    ast (2.1.0)
-    astrolabe (1.3.1)
-      parser (~> 2.2)
-    autoprefixer-rails (6.1.0.1)
+    addressable (2.5.2)
+      public_suffix (>= 2.0.2, < 4.0)
+    annotate (2.7.2)
+      activerecord (>= 3.2, < 6.0)
+      rake (>= 10.4, < 13.0)
+    arel (8.0.0)
+    ast (2.3.0)
+    autoprefixer-rails (7.1.6)
       execjs
-      json
     bigdecimal (1.1.0)
-    builder (3.2.2)
-    capybara (2.5.0)
-      mime-types (>= 1.16)
+    builder (3.2.3)
+    canonical-rails (0.2.1)
+      rails (>= 4.1, < 5.2)
+    capybara (2.15.4)
+      addressable
+      mini_mime (>= 0.1.3)
       nokogiri (>= 1.3.3)
       rack (>= 1.0.0)
       rack-test (>= 0.5.4)
       xpath (~> 2.0)
-    climate_control (0.0.3)
-      activesupport (>= 3.0)
+    climate_control (0.2.0)
     cliver (0.3.2)
     cocaine (0.5.8)
       climate_control (>= 0.0.3, < 1.0)
-    coffee-rails (4.1.0)
+    coffee-rails (4.2.2)
       coffee-script (>= 2.2.0)
-      railties (>= 4.0.0, < 5.0)
+      railties (>= 4.0.0)
     coffee-script (2.4.1)
       coffee-script-source
       execjs
-    coffee-script-source (1.10.0)
-    colorize (0.7.7)
-    composite_primary_keys (8.1.1)
-      activerecord (~> 4.2.0)
-    coveralls (0.8.9)
-      json (~> 1.8)
-      rest-client (>= 1.6.8, < 2)
-      simplecov (~> 0.10.0)
+    coffee-script-source (1.12.2)
+    composite_primary_keys (10.0.1)
+      activerecord (~> 5.1.0)
+    concurrent-ruby (1.0.5)
+    coveralls (0.8.21)
+      json (>= 1.8, < 3)
+      simplecov (~> 0.14.1)
       term-ansicolor (~> 1.3)
-      thor (~> 0.19.1)
-      tins (~> 1.6.0)
+      thor (~> 0.19.4)
+      tins (~> 1.6)
+    crack (0.4.3)
+      safe_yaml (~> 1.0.0)
     crass (1.0.2)
-    dalli (2.7.4)
-    deadlock_retry (1.2.0)
+    dalli (2.7.6)
     docile (1.1.5)
-    domain_name (0.5.25)
-      unf (>= 0.0.5, < 1.0.0)
     dynamic_form (1.1.4)
-    erubis (2.7.0)
-    execjs (2.6.0)
-    exifr (1.2.3.1)
-    faraday (0.9.2)
+    erubi (1.7.0)
+    execjs (2.7.0)
+    exifr (1.3.2)
+    factory_bot (4.8.2)
+      activesupport (>= 3.0.0)
+    factory_bot_rails (4.8.2)
+      factory_bot (~> 4.8.2)
+      railties (>= 3.0.0)
+    faraday (0.12.2)
       multipart-post (>= 1.2, < 3)
-    fspath (2.1.1)
-    globalid (0.3.6)
-      activesupport (>= 4.1.0)
-    hashie (3.4.3)
+    ffi (1.9.18)
+    fspath (3.1.0)
+    geoip (1.6.3)
+    globalid (0.4.1)
+      activesupport (>= 4.2.0)
+    hashdiff (0.3.7)
+    hashie (3.5.6)
     htmlentities (4.3.4)
-    http-cookie (1.0.2)
-      domain_name (~> 0.5)
     http_accept_language (2.0.5)
-    httpclient (2.7.0.1)
-    i18n (0.7.0)
-    i18n-js (3.0.0.rc11)
-      i18n (~> 0.6)
-    image_optim (0.22.0)
+    i18n (0.9.0)
+      concurrent-ruby (~> 1.0)
+    i18n-js (3.0.2)
+      i18n (~> 0.6, >= 0.6.6)
+    image_optim (0.25.0)
       exifr (~> 1.2, >= 1.2.2)
-      fspath (~> 2.1)
-      image_size (~> 1.3)
+      fspath (~> 3.0)
+      image_size (~> 1.5)
       in_threads (~> 1.3)
       progress (~> 3.0, >= 3.0.1)
-    image_size (1.4.1)
-    in_threads (1.3.1)
-    jquery-rails (4.0.5)
-      rails-dom-testing (~> 1.0)
+    image_optim_rails (0.4.1)
+      image_optim (~> 0.24)
+      rails
+      sprockets
+    image_size (1.5.0)
+    in_threads (1.4.0)
+    jquery-rails (4.3.1)
+      rails-dom-testing (>= 1, < 3)
       railties (>= 4.2.0)
       thor (>= 0.14, < 2.0)
-    jshint (1.4.0)
+    jshint (1.5.0)
       execjs (>= 1.4.0)
       multi_json (~> 1.0)
       therubyracer (~> 0.12.1)
-    json (1.8.3)
+    json (2.1.0)
     jsonify (0.3.1)
       multi_json (~> 1.0)
     jsonify-rails (0.3.2)
       actionpack
       jsonify (< 0.4.0)
-    jwt (1.5.2)
-    kgio (2.10.0)
-    konacha (3.7.0)
-      actionpack (>= 3.1, < 5)
-      capybara
-      colorize
-      railties (>= 3.1, < 5)
-      sprockets (>= 2, < 4)
-      tilt
-    libv8 (3.16.14.13)
-    libxml-ruby (2.8.0)
+    jwt (1.5.6)
+    kgio (2.11.0)
+    libv8 (3.16.14.19)
+    libxml-ruby (3.0.0)
+    listen (3.1.5)
+      rb-fsevent (~> 0.9, >= 0.9.4)
+      rb-inotify (~> 0.9, >= 0.9.7)
+      ruby_dep (~> 1.2)
     logstash-event (1.2.02)
-    logstasher (0.8.6)
-      activerecord (>= 3.0)
-      activesupport (>= 3.0)
+    logstasher (1.2.2)
+      activesupport (>= 4.0)
       logstash-event (~> 1.2.0)
       request_store
-    loofah (2.0.3)
+    loofah (2.1.1)
+      crass (~> 1.0.2)
       nokogiri (>= 1.5.9)
-    mail (2.6.3)
-      mime-types (>= 1.16, < 3)
-    mime-types (2.99)
+    mail (2.6.6)
+      mime-types (>= 1.16, < 4)
+    method_source (0.9.0)
+    mime-types (3.1)
+      mime-types-data (~> 3.2015)
+    mime-types-data (3.2016.0521)
     mimemagic (0.3.0)
-    mini_portile (0.6.2)
-    minitest (5.8.3)
-    multi_json (1.11.2)
-    multi_xml (0.5.5)
+    mini_mime (0.1.4)
+    mini_portile2 (2.3.0)
+    minitest (5.10.3)
+    multi_json (1.12.2)
+    multi_xml (0.6.0)
     multipart-post (2.0.0)
-    netrc (0.11.0)
-    nokogiri (1.6.6.4)
-      mini_portile (~> 0.6.0)
-    nokogumbo (1.4.1)
+    nio4r (2.1.0)
+    nokogiri (1.8.1)
+      mini_portile2 (~> 2.3.0)
+    nokogumbo (1.4.13)
       nokogiri
     oauth (0.4.7)
     oauth-plugin (0.5.1)
@@ -162,151 +176,177 @@ GEM
       oauth (~> 0.4.4)
       oauth2 (>= 0.5.0)
       rack
-    oauth2 (1.0.0)
-      faraday (>= 0.8, < 0.10)
+    oauth2 (1.4.0)
+      faraday (>= 0.8, < 0.13)
       jwt (~> 1.0)
       multi_json (~> 1.3)
       multi_xml (~> 0.5)
-      rack (~> 1.2)
-    omniauth (1.2.2)
-      hashie (>= 1.2, < 4)
-      rack (~> 1.0)
-    omniauth-facebook (3.0.0)
+      rack (>= 1.2, < 3)
+    omniauth (1.7.1)
+      hashie (>= 3.4.6, < 3.6.0)
+      rack (>= 1.6.2, < 3)
+    omniauth-facebook (4.0.0)
       omniauth-oauth2 (~> 1.2)
-    omniauth-google-oauth2 (0.2.10)
-      addressable (~> 2.3)
-      jwt (~> 1.0)
+    omniauth-github (1.3.0)
+      omniauth (~> 1.5)
+      omniauth-oauth2 (>= 1.4.0, < 2.0)
+    omniauth-google-oauth2 (0.5.2)
+      jwt (~> 1.5)
       multi_json (~> 1.3)
       omniauth (>= 1.1.1)
-      omniauth-oauth2 (~> 1.3.1)
-    omniauth-oauth2 (1.3.1)
+      omniauth-oauth2 (>= 1.3.1)
+    omniauth-mediawiki (0.0.3)
+      jwt (~> 1.0)
+      omniauth-oauth (~> 1.0)
+    omniauth-oauth (1.1.0)
+      oauth
+      omniauth (~> 1.0)
+    omniauth-oauth2 (1.4.0)
       oauth2 (~> 1.0)
       omniauth (~> 1.2)
     omniauth-openid (1.0.1)
       omniauth (~> 1.0)
       rack-openid (~> 1.3.1)
-    omniauth-windowslive (0.0.9.1)
-      multi_json (>= 1.0.3)
-      omniauth-oauth2 (~> 1.0)
-    paperclip (4.3.2)
+    omniauth-windowslive (0.0.12)
+      multi_json (~> 1.12)
+      omniauth-oauth2 (~> 1.4)
+    openstreetmap-deadlock_retry (1.3.0)
+    paperclip (4.3.7)
       activemodel (>= 3.2.0)
       activesupport (>= 3.2.0)
       cocaine (~> 0.5.5)
       mime-types
       mimemagic (= 0.3.0)
-    parser (2.2.3.0)
-      ast (>= 1.1, < 3.0)
-    pg (0.18.4)
-    poltergeist (1.8.0)
+    parallel (1.12.0)
+    parser (2.4.0.0)
+      ast (~> 2.2)
+    pg (0.21.0)
+    poltergeist (1.16.0)
       capybara (~> 2.1)
       cliver (~> 0.3.1)
-      multi_json (~> 1.0)
       websocket-driver (>= 0.2.0)
     powerpack (0.1.1)
-    progress (3.1.0)
-    psych (2.0.15)
-    r2 (0.2.6)
-    rack (1.6.4)
-    rack-cors (0.4.0)
+    progress (3.4.0)
+    psych (2.2.4)
+    public_suffix (3.0.0)
+    r2 (0.2.7)
+    rack (2.0.3)
+    rack-cors (1.0.2)
     rack-openid (1.3.1)
       rack (>= 1.1.0)
       ruby-openid (>= 2.1.8)
-    rack-test (0.6.3)
-      rack (>= 1.0)
-    rails (4.2.5)
-      actionmailer (= 4.2.5)
-      actionpack (= 4.2.5)
-      actionview (= 4.2.5)
-      activejob (= 4.2.5)
-      activemodel (= 4.2.5)
-      activerecord (= 4.2.5)
-      activesupport (= 4.2.5)
-      bundler (>= 1.3.0, < 2.0)
-      railties (= 4.2.5)
-      sprockets-rails
-    rails-deprecated_sanitizer (1.0.3)
-      activesupport (>= 4.2.0.alpha)
-    rails-dom-testing (1.0.7)
-      activesupport (>= 4.2.0.beta, < 5.0)
-      nokogiri (~> 1.6.0)
-      rails-deprecated_sanitizer (>= 1.0.1)
-    rails-html-sanitizer (1.0.2)
+    rack-test (0.7.0)
+      rack (>= 1.0, < 3)
+    rack-uri_sanitizer (0.0.2)
+    rails (5.1.4)
+      actioncable (= 5.1.4)
+      actionmailer (= 5.1.4)
+      actionpack (= 5.1.4)
+      actionview (= 5.1.4)
+      activejob (= 5.1.4)
+      activemodel (= 5.1.4)
+      activerecord (= 5.1.4)
+      activesupport (= 5.1.4)
+      bundler (>= 1.3.0)
+      railties (= 5.1.4)
+      sprockets-rails (>= 2.0.0)
+    rails-controller-testing (1.0.2)
+      actionpack (~> 5.x, >= 5.0.1)
+      actionview (~> 5.x, >= 5.0.1)
+      activesupport (~> 5.x)
+    rails-dom-testing (2.0.3)
+      activesupport (>= 4.2.0)
+      nokogiri (>= 1.6)
+    rails-html-sanitizer (1.0.3)
       loofah (~> 2.0)
-    rails-i18n (4.0.7)
-      i18n (~> 0.7)
-      railties (~> 4.0)
-    railties (4.2.5)
-      actionpack (= 4.2.5)
-      activesupport (= 4.2.5)
+    rails-i18n (4.0.2)
+      i18n (~> 0.6)
+      rails (>= 4.0)
+    railties (5.1.4)
+      actionpack (= 5.1.4)
+      activesupport (= 5.1.4)
+      method_source
       rake (>= 0.8.7)
       thor (>= 0.18.1, < 2.0)
-    rainbow (2.0.0)
-    rake (10.4.2)
-    redcarpet (3.3.3)
+    rainbow (2.2.2)
+      rake
+    rake (12.2.1)
+    rb-fsevent (0.10.2)
+    rb-inotify (0.9.10)
+      ffi (>= 0.5.0, < 2)
+    record_tag_helper (1.0.0)
+      actionview (~> 5.x)
+    redcarpet (3.4.0)
     ref (2.0.0)
-    request_store (1.2.1)
-    rest-client (1.8.0)
-      http-cookie (>= 1.0.2, < 2.0)
-      mime-types (>= 1.16, < 3.0)
-      netrc (~> 0.7)
-    rinku (1.7.3)
-    rubocop (0.35.1)
-      astrolabe (~> 1.3)
-      parser (>= 2.2.3.0, < 3.0)
+    request_store (1.3.2)
+    rinku (2.0.3)
+    rotp (3.3.0)
+    rubocop (0.51.0)
+      parallel (~> 1.10)
+      parser (>= 2.3.3.1, < 3.0)
       powerpack (~> 0.1)
-      rainbow (>= 1.99.1, < 3.0)
+      rainbow (>= 2.2.2, < 3.0)
       ruby-progressbar (~> 1.7)
-      tins (<= 1.6.0)
+      unicode-display_width (~> 1.0, >= 1.0.1)
     ruby-openid (2.7.0)
-    ruby-progressbar (1.7.5)
-    sanitize (4.0.0)
+    ruby-progressbar (1.9.0)
+    ruby_dep (1.5.0)
+    safe_yaml (1.0.4)
+    sanitize (4.5.0)
       crass (~> 1.0.2)
       nokogiri (>= 1.4.4)
-      nokogumbo (= 1.4.1)
-    sass (3.4.19)
-    sass-rails (5.0.4)
-      railties (>= 4.0.0, < 5.0)
+      nokogumbo (~> 1.4.1)
+    sass (3.5.3)
+      sass-listen (~> 4.0.0)
+    sass-listen (4.0.0)
+      rb-fsevent (~> 0.9, >= 0.9.4)
+      rb-inotify (~> 0.9, >= 0.9.7)
+    sass-rails (5.0.6)
+      railties (>= 4.0.0, < 6)
       sass (~> 3.1)
       sprockets (>= 2.8, < 4.0)
       sprockets-rails (>= 2.0, < 4.0)
       tilt (>= 1.1, < 3)
-    simplecov (0.10.0)
+    secure_headers (5.0.1)
+      useragent (>= 0.15.0)
+    simplecov (0.14.1)
       docile (~> 1.1.0)
-      json (~> 1.8)
+      json (>= 1.8, < 3)
       simplecov-html (~> 0.10.0)
-    simplecov-html (0.10.0)
-    soap4r-ruby1.9 (2.0.5)
-    sprockets (3.4.0)
+    simplecov-html (0.10.2)
+    sprockets (3.7.1)
+      concurrent-ruby (~> 1.0)
       rack (> 1, < 3)
-    sprockets-rails (2.3.3)
-      actionpack (>= 3.0)
-      activesupport (>= 3.0)
-      sprockets (>= 2.8, < 4.0)
-    term-ansicolor (1.3.2)
+    sprockets-rails (3.2.1)
+      actionpack (>= 4.0)
+      activesupport (>= 4.0)
+      sprockets (>= 3.0.0)
+    term-ansicolor (1.6.0)
       tins (~> 1.0)
-    therubyracer (0.12.2)
-      libv8 (~> 3.16.14.0)
+    therubyracer (0.12.3)
+      libv8 (~> 3.16.14.15)
       ref
-    thor (0.19.1)
-    thread_safe (0.3.5)
-    tilt (2.0.1)
-    timecop (0.8.0)
-    tins (1.6.0)
-    tzinfo (1.2.2)
+    thor (0.19.4)
+    thread_safe (0.3.6)
+    tilt (2.0.8)
+    tins (1.15.0)
+    tzinfo (1.2.4)
       thread_safe (~> 0.1)
-    uglifier (2.7.2)
-      execjs (>= 0.3.0)
-      json (>= 1.8.0)
-    unf (0.1.4)
-      unf_ext
-    unf_ext (0.0.7.1)
+    uglifier (3.2.0)
+      execjs (>= 0.3.0, < 3)
+    unicode-display_width (1.3.0)
+    useragent (0.16.8)
     validates_email_format_of (1.6.3)
       i18n
     vendorer (0.1.16)
-    websocket-driver (0.6.3)
+    webmock (3.1.0)
+      addressable (>= 2.3.6)
+      crack (>= 0.3.2)
+      hashdiff
+    websocket-driver (0.6.5)
       websocket-extensions (>= 0.1.0)
     websocket-extensions (0.1.2)
-    xpath (2.0.0)
+    xpath (2.1.0)
       nokogiri (~> 1.3)
 
 PLATFORMS
@@ -315,50 +355,62 @@ PLATFORMS
 DEPENDENCIES
   SystemTimer (>= 1.1.3)
   actionpack-page_caching
+  annotate
   autoprefixer-rails
   bigdecimal (~> 1.1.0)
-  coffee-rails (~> 4.1.0)
-  composite_primary_keys (~> 8.1.0)
+  canonical-rails
+  coffee-rails (~> 4.2)
+  composite_primary_keys (~> 10.0.0)
   coveralls
   dalli
-  deadlock_retry (>= 1.2.0)
   dynamic_form
+  factory_bot_rails
   faraday
+  geoip
   htmlentities
   http_accept_language (~> 2.0.0)
-  httpclient
-  i18n-js (>= 3.0.0.rc10)
-  image_optim (>= 0.22.0)
+  i18n-js (>= 3.0.0)
+  image_optim_rails
   jquery-rails
   jshint
   json
   jsonify-rails
   kgio
-  konacha
   libxml-ruby (>= 2.0.5)
+  listen
   logstasher
   minitest (~> 5.1)
   oauth-plugin (>= 0.5.1)
   omniauth
   omniauth-facebook
+  omniauth-github
   omniauth-google-oauth2 (>= 0.2.7)
+  omniauth-mediawiki (>= 0.0.3)
   omniauth-openid
   omniauth-windowslive
+  openstreetmap-deadlock_retry (>= 1.3.0)
   paperclip (~> 4.0)
   pg
   poltergeist
   psych
-  r2
+  r2 (~> 0.2.7)
   rack-cors
-  rails (= 4.2.5)
+  rack-uri_sanitizer
+  rails (= 5.1.4)
+  rails-controller-testing
   rails-i18n (~> 4.0.0)
+  record_tag_helper
   redcarpet
   rinku (>= 1.2.2)
+  rotp
   rubocop
   sanitize
   sass-rails (~> 5.0)
-  soap4r-ruby1.9
-  timecop
+  secure_headers
   uglifier (>= 1.3.0)
   validates_email_format_of (>= 1.5.1)
   vendorer
+  webmock
+
+BUNDLED WITH
+   1.15.4
index 09e3b12f7827a92971c129dd4ef49dd6aa4449a5..d036673b1ee1923bdffcdb8dfc36ab7cbd5cde15 100644 (file)
@@ -8,7 +8,7 @@ You can install the software directly on your machine, which is the traditional
 These instructions are based on Ubuntu 12.04 LTS, which is the platform used by the OSMF servers.
 The instructions also work, with only minor amendments, for all other current Ubuntu releases, Fedora and MacOSX
 
-We don't recommend attempting to develop or deploy this software on Windows. If you need to use Windows, then try developing this sofware using Ubuntu in a virtual machine, or use [Vagrant](VAGRANT.md).
+We don't recommend attempting to develop or deploy this software on Windows. If you need to use Windows, then try developing this software using Ubuntu in a virtual machine, or use [Vagrant](VAGRANT.md).
 
 ## Dependencies
 
@@ -18,26 +18,24 @@ of packages required before you can get the various gems installed.
 
 ## Minimum requirements
 
-* Ruby 1.9.3
+* Ruby 2.3
 * RubyGems 1.3.1+
-* Postgres 8.3+
+* PostgreSQL 9.1+
 * ImageMagick
 * Bundler
 * Javascript Runtime
 
-These can be installed on Ubuntu 10.10 or later with:
+These can be installed on Ubuntu 16.04 or later with:
 
 ```
-sudo apt-get install ruby1.9.1 libruby1.9.1 ruby1.9.1-dev ri1.9.1 \
+sudo apt-get install ruby2.3 libruby2.3 ruby2.3-dev \
                      libmagickwand-dev libxml2-dev libxslt1-dev nodejs \
-                     apache2 apache2-threaded-dev build-essential git-core \
+                     apache2 apache2-dev build-essential git-core \
                      postgresql postgresql-contrib libpq-dev postgresql-server-dev-all \
-                     libsasl2-dev
-sudo gem1.9.1 install bundler
+                     libsasl2-dev imagemagick
+sudo gem2.3 install bundler
 ```
 
-Note that the "1.9.1" Ubuntu packages do in fact contain ruby 1.9.3.
-
 ### Alternative platforms
 
 #### Fedora
@@ -49,17 +47,17 @@ sudo yum install ruby ruby-devel rubygem-rdoc rubygem-bundler rubygems \
                  libxml2-devel js \
                  gcc gcc-c++ git \
                  postgresql postgresql-server postgresql-contrib postgresql-devel \
-                 perl-podlators
+                 perl-podlators ImageMagick
 ```
 
-If you didn't already have Postgres installed then create a Postgres instance and start the server:
+If you didn't already have PostgreSQL installed then create a PostgreSQL instance and start the server:
 
 ```
 sudo postgresql-setup initdb
 sudo systemctl start postgresql.service
 ```
 
-Optionally set Postgres to start on boot:
+Optionally set PostgreSQL to start on boot:
 
 ```
 sudo systemctl enable postgresql.service
@@ -69,10 +67,10 @@ sudo systemctl enable postgresql.service
 
 For MacOSX, you will need XCode installed from the Mac App Store; OS X 10.7 (Lion) or later; and some familiarity with Unix development via the Terminal.
 
-Installing Postgres:
+Installing PostgreSQL:
 
 * Install Postgres.app from http://postgresapp.com/
-* Add Postgres to your path, by editing your profile:
+* Add PostgreSQL to your path, by editing your profile:
 
 `nano ~/.profile`
 
@@ -83,9 +81,9 @@ and adding:
 Installing other dependencies:
 
 * Install Homebrew from http://mxcl.github.io/homebrew/
-* Install the latest version of Ruby: brew install ruby
-* Install ImageMagick: brew install imagemagick
-* Install Bundler: gem install bundler
+* Install the latest version of Ruby: `brew install ruby`
+* Install ImageMagick: `brew install imagemagick`
+* Install Bundler: `gem install bundler`
 
 Note that OS X does not have a /home directory by default, so if you are using the GPX functions, you will need to change the directories specified in config/application.yml.
 
@@ -140,7 +138,7 @@ instructions below as appropriate.
 
 ### PostgreSQL account setup
 
-We need to create a PostgreSQL role (i.e. user account) for your current user, and it needs to be a superuser so that we can create more database.
+We need to create a PostgreSQL role (i.e. user account) for your current user, and it needs to be a superuser so that we can create more databases.
 
 ```
 sudo -u postgres -i
@@ -158,15 +156,7 @@ bundle exec rake db:create
 
 ### PostgreSQL Btree-gist Extension
 
-We need to load the btree-gist extension, which is needed for showing changesets on the history tab.
-
-For PostgreSQL < 9.1 (change the version number in the path as necessary):
-
-```
-psql -d openstreetmap < /usr/share/postgresql/9.0/contrib/btree_gist.sql
-```
-
-For PostgreSQL >= 9.1:
+We need to load the `btree-gist` extension, which is needed for showing changesets on the history tab.
 
 ```
 psql -d openstreetmap -c "CREATE EXTENSION btree_gist"
@@ -174,7 +164,7 @@ psql -d openstreetmap -c "CREATE EXTENSION btree_gist"
 
 ### PostgreSQL Functions
 
-We need to install special functions into the postgresql databases, and these are provided by a library that needs compiling first.
+We need to install special functions into the PostgreSQL databases, and these are provided by a library that needs compiling first.
 
 ```
 cd db/functions
@@ -203,7 +193,7 @@ bundle exec rake db:migrate
 To ensure that everything is set up properly, you should now run:
 
 ```
-bundle exec rake test
+bundle exec rake test:db
 ```
 
 This test will take a few minutes, reporting tests run, assertions, and any errors. If you receive no errors, then your installation is successful.
index d53bae1577d56071ad0ce0250dea7153fc871476..6b929fef9f48e7e9be810c2576d7eb6ef47eaa38 100644 (file)
--- a/README.md
+++ b/README.md
@@ -38,6 +38,10 @@ We're always keen to have more developers! Pull requests are very welcome.
 * Translation is managed by [Translatewiki](https://translatewiki.net/wiki/Translating:OpenStreetMap)
 * There is a [rails-dev@openstreetmap.org](http://lists.openstreetmap.org/listinfo/rails-dev) mailing list for development discussion.
 * IRC - there is the #osm-dev channel on irc.oftc.net.
-* There are also weekly meetings of the OpenStreetMap Foundation Engineering Working Group (EWG) on Mondays at 1700 UTC on the #osm-ewg channel.
 
 More details on contributing to the code are in the [CONTRIBUTING.md](CONTRIBUTING.md) file.
+
+# Maintainers
+
+* Tom Hughes [@tomhughes](https://github.com/tomhughes/)
+* Andy Allan [@gravitystorm](https://github.com/gravitystorm/)
index 39f9f3564686f928792b3a771866a14924fb6f20..9a5ea7383aa83eec12490380a7391d1bb93eeb96 100644 (file)
--- a/Rakefile
+++ b/Rakefile
@@ -1,6 +1,6 @@
 # Add your own tasks in files placed in lib/tasks ending in .rake,
 # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
 
-require File.expand_path("../config/application", __FILE__)
+require_relative "config/application"
 
-OpenStreetMap::Application.load_tasks
+Rails.application.load_tasks
index d71483569df2b443cda3228cd2cfdb9d0511e1fb..3825ad988242567e0e4af260b1e850c8faf04f05 100644 (file)
@@ -6,9 +6,12 @@ On Ubuntu, it should be as simple as:
 sudo apt-get install vagrant
 ```
 
-Other Linux distributions should have similar installation instructions using `yum` or similar.
+Other Linux distributions should have similar installation instructions using `dnf`, `pacman`, or similar.
 
-Installers are available for Mac OS X and Windows, please see the [Vagrant project download page](http://www.vagrantup.com/downloads) for more information.
+Installers are available for Mac OS X and Windows, please see the [Vagrant project download page](http://www.vagrantup.com/downloads.html) for more information.
+
+Note than until there are suitable _xenial64_ [vagrant boxes](https://atlas.hashicorp.com/boxes/search?utf8=%E2%9C%93&sort=&provider=&q=xenial64) for other providers,
+the only virtualization provider supported is virtualbox. You might need to install it and specify `--provider virtualbox` when setting up your environment.
 
 # Setting up openstreetmap-website
 
index 24d62bb7a4a95e56a4d2ad01526c6cce533061d2..f41f9676c7e4bf55510499a7803f493f1b9d5dd8 100644 (file)
@@ -3,9 +3,11 @@
 
 Vagrant.configure("2") do |config|
   # use official ubuntu image for virtualbox
-  config.vm.provider "virtualbox" do |_, override|
-    override.vm.box = "ubuntu/trusty64"
+  config.vm.provider "virtualbox" do |vb, override|
+    override.vm.box = "ubuntu/xenial64"
     override.vm.synced_folder ".", "/srv/openstreetmap-website"
+    vb.customize ["modifyvm", :id, "--memory", "1024"]
+    vb.customize ["modifyvm", :id, "--cpus", "2"]
   end
 
   # use third party image and NFS sharing for lxc
index a9ec0a671f6388bb45a496bb74c1fd78398b4e14..d66dd80d8077afcbaf3f04aa394a6f767cbdf6ac 100644 (file)
@@ -11,13 +11,18 @@ folder 'vendor/assets' do
   end
 
   folder 'leaflet' do
-    file 'leaflet.js', 'http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet-src.js'
-    file 'leaflet.css', 'http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css'
+    file 'leaflet.js', 'https://unpkg.com/leaflet@1.2.0/dist/leaflet-src.js'
+    file 'leaflet.css', 'https://unpkg.com/leaflet@1.2.0/dist/leaflet.css'
 
     [ 'layers.png', 'layers-2x.png',
       'marker-icon.png', 'marker-icon-2x.png',
       'marker-shadow.png' ].each do |image|
-      file "images/#{image}", "http://cdn.leafletjs.com/leaflet/v0.7.7/images/#{image}"
+      file "images/#{image}", "https://unpkg.com/leaflet@1.2.0/dist/images/#{image}"
+    end
+
+    from 'git://github.com/aratcliffe/Leaflet.contextmenu.git', :tag => 'v1.2.1' do
+      file 'leaflet.contextmenu.js', 'dist/leaflet.contextmenu.js'
+      file 'leaflet.contextmenu.css', 'dist/leaflet.contextmenu.css'
     end
 
     from 'git://github.com/kajic/leaflet-locationfilter.git' do
@@ -26,7 +31,7 @@ folder 'vendor/assets' do
       folder 'img', 'src/img'
     end
 
-    from 'git://github.com/domoritz/leaflet-locatecontrol.git' do
+    from 'git://github.com/domoritz/leaflet-locatecontrol.git', :tag => 'v0.62.0' do
       file 'leaflet.locate.js', 'src/L.Control.Locate.js'
     end
 
@@ -34,7 +39,7 @@ folder 'vendor/assets' do
       file 'leaflet.osm.js', 'leaflet-osm.js'
     end
 
-    from 'git://github.com/jieter/Leaflet.encoded.git' do
+    from 'git://github.com/jieter/Leaflet.encoded.git', :tag => '0.0.8' do
       file 'leaflet.polyline.js', 'Polyline.encoded.js'
     end
   end
@@ -49,12 +54,15 @@ folder 'vendor/assets' do
     from 'git://github.com/openstreetmap/iD', :branch => 'release' do
       folder 'iD/img', 'dist/img'
       folder 'iD/locales', 'dist/locales'
+      folder 'iD/mapillary-js', 'dist/mapillary-js'
+
       file 'iD.css.erb', 'dist/iD.css' do |path|
-        rewrite(path) { |content| content.gsub(/url\('?(img\/[^')]+)'?\)/, 'url(<%= asset_path("iD/\1") %>)') }
+        rewrite(path) do |content|
+          content.gsub(/url\('?(img\/[^')]+)'?\)/, 'url(<%= asset_path("iD/\1") %>)')
+        end
       end
+
       file 'iD.js', 'dist/iD.js'
-      file 'presets.js', 'dist/presets.js'
-      file 'imagery.js', 'dist/imagery.js'
     end
   end
 
diff --git a/app/assets/images/banners/banner-sotmus2017.png b/app/assets/images/banners/banner-sotmus2017.png
new file mode 100644 (file)
index 0000000..25382bf
Binary files /dev/null and b/app/assets/images/banners/banner-sotmus2017.png differ
diff --git a/app/assets/images/banners/osmf-membership-drive-2017.png b/app/assets/images/banners/osmf-membership-drive-2017.png
new file mode 100644 (file)
index 0000000..0b62b21
Binary files /dev/null and b/app/assets/images/banners/osmf-membership-drive-2017.png differ
diff --git a/app/assets/images/banners/sotmasia-2017-banner.png b/app/assets/images/banners/sotmasia-2017-banner.png
new file mode 100644 (file)
index 0000000..f18f5bf
Binary files /dev/null and b/app/assets/images/banners/sotmasia-2017-banner.png differ
diff --git a/app/assets/images/browse/shop_car_parts.16.png b/app/assets/images/browse/shop_car_parts.16.png
new file mode 100644 (file)
index 0000000..6c07e4d
Binary files /dev/null and b/app/assets/images/browse/shop_car_parts.16.png differ
diff --git a/app/assets/images/github.png b/app/assets/images/github.png
new file mode 100644 (file)
index 0000000..b797e24
Binary files /dev/null and b/app/assets/images/github.png differ
index 39f6bc2080a21f9264799f610dfcff5c45270c81..b273b6b6ef21e633019cf486c05657a83ffdc4ce 100644 (file)
Binary files a/app/assets/images/google.png and b/app/assets/images/google.png differ
diff --git a/app/assets/images/key/cyclemap/bicycle_parking.png b/app/assets/images/key/cyclemap/bicycle_parking.png
new file mode 100644 (file)
index 0000000..c900a44
Binary files /dev/null and b/app/assets/images/key/cyclemap/bicycle_parking.png differ
diff --git a/app/assets/images/key/cyclemap/bicycle_shop.png b/app/assets/images/key/cyclemap/bicycle_shop.png
new file mode 100644 (file)
index 0000000..5ccf714
Binary files /dev/null and b/app/assets/images/key/cyclemap/bicycle_shop.png differ
diff --git a/app/assets/images/key/cyclemap/common.png b/app/assets/images/key/cyclemap/common.png
new file mode 100644 (file)
index 0000000..7c10815
Binary files /dev/null and b/app/assets/images/key/cyclemap/common.png differ
diff --git a/app/assets/images/key/cyclemap/cycleway.png b/app/assets/images/key/cyclemap/cycleway.png
new file mode 100644 (file)
index 0000000..13bed4a
Binary files /dev/null and b/app/assets/images/key/cyclemap/cycleway.png differ
diff --git a/app/assets/images/key/cyclemap/cycleway_local.png b/app/assets/images/key/cyclemap/cycleway_local.png
new file mode 100644 (file)
index 0000000..2a29331
Binary files /dev/null and b/app/assets/images/key/cyclemap/cycleway_local.png differ
diff --git a/app/assets/images/key/cyclemap/cycleway_local13.png b/app/assets/images/key/cyclemap/cycleway_local13.png
new file mode 100644 (file)
index 0000000..3f2c535
Binary files /dev/null and b/app/assets/images/key/cyclemap/cycleway_local13.png differ
diff --git a/app/assets/images/key/cyclemap/cycleway_national.png b/app/assets/images/key/cyclemap/cycleway_national.png
new file mode 100644 (file)
index 0000000..0f5455f
Binary files /dev/null and b/app/assets/images/key/cyclemap/cycleway_national.png differ
diff --git a/app/assets/images/key/cyclemap/cycleway_national13.png b/app/assets/images/key/cyclemap/cycleway_national13.png
new file mode 100644 (file)
index 0000000..252b07a
Binary files /dev/null and b/app/assets/images/key/cyclemap/cycleway_national13.png differ
diff --git a/app/assets/images/key/cyclemap/cycleway_regional.png b/app/assets/images/key/cyclemap/cycleway_regional.png
new file mode 100644 (file)
index 0000000..7e3306e
Binary files /dev/null and b/app/assets/images/key/cyclemap/cycleway_regional.png differ
diff --git a/app/assets/images/key/cyclemap/cycleway_regional13.png b/app/assets/images/key/cyclemap/cycleway_regional13.png
new file mode 100644 (file)
index 0000000..9b3409f
Binary files /dev/null and b/app/assets/images/key/cyclemap/cycleway_regional13.png differ
diff --git a/app/assets/images/key/cyclemap/footway.png b/app/assets/images/key/cyclemap/footway.png
new file mode 100644 (file)
index 0000000..c78756f
Binary files /dev/null and b/app/assets/images/key/cyclemap/footway.png differ
diff --git a/app/assets/images/key/cyclemap/forest.png b/app/assets/images/key/cyclemap/forest.png
new file mode 100644 (file)
index 0000000..a7ebe8e
Binary files /dev/null and b/app/assets/images/key/cyclemap/forest.png differ
diff --git a/app/assets/images/key/cyclemap/lake.png b/app/assets/images/key/cyclemap/lake.png
new file mode 100644 (file)
index 0000000..918d496
Binary files /dev/null and b/app/assets/images/key/cyclemap/lake.png differ
diff --git a/app/assets/images/key/cyclemap/motorway.png b/app/assets/images/key/cyclemap/motorway.png
new file mode 100644 (file)
index 0000000..296f176
Binary files /dev/null and b/app/assets/images/key/cyclemap/motorway.png differ
diff --git a/app/assets/images/key/cyclemap/motorway12.png b/app/assets/images/key/cyclemap/motorway12.png
new file mode 100644 (file)
index 0000000..749493a
Binary files /dev/null and b/app/assets/images/key/cyclemap/motorway12.png differ
diff --git a/app/assets/images/key/cyclemap/primary.png b/app/assets/images/key/cyclemap/primary.png
new file mode 100644 (file)
index 0000000..78ae0e4
Binary files /dev/null and b/app/assets/images/key/cyclemap/primary.png differ
diff --git a/app/assets/images/key/cyclemap/primary12.png b/app/assets/images/key/cyclemap/primary12.png
new file mode 100644 (file)
index 0000000..fed37d0
Binary files /dev/null and b/app/assets/images/key/cyclemap/primary12.png differ
diff --git a/app/assets/images/key/cyclemap/rail.png b/app/assets/images/key/cyclemap/rail.png
new file mode 100644 (file)
index 0000000..0abf0c1
Binary files /dev/null and b/app/assets/images/key/cyclemap/rail.png differ
diff --git a/app/assets/images/key/cyclemap/rail14.png b/app/assets/images/key/cyclemap/rail14.png
new file mode 100644 (file)
index 0000000..957f17c
Binary files /dev/null and b/app/assets/images/key/cyclemap/rail14.png differ
diff --git a/app/assets/images/key/cyclemap/secondary.png b/app/assets/images/key/cyclemap/secondary.png
new file mode 100644 (file)
index 0000000..7928b18
Binary files /dev/null and b/app/assets/images/key/cyclemap/secondary.png differ
diff --git a/app/assets/images/key/cyclemap/secondary12.png b/app/assets/images/key/cyclemap/secondary12.png
new file mode 100644 (file)
index 0000000..cde0085
Binary files /dev/null and b/app/assets/images/key/cyclemap/secondary12.png differ
diff --git a/app/assets/images/key/cyclemap/toilets.png b/app/assets/images/key/cyclemap/toilets.png
new file mode 100644 (file)
index 0000000..d1c7a00
Binary files /dev/null and b/app/assets/images/key/cyclemap/toilets.png differ
diff --git a/app/assets/images/key/cyclemap/track.png b/app/assets/images/key/cyclemap/track.png
new file mode 100644 (file)
index 0000000..f294edc
Binary files /dev/null and b/app/assets/images/key/cyclemap/track.png differ
diff --git a/app/assets/images/key/cyclemap/trunk.png b/app/assets/images/key/cyclemap/trunk.png
new file mode 100644 (file)
index 0000000..d312a65
Binary files /dev/null and b/app/assets/images/key/cyclemap/trunk.png differ
diff --git a/app/assets/images/key/cyclemap/trunk12.png b/app/assets/images/key/cyclemap/trunk12.png
new file mode 100644 (file)
index 0000000..51230a0
Binary files /dev/null and b/app/assets/images/key/cyclemap/trunk12.png differ
diff --git a/app/assets/images/osm_logo_30.png b/app/assets/images/osm_logo_30.png
new file mode 100644 (file)
index 0000000..c963f4f
Binary files /dev/null and b/app/assets/images/osm_logo_30.png differ
index 42ec7b4cdf94c3098160e40542d81ca645bc3b32..079f4dd7fe229513f8c48a85d9d79df8adc5823c 100644 (file)
Binary files a/app/assets/images/routing-sprite.png and b/app/assets/images/routing-sprite.png differ
diff --git a/app/assets/images/routing-sprite.svg b/app/assets/images/routing-sprite.svg
new file mode 100644 (file)
index 0000000..15aa57b
--- /dev/null
@@ -0,0 +1,573 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="520"
+   height="20"
+   viewBox="0 0 520.00001 20"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.91 r13725"
+   sodipodi:docname="routing-sprite.svg"
+   inkscape:export-filename="/home/patrick/Code/openstreetmap-website/app/assets/images/routing-sprite.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
+  <defs
+     id="defs4" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="5.6568542"
+     inkscape:cx="131.24519"
+     inkscape:cy="13.736603"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="true"
+     inkscape:showpageshadow="false"
+     inkscape:window-width="1920"
+     inkscape:window-height="1080"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="0"
+     showguides="false"
+     inkscape:guide-bbox="true"
+     units="px">
+    <inkscape:grid
+       type="xygrid"
+       id="grid4224" />
+    <sodipodi:guide
+       position="20.000001,31"
+       orientation="1,0"
+       id="guide4226" />
+    <sodipodi:guide
+       position="40.000001,19"
+       orientation="1,0"
+       id="guide4245" />
+    <sodipodi:guide
+       position="60.000002,29"
+       orientation="1,0"
+       id="guide4299" />
+    <sodipodi:guide
+       position="80.000002,35"
+       orientation="1,0"
+       id="guide4388" />
+    <sodipodi:guide
+       position="71.000002,10"
+       orientation="-0.7193398,-0.69465837"
+       id="guide4432"
+       inkscape:label=""
+       inkscape:color="rgb(0,0,255)" />
+    <sodipodi:guide
+       position="100,15"
+       orientation="1,0"
+       id="guide4499" />
+    <sodipodi:guide
+       position="120,15"
+       orientation="1,0"
+       id="guide4578" />
+    <sodipodi:guide
+       position="140,16"
+       orientation="1,0"
+       id="guide4580" />
+    <sodipodi:guide
+       position="160,21"
+       orientation="1,0"
+       id="guide4582" />
+    <sodipodi:guide
+       position="180,15"
+       orientation="1,0"
+       id="guide4729" />
+    <sodipodi:guide
+       position="200.00001,15"
+       orientation="1,0"
+       id="guide4731" />
+    <sodipodi:guide
+       position="220.00001,11"
+       orientation="1,0"
+       id="guide4747" />
+    <sodipodi:guide
+       position="78.000002,12"
+       orientation="-0.70710678,0.70710678"
+       id="guide4212"
+       inkscape:label=""
+       inkscape:color="rgb(0,0,255)" />
+    <sodipodi:guide
+       position="240.00001,19"
+       orientation="1,0"
+       id="guide4264" />
+    <sodipodi:guide
+       position="260.00001,19"
+       orientation="1,0"
+       id="guide4266" />
+    <sodipodi:guide
+       position="280.00001,5"
+       orientation="1,0"
+       id="guide4280" />
+    <sodipodi:guide
+       position="300.00001,10"
+       orientation="1,0"
+       id="guide4297" />
+    <sodipodi:guide
+       position="320.00001,24"
+       orientation="1,0"
+       id="guide4305" />
+    <sodipodi:guide
+       position="340.00001,28"
+       orientation="1,0"
+       id="guide4335" />
+    <sodipodi:guide
+       position="360.00001,30"
+       orientation="1,0"
+       id="guide4337" />
+    <sodipodi:guide
+       position="380.00001,19"
+       orientation="1,0"
+       id="guide4376" />
+    <sodipodi:guide
+       position="400.00001,19"
+       orientation="1,0"
+       id="guide4382" />
+    <sodipodi:guide
+       position="420.00001,36"
+       orientation="1,0"
+       id="guide4394" />
+    <sodipodi:guide
+       position="440.00001,20"
+       orientation="1,0"
+       id="guide4449" />
+    <sodipodi:guide
+       position="460.00001,22"
+       orientation="1,0"
+       id="guide4451" />
+    <sodipodi:guide
+       position="480.00001,20"
+       orientation="1,0"
+       id="guide4485" />
+    <sodipodi:guide
+       position="500.00001,40"
+       orientation="1,0"
+       id="guide4487" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-1032.3622)">
+    <image
+       y="1002.3622"
+       x="1.7763568e-15"
+       id="image4217"
+       xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAAAUCAMAAACXrFfpAAABOFBMVEUAAAB/f39/f39/f39/f396 enoAAAB7e3t7e3t4eHh5eXl5eXl6enp3d3d4eHgAAAB3d3d1dXVzc3MAAABwcHBvb29ubm4AAABt bW1sbGxsbGxsbGxra2tra2toaGhoaGhqamoAAABmZmZoaGgAAABnZ2dkZGQAAABiYmJXV1dXV1cA AAAAAABMTEwAAAAAAABDQ0MAAAA1NTU1NTUxMTEAAAAxMTEAAAAAAAAmJiYlJSUkJCQjIyMiIiIA AAAcHBwAAAAAAAAAAAAAAAAUFBQAAAAAAAAQEBAPDw8AAAAPDw8AAAAAAAANDQ0MDAwAAAAAAAAM DAwKCgoAAAAAAAAICAgICAgAAAAHBwcAAAAHBwcGBgYAAAAAAAAAAAAAAAADAwMAAAAAAAAAAAAA AAAAAAAAAAAAAABULW3yAAAAZ3RSTlMAAQIGCw4QEBIUFhcZGh0gICItMDQ5PEBAQUJERUZHSEhK SkxMTU9QUFZXWGBgZGZpcHl6f4CAiJCRk5SXmaCmrLC1uLzAxMXIyMrM0NDT09TU29zg4OLk5ebm 6fDx8/T09vf4+/z9ttm2NwAABH9JREFUeF7tV+9zFTUUzQOMFZUAiwZbkB9bXYEU3UI0FVhcNQVx rQpbsBopFuX8//+BMy/vvd3k7mRnio8PHc/HOyc35545yWbZkYOQtKYSvDeOgg/Xs4JR8OI/kDnc Q6jX02wqqtZlKR7tN47MWtNfOMRZOZ/n+fmVuNwMD6hRhDmQSlcNXCCpJAKVtbYiRnIViAVspQsp w9Wo0+OmNXMHQWeoUjzabxwSsP1mNDMn1/KHAB7ma+9EK9uhfi1CPdxgijJMggtjnzWeZViSVnmW jqaF0yyBtGYNVNRTiEEe7Xc4oxXtxS78Co+fVoO6BSTpZgEgKt78GyCCHGxvFN5iBh12a6kD+OsK C2EBtCqR6pRm8SdI0QCwMQ8AsvF+FGLA6HkcpV64cOwz5B7Iw3B492gsXVgtp0XVXRFTPANQyX5S jSya/iyyBvDMs1WfCFeQrNGqrOFqyRjRTL0CGh7SDnAANcQb7Uf3FS01ugRQe+kL6uRT5Jfu/nb3 UmR04++DENmTOAu8jszXmKMbUMxa8WZxPHmDHnSQK8AQo1+uswDKExUb0VyUN4B1VQSBLixspnnI W/c82m9k3woqMtofTMjI6E9waxfA7i3kE5IiQcYLjc5aAO0VmCGj3fzclPOsyO48CO0GjGa1KxyA RgRG/wPU8UH3EGxM8w3gJovQ4BdvM+Wl+9F9BdDGRvvwtbxv9MnVTcyxufruwkBX/Qh8VTfkCq2t DZ4JQM1ZkwXfFCnlE7guMvUiFw5YULl2aKSUVd9oVTHRRPeTdp8DCEMJdNlPajYziXE6XMEor2Is 3Y/ua19iX4dGq9YAKJuqb/SFB+jwYG2RmNmHQPDoUeA4r8NLrAzf/3pqm0AtyDeFfF2EhfArupKc jdM3WjILOHKjzo5XUrMGtrcBE8Zl77s9H0rKS/aj+4pCY12FRgvGpgOIvtFn76HDvbPpL64F1HQ9 edPERpeK0ValySywrqquQ1lGRnuERnN/ZAeNrkdeCQ5qKrNnVjk91DUqwisATvsl9/VeclNIwApT BAPw5gd8Y33L41efYo6nV48nRJNSyujhdRYHwD6K0RUA0pUSM5RpgZk/CE2/rOGPuiUPZs8j/ZL7 +tAW2Aeew0ZyZe+ZdeY25rh9hi3XaOH8RXhYo+nDvB1JIPcZbUOjDWNMBcqF/7N1yGi/9L7eaP/9 cyKWa7tpJznmyCdLNdp7CscPazR90zfZiEDWoBa8ggtFl0y68DC0nteO9aP7ash5hjSRK3tfgouP XuHF9y/w6tFFtmyjufNqDmd0iELrgrFRYzBFwKww8BPT8Ui/9L7KZrMpHKdyy0WgT63lG1vX8+tb G/naqcmSjWYajr+e0RRpzdm3wM9RUe/hueGUt50cOA3uoFNyz23uPL6zcf+P+xt3Hu9snluC0ZEc zZZvdKxRUp5lKR7tNw7jeEpujp3Z1YHd35Ev22hmxFE1Wpik3MubH324sXXtg2tff7H68ZeX2dFD Zm1G0mdNgrcUrLw/YW+dPsFOnH6bHXtvhb0p/I9/AQmEF7Y+Eo3CAAAAAElFTkSuQmCC "
+       preserveAspectRatio="none"
+       height="20.000017"
+       width="360" />
+    <path
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 9,1039.3309 3.6e-5,10.0313 1.999964,0 -3.5e-5,-10.0313 z"
+       id="path4446"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       sodipodi:nodetypes="cccc"
+       inkscape:connector-curvature="0"
+       id="path4448"
+       d="m 15,1039.3466 -5,-4.9844 -5,5 z"
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 87.125,4.984375 87.125,5 86,5 86,12.005859 82,12 l 5,5 5,-4.984375 -4,-0.0059 0,-5.025391 7,0 L 95,17 l 2,0 0,-12 -0.46875,0 0,-0.015625 -9.40625,0 z"
+       transform="translate(0,1032.3622)"
+       id="path4509"
+       inkscape:connector-curvature="0" />
+    <path
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 28,3.9882812 2.814453,2.8203126 -4.777344,4.7460942 0,0.04297 -0.03711,0 L 26,17 28,17 28,12.423828 32.228516,8.2226562 35,11 35,4 28,3.9882812 Z"
+       transform="translate(0,1032.3622)"
+       id="path4450"
+       inkscape:connector-curvature="0" />
+    <path
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 53,4 0.0059,3.984375 -6.005859,0 0,2 L 47,17 l 2,0 0,-7.015625 4.009766,0 L 53.015625,14 58,9 53,4 Z"
+       transform="translate(0,1032.3622)"
+       id="path4208"
+       inkscape:connector-curvature="0" />
+    <path
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 67.025391,4.4101562 67.003906,17 l 2,0 0,-7.5527344 3.685547,3.8710934 -2.683114,2.694508 6.989812,0.05505 0.01101,-7.0846724 -2.854816,2.9210504 z"
+       transform="translate(0,1032.3622)"
+       id="path4424"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="cccccccccc" />
+    <path
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 170,1035.3622 -4,5 3,0 0,5 2,0 0,-5 3,0 z"
+       id="path4735"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="cccccccc" />
+    <g
+       id="g4237">
+      <path
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 189,1039.3309 4e-5,10.0313 1.99996,0 -3e-5,-10.0313 z"
+         id="path4233"
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="ccccc" />
+      <path
+         sodipodi:nodetypes="cccc"
+         inkscape:connector-curvature="0"
+         id="path4235"
+         d="m 195,1039.3466 -5,-4.9844 -5,5 z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    </g>
+    <path
+       id="path4221"
+       d="m 112.00001,1036.3505 -2.81445,2.8203 4.77734,4.7461 0,0.043 0.0371,0 0,5.4023 -2,0 0,-4.5762 -4.22852,-4.2011 -2.77148,2.7773 0,-7 7,-0.012 z"
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       inkscape:connector-curvature="0" />
+    <path
+       id="path4223"
+       d="m 128.00028,1036.3622 -0.006,3.9844 6.00586,0 0,2 0,7.0156 -2,0 0,-7.0156 -4.00977,0 -0.006,4.0156 -4.98437,-5 5,-5 z"
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       inkscape:connector-curvature="0" />
+    <path
+       sodipodi:nodetypes="cccccccccc"
+       inkscape:connector-curvature="0"
+       id="path4225"
+       d="m 153.98575,1036.7724 0.0215,12.5898 -2,0 0,-7.5527 -3.68555,3.8711 2.68312,2.6945 -6.98982,0.055 -0.011,-7.0847 2.85482,2.9211 z"
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    <g
+       id="g4254"
+       transform="translate(-2.0000461,0)">
+      <circle
+         r="3"
+         transform="scale(1,-1)"
+         cy="-1044.3622"
+         cx="210.04105"
+         id="path4231"
+         style="opacity:1;fill:none;fill-opacity:0.43824702;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+      <path
+         id="path4247"
+         transform="translate(0,1032.3622)"
+         d="m 211,3.9882812 2.81445,2.8203126 -1.76562,1.7539062 c 0.58436,0.3442274 1.07073,0.8277607 1.41797,1.4101562 l 1.76172,-1.75 L 218,11 218,4 211,3.9882812 Z M 209,15.84375 209,17 l 2,0 0,-1.130859 C 210.69097,15.946541 210.3729,16 210.04102,16 209.67912,16 209.3342,15.935262 209,15.84375 Z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         inkscape:connector-curvature="0" />
+    </g>
+    <g
+       transform="translate(17.999954,0)"
+       id="g4258">
+      <circle
+         style="opacity:1;fill:none;fill-opacity:0.43824702;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+         id="circle4260"
+         cx="210.04105"
+         cy="-1044.3622"
+         transform="scale(1,-1)"
+         r="3" />
+      <path
+         inkscape:connector-curvature="0"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 211,3.9882812 2.81445,2.8203126 -1.76562,1.7539062 c 0.58436,0.3442274 1.07073,0.8277607 1.41797,1.4101562 l 1.76172,-1.75 L 218,11 218,4 211,3.9882812 Z M 209,15.84375 209,17 l 2,0 0,-1.130859 C 210.69097,15.946541 210.3729,16 210.04102,16 209.67912,16 209.3342,15.935262 209,15.84375 Z"
+         transform="translate(0,1032.3622)"
+         id="path4262" />
+    </g>
+    <g
+       id="g4268"
+       transform="translate(37.999954,0)">
+      <circle
+         r="3"
+         transform="scale(1,-1)"
+         cy="-1044.3622"
+         cx="210.04105"
+         id="circle4270"
+         style="opacity:1;fill:none;fill-opacity:0.43824702;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+      <path
+         id="path4272"
+         transform="translate(0,1032.3622)"
+         d="m 211,3.9882812 2.81445,2.8203126 -1.76562,1.7539062 c 0.58436,0.3442274 1.07073,0.8277607 1.41797,1.4101562 l 1.76172,-1.75 L 218,11 218,4 211,3.9882812 Z M 209,15.84375 209,17 l 2,0 0,-1.130859 C 210.69097,15.946541 210.3729,16 210.04102,16 209.67912,16 209.3342,15.935262 209,15.84375 Z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         inkscape:connector-curvature="0" />
+    </g>
+    <g
+       id="g4274"
+       transform="translate(80,0)">
+      <path
+         sodipodi:nodetypes="ccccc"
+         inkscape:connector-curvature="0"
+         id="path4276"
+         d="m 189,1039.3309 4e-5,10.0313 1.99996,0 -3e-5,-10.0313 z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+      <path
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 195,1039.3466 -5,-4.9844 -5,5 z"
+         id="path4278"
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="cccc" />
+    </g>
+    <path
+       id="path4295"
+       d="m 290,1035.3622 a 2,2 0 0 0 -2,2 2,2 0 0 0 2,2 2,2 0 0 0 2,-2 2,2 0 0 0 -2,-2 z m 0,4 -4,5 3,0 0,5 2,0 0,-5 3,0 -4,-5 z"
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       inkscape:connector-curvature="0" />
+    <g
+       id="g4313">
+      <g
+         id="g4299"
+         transform="translate(115.01146,2)">
+        <path
+           sodipodi:nodetypes="ccccc"
+           inkscape:connector-curvature="0"
+           id="path4301"
+           d="m 189,1037.3422 4e-5,7.9763 1.99996,0 -3e-5,-7.9763 z"
+           style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+        <path
+           style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+           d="M 192.99451,1037.3474 190,1034.3622 l -3.01146,3.0115 z"
+           id="path4303"
+           inkscape:connector-curvature="0"
+           sodipodi:nodetypes="cccc" />
+      </g>
+      <g
+         transform="matrix(1,0,0,-1,123.01146,2083.7244)"
+         id="g4307">
+        <path
+           style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+           d="m 189,1039.3309 4e-5,10.0313 1.99996,0 -3e-5,-10.0313 z"
+           id="path4309"
+           inkscape:connector-curvature="0"
+           sodipodi:nodetypes="ccccc" />
+        <path
+           sodipodi:nodetypes="cccc"
+           inkscape:connector-curvature="0"
+           id="path4311"
+           d="m 195,1039.3466 -5,-4.9844 -5,5 z"
+           style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+      </g>
+    </g>
+    <g
+       id="g4321"
+       transform="matrix(-1,0,0,-1,640.01146,2083.7244)">
+      <g
+         transform="translate(115.01146,2)"
+         id="g4323">
+        <path
+           style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+           d="m 189,1037.3422 4e-5,7.9763 1.99996,0 -3e-5,-7.9763 z"
+           id="path4325"
+           inkscape:connector-curvature="0"
+           sodipodi:nodetypes="ccccc" />
+        <path
+           sodipodi:nodetypes="cccc"
+           inkscape:connector-curvature="0"
+           id="path4327"
+           d="M 192.99451,1037.3474 190,1034.3622 l -3.01146,3.0115 z"
+           style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+      </g>
+      <g
+         id="g4329"
+         transform="matrix(1,0,0,-1,123.01146,2083.7244)">
+        <path
+           sodipodi:nodetypes="ccccc"
+           inkscape:connector-curvature="0"
+           id="path4331"
+           d="m 189,1039.3309 4e-5,10.0313 1.99996,0 -3e-5,-10.0313 z"
+           style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+        <path
+           style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+           d="m 195,1039.3466 -5,-4.9844 -5,5 z"
+           id="path4333"
+           inkscape:connector-curvature="0"
+           sodipodi:nodetypes="cccc" />
+      </g>
+    </g>
+    <path
+       style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+       d="m 349,3 0,1 -3,0 0,5.2265625 L 343.95508,10 347,13 l 0,0.904297 1.61133,1.425781 1.88867,-1.671875 1.89062,1.671875 L 354,13.90625 354,13 357.04492,10.044922 355,9.2617188 355,4 l -3,0 0,-1 -3,0 z m -2,2 7,0 0,3.8769531 L 350.48633,7.53125 347,8.8496094 347,5 Z m -0.2793,9.992188 -2.2207,1.966796 0.66211,0.748047 1.55859,-1.378906 L 348.61133,18 350.5,16.328125 352.39062,18 l 1.88868,-1.671875 1.55859,1.378906 0.66211,-0.748047 -2.2207,-1.966796 -1.88868,1.673828 -1.89062,-1.673828 -1.88867,1.673828 -1.89063,-1.673828 z"
+       transform="translate(0,1032.3622)"
+       id="path4341"
+       inkscape:connector-curvature="0" />
+    <g
+       id="g4384">
+      <path
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 370,1036.3505 2.81445,2.8203 -4.77734,4.7461 0,0.043 -0.0371,0 0,5.4023 2,0 0,-4.5762 4.22852,-4.2011 2.77148,2.7773 0,-7 -7,-0.012 z"
+         id="path4374"
+         inkscape:connector-curvature="0" />
+      <path
+         sodipodi:nodetypes="ccccccccc"
+         inkscape:connector-curvature="0"
+         id="path4378"
+         d="m 365.18556,1039.1708 4.77734,4.7461 0,0.043 0.0371,0 0,5.4023 -2,0 0,-4.5762 -4.22852,-4.2011 z"
+         style="fill:#000000;fill-opacity:0.5098038;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    </g>
+    <g
+       id="g4388"
+       transform="matrix(-1,0,0,1,760.00001,0)">
+      <path
+         inkscape:connector-curvature="0"
+         id="path4390"
+         d="m 370,1036.3505 2.81445,2.8203 -4.77734,4.7461 0,0.043 -0.0371,0 0,5.4023 2,0 0,-4.5762 4.22852,-4.2011 2.77148,2.7773 0,-7 -7,-0.012 z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+      <path
+         style="fill:#000000;fill-opacity:0.5098038;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 365.18556,1039.1708 4.77734,4.7461 0,0.043 0.0371,0 0,5.4023 -2,0 0,-4.5762 -4.22852,-4.2011 z"
+         id="path4392"
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="ccccccccc" />
+    </g>
+    <g
+       id="g4438">
+      <path
+         id="path4421"
+         transform="translate(0,1032.3622)"
+         d="m 407.0293,3.9882812 0,5.4023438 0.0371,0 0,0.042969 1.95117,1.9375 0,5.638672 2.8164,-2.820313 2.72657,2.796875 1.44531,-1.382812 -2.76758,-2.837891 0.0195,-0.02148 2.75977,-2.7460939 -5.5293,0.00977 -1.45898,-1.4433584 0,-4.5761719 -2,0 z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         inkscape:connector-curvature="0" />
+      <path
+         sodipodi:nodetypes="ccccccccc"
+         inkscape:connector-curvature="0"
+         id="path4423"
+         d="m 404.21408,1046.5416 4.77734,-4.7461 0,-0.043 0.0371,0 0,-5.4023 -2,0 0,4.5762 -4.22852,4.2011 z"
+         style="fill:#000000;fill-opacity:0.5098038;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    </g>
+    <g
+       id="g4442"
+       transform="matrix(-1,0,0,1,840.01754,0)">
+      <path
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 407.0293,3.9882812 0,5.4023438 0.0371,0 0,0.042969 1.95117,1.9375 0,5.638672 2.8164,-2.820313 2.72657,2.796875 1.44531,-1.382812 -2.76758,-2.837891 0.0195,-0.02148 2.75977,-2.7460939 -5.5293,0.00977 -1.45898,-1.4433557 0,-4.5761719 -2,0 z"
+         transform="translate(0,1032.3622)"
+         id="path4444"
+         inkscape:connector-curvature="0" />
+      <path
+         style="fill:#000000;fill-opacity:0.5098038;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 404.21408,1046.5416 4.77734,-4.7461 0,-0.043 0.0371,0 0,-5.4023 -2,0 0,4.5762 -4.22852,4.2011 z"
+         id="path4447"
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="ccccccccc" />
+    </g>
+    <g
+       id="g4465"
+       transform="translate(-0.99975,0)">
+      <path
+         sodipodi:nodetypes="ccccc"
+         inkscape:connector-curvature="0"
+         id="path4455"
+         d="m 449,1041.3622 4e-5,8 1.99996,0 -3e-5,-8 z"
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+      <path
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 454.0156,1045.3622 4.9844,-5 -5,-5 z"
+         id="path4457"
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="cccc" />
+      <path
+         style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 455,1039.3466 -6,0 0,2 6,-10e-5 z"
+         id="path4461"
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="ccccc" />
+      <path
+         sodipodi:nodetypes="ccccc"
+         inkscape:connector-curvature="0"
+         id="path4463"
+         d="m 451.01565,1039.3466 -7.9629,0 0,2 7.9629,-10e-5 z"
+         style="fill:#000000;fill-opacity:0.5098038;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    </g>
+    <path
+       sodipodi:nodetypes="ccccc"
+       inkscape:connector-curvature="0"
+       id="path4473"
+       d="m 472.053,1041.3622 -4e-5,8 -1.99996,0 3e-5,-8 z"
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 467.0374,1045.3622 -4.9844,-5 5,-5 z"
+       id="path4475"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="cccc" />
+    <path
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 466.053,1039.3466 6,0 0,2 -6,-10e-5 z"
+       id="path4477"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       sodipodi:nodetypes="ccccc"
+       inkscape:connector-curvature="0"
+       id="path4479"
+       d="m 470.03735,1039.3466 7.9629,0 0,2 -7.9629,-10e-5 z"
+       style="fill:#000000;fill-opacity:0.5098038;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 490,1036.3505 2.81445,2.8203 -4.77734,4.7461 0,0.043 -0.0371,0 0,5.4023 2,0 0,-4.5762 4.22852,-4.2011 2.77148,2.7773 0,-7 -7,-0.012 z"
+       id="path4491"
+       inkscape:connector-curvature="0" />
+    <path
+       style="fill:#000000;fill-opacity:0.50980392;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 490,1038.3622 -4e-5,11 -1.99996,0 3e-5,-11 z"
+       id="path4505"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="ccccc" />
+    <path
+       inkscape:connector-curvature="0"
+       id="path4510"
+       d="m 490,1036.3505 2.81445,2.8203 -4.77734,4.7461 0,0.043 -0.0371,0 0,5.4023 2,0 0,-4.5762 4.22852,-4.2011 2.77148,2.7773 0,-7 -7,-0.012 z"
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       inkscape:connector-curvature="0"
+       id="path4514"
+       d="m 510.00001,1036.3505 -2.81445,2.8203 4.77734,4.7461 0,0.043 0.0371,0 0,5.4023 -2,0 0,-4.5762 -4.22852,-4.2011 -2.77148,2.7773 0,-7 7,-0.012 z"
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       sodipodi:nodetypes="ccccc"
+       inkscape:connector-curvature="0"
+       id="path4516"
+       d="m 510.00001,1038.3622 4e-5,11 1.99996,0 -3e-5,-11 z"
+       style="fill:#000000;fill-opacity:0.5098038;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 510.00001,1036.3505 -2.81445,2.8203 4.77734,4.7461 0,0.043 0.0371,0 0,5.4023 -2,0 0,-4.5762 -4.22852,-4.2011 -2.77148,2.7773 0,-7 7,-0.012 z"
+       id="path4518"
+       inkscape:connector-curvature="0" />
+    <text
+       xml:space="preserve"
+       style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:125%;font-family:'Times New Roman';-inkscape-font-specification:'Times New Roman';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       x="7.5"
+       y="1065.3622"
+       id="text4238"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan4240"
+         x="7.5"
+         y="1065.3622">0    1     2     3    4     5     6     7    8     9   10  11   12    13   14  15   16  17   18  19   20   21   22  23   24  25</tspan></text>
+    <path
+       inkscape:connector-curvature="0"
+       style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 170,1045.3622 c -1.10457,0 -2,0.8954 -2,2 0,1.1046 0.89543,2 2,2 1.10457,0 2,-0.8954 2,-2 0,-1.1046 -0.89543,-2 -2,-2 z"
+       id="path3440"
+       sodipodi:nodetypes="sssss" />
+  </g>
+</svg>
diff --git a/app/assets/images/tab-icon.svg b/app/assets/images/tab-icon.svg
new file mode 100644 (file)
index 0000000..5e8bb31
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+        <g id="Logo_simple" fill="black">
+            <g id="layer1" transform="translate(0.234847, 0.091766)">
+                <path d="M1.75809857,15.5864714 C1.53259286,15.5296771 1.41476714,15.4360657 0.812798571,14.8354114 C0.0965871429,14.1207686 0.0506614286,14.0509914 0.05179,13.6792257 C0.0529328571,13.2638686 -0.0724585714,13.4124171 2.21577,11.1180486 C4.52671571,8.80090286 4.40771571,8.90189143 4.82581857,8.90298 C5.01909286,8.90355143 5.06773,8.91449429 5.22358143,8.99300286 L5.40114714,9.08244857 L5.96119286,8.5224 L6.52124143,7.96235429 L6.38092714,7.74361714 C6.10788714,7.31797429 5.85054429,6.69690286 5.73492714,6.18456286 C5.40852143,4.73815714 5.76038429,3.20801714 6.68624429,2.04756857 C8.28345857,0.0456714286 11.1528186,-0.398394286 13.27489,1.02790857 C14.4393671,1.81058286 15.1962414,3.01958 15.41179,4.44129714 C15.4573557,4.74184571 15.4576157,5.45568571 15.4123614,5.77276857 C15.2546157,6.87590286 14.7850586,7.81346 13.9961871,8.60042571 C13.5897757,9.00585143 13.2639443,9.24073714 12.7466671,9.50116857 C12.1308443,9.81121714 11.6083871,9.95670571 10.8984843,10.0158286 C9.88698143,10.1000686 8.76552714,9.82031714 7.90698143,9.26958571 L7.68824429,9.12927143 L7.12819857,9.68931714 L6.56815,10.2493657 L6.65759857,10.4269286 C6.73610714,10.58278 6.74711571,10.6314171 6.74761857,10.8246943 C6.74876143,11.2423057 6.84782429,11.1252714 4.54627857,13.4239743 C2.77385857,15.1942057 2.50102143,15.4561657 2.36526714,15.5180457 C2.19138714,15.5973029 1.92182714,15.6276857 1.75818714,15.5864714 L1.75809857,15.5864714 Z M11.2712243,9.15195429 C12.5502929,8.91782286 13.6672814,8.06622571 14.2271586,6.89834 C15.11979,5.03633714 14.5194471,2.84804286 12.7986071,1.69118857 C12.3880957,1.41521714 11.81485,1.18257714 11.27685,1.07362 C10.9041357,0.998134286 10.1154929,1.00585429 9.72675286,1.08879143 C9.14647571,1.21259143 8.61371286,1.44346 8.15203571,1.77118 C7.86672714,1.97370571 7.39628429,2.44395714 7.19702143,2.72580286 C6.09283,4.28761714 6.19273,6.36339429 7.44143,7.80428857 C8.08152143,8.54289714 8.96678714,9.02773714 9.94637571,9.17618571 C10.2716957,9.22548571 10.9358843,9.21333714 11.2712243,9.15195714 L11.2712243,9.15195429 Z M8.87038714,13.8891629 C8.10495286,13.6680029 7.47133,13.47936 7.46233286,13.4699514 C7.44547571,13.4523229 8.23654429,10.6468171 8.26791,10.6130286 C8.28353857,10.5962 10.9920157,11.3547 11.1029871,11.4069886 C11.1422157,11.4254743 11.1007014,11.5927571 10.7663043,12.7595514 C10.55651,13.49186 10.3722014,14.1373486 10.35673,14.1939686 C10.3412443,14.2505914 10.3136357,14.2956486 10.2953443,14.2940943 C10.2770586,14.2926657 9.63582143,14.1103229 8.87038714,13.8891629 Z M10.7425129,14.2243971 C10.7425129,14.1901514 11.5295357,11.4412371 11.5420243,11.43186 C11.57051,11.41046 14.31823,10.6433514 14.3287386,10.65386 C14.3411671,10.6662886 13.5606443,13.4390343 13.5401471,13.4552829 C13.5261471,13.4663686 10.8885243,14.2190457 10.8042814,14.2359886 C10.77031,14.2428171 10.7425129,14.2377029 10.7425129,14.2243886 L10.7425129,14.2243971 Z M6.17704429,12.99702 C6.72003857,12.4511857 7.20394143,11.9528 7.25238429,11.8894971 C7.36159286,11.7467771 7.51339,11.4185714 7.55467,11.2359114 C7.57172714,11.1604143 7.58871857,11.00994 7.59241857,10.9015229 L7.59916143,10.7043971 L7.71662429,10.6712457 C7.78122714,10.6530171 7.83903571,10.6430457 7.84508714,10.6491029 C7.86014429,10.66416 7.07001857,13.4236343 7.04369571,13.44788 C7.03212429,13.4585371 6.61025571,13.58476 6.10621857,13.72836 L5.18979,13.9894514 L6.17705857,12.9970257 L6.17704429,12.99702 Z M11.4998186,11.0334343 C11.4942186,11.0240914 11.4770471,10.9704486 11.4616586,10.91426 L11.4336871,10.8121 L11.5342043,10.7951 C12.3954786,10.6493829 13.3179014,10.245 14.0444586,9.69462571 C14.1482557,9.61599714 14.2070786,9.58646 14.2147129,9.60913429 C14.24993,9.71374571 14.3901814,10.2192829 14.38533,10.2241314 C14.3635014,10.24596 11.5078643,11.0468829 11.4998071,11.03344 L11.4998186,11.0334343 Z M1.81592714,10.1996943 C1.78271,10.1727514 1.05799286,7.71489143 1.00331,7.44372286 C0.992367143,7.38943143 1.09760429,7.41535143 2.39921571,7.78740286 C3.76114143,8.17670571 3.80759857,8.19218571 3.82654429,8.26301714 C3.84343,8.32619429 3.83240143,8.34579143 3.74602143,8.40596857 C3.69096429,8.44432571 3.25066714,8.87132571 2.76758143,9.35486 C2.28449857,9.83839429 1.88227,10.2340114 1.87374429,10.2340114 C1.86523,10.2340114 1.83919857,10.2185543 1.81592714,10.1996943 L1.81592714,10.1996943 Z M2.34190143,7.38647714 C1.57939286,7.16728 0.953287143,6.98616 0.950555714,6.98398857 C0.941012857,6.97641714 1.75870714,4.13697714 1.77517286,4.12051143 C1.78951571,4.10616857 4.61573,4.89800571 4.64506714,4.92457429 C4.65103857,4.92997429 4.47244429,5.57706 4.24821,6.36254286 C3.87799286,7.65939714 3.83535,7.79043429 3.78439286,7.78785714 C3.75353,7.78642857 3.10440714,7.60567714 2.34190143,7.38647714 L2.34190143,7.38647714 Z M4.24206143,7.73209429 C4.24986143,7.71146571 4.37809571,7.26840286 4.52699571,6.74748286 L4.79772429,5.80035429 L4.83301571,6.00625143 C4.89416429,6.36299429 5.00259571,6.76962857 5.13113857,7.12424286 C5.19946714,7.31273714 5.25150429,7.47034286 5.24677857,7.47448286 C5.24206429,7.47862571 5.03435286,7.53969143 4.78521571,7.61019429 C4.53607857,7.6807 4.30875286,7.74540286 4.28004714,7.75398 C4.24341857,7.76492286 4.23209,7.75840857 4.24206143,7.73209429 L4.24206143,7.73209429 Z M3.19294143,4.11930571 C2.43043571,3.89996 1.79997286,3.71025429 1.79191,3.69773714 C1.76571,3.65706286 0.991552857,0.923451429 1.00299286,0.912011429 C1.01907857,0.895925714 3.76999,1.68537143 3.79624714,1.71360286 C3.82569571,1.74526571 4.61754429,4.52458857 4.59607857,4.52095429 C4.58685,4.51952571 3.95545,4.33865143 3.19294143,4.11930571 Z M4.57080143,3.01922286 C4.41709,2.48026286 4.26802429,1.95798571 4.23954429,1.85860286 L4.18776429,1.67791143 L5.27576429,1.36771429 C5.87416143,1.19710571 6.38229286,1.05058571 6.40494143,1.04211143 C6.42759857,1.03362571 6.35263286,1.13099714 6.23837,1.25846857 C5.63074143,1.93633143 5.23238143,2.66270571 4.98042143,3.55221714 C4.93345571,3.71803143 4.89502714,3.8802 4.89502714,3.91259429 C4.89502714,4.10048857 4.82103571,3.89659429 4.57080143,3.01922286 Z" id="path3940"></path>
+            </g>
+        </g>
+</svg>
\ No newline at end of file
diff --git a/app/assets/images/wikipedia.png b/app/assets/images/wikipedia.png
new file mode 100644 (file)
index 0000000..784c184
Binary files /dev/null and b/app/assets/images/wikipedia.png differ
index 6f63efc2c95ac736b2676badb256ac1a73081c86..dd7147c74e1ad91ffb33d0f9ed0c4c6fd73ad031 100644 (file)
Binary files a/app/assets/images/wordpress.png and b/app/assets/images/wordpress.png differ
index 5064d115b91ada67fd2198077b3ad9125a12cfd6..4461c5ab71cc950e43a0c5ae5ac82003e0874840 100644 (file)
@@ -1,4 +1,4 @@
-//= require jquery
+//= require jquery3
 //= require jquery_ujs
 //= require jquery.timers
 //= require jquery.cookie
@@ -79,18 +79,6 @@ $(document).ready(function () {
   var headerWidth = 0,
       compactWidth = 0;
 
-  $("header").children(":visible").each(function (i,e) {
-    headerWidth = headerWidth + $(e).outerWidth();
-  });
-
-  $("body").addClass("compact");
-
-  $("header").children(":visible").each(function (i,e) {
-    compactWidth = compactWidth + $(e).outerWidth();
-  });
-
-  $("body").removeClass("compact");
-
   function updateHeader() {
     var windowWidth = $(window).width();
 
@@ -103,9 +91,29 @@ $(document).ready(function () {
     }
   }
 
-  updateHeader();
+  /*
+   * Chrome 60 and later seem to fire the "ready" callback
+   * before the DOM is fully ready causing us to measure the
+   * wrong sizes for the header elements - use a 0ms timeout
+   * to defer the measurement slightly as a workaround.
+   */
+  setTimeout(function () {
+    $("header").children(":visible").each(function (i,e) {
+      headerWidth = headerWidth + $(e).outerWidth();
+    });
+
+    $("body").addClass("compact");
+
+    $("header").children(":visible").each(function (i,e) {
+      compactWidth = compactWidth + $(e).outerWidth();
+    });
+
+    $("body").removeClass("compact");
+
+    updateHeader();
 
-  $(window).resize(updateHeader);
+    $(window).resize(updateHeader);
+  }, 0);
 
   $("#menu-icon").on("click", function(e) {
     e.preventDefault();
@@ -115,4 +123,24 @@ $(document).ready(function () {
   $("nav.primary li a").on("click", function() {
     $("header").toggleClass("closed");
   });
+
+  var application_data = $("head").data();
+
+  I18n.default_locale = OSM.DEFAULT_LOCALE;
+  I18n.locale = application_data.locale;
+  I18n.fallbacks = true;
+
+  OSM.preferred_editor = application_data.preferredEditor;
+
+  if (application_data.user) {
+    OSM.user = application_data.user;
+
+    if (application_data.userHome) {
+      OSM.home = application_data.userHome;
+    }
+  }
+
+  if (application_data.location) {
+    OSM.location = application_data.location;
+  }
 });
diff --git a/app/assets/javascripts/edit/id.js.erb b/app/assets/javascripts/edit/id.js.erb
new file mode 100644 (file)
index 0000000..9831171
--- /dev/null
@@ -0,0 +1,38 @@
+$(document).ready(function () {
+  var id = $("#id-embed");
+
+  if (id.data("key")) {
+    var hashParams = OSM.params(location.hash.substring(1)),
+        mapParams = OSM.mapParams(),
+        params = {};
+
+    if (mapParams.object) {
+      params.id = mapParams.object.type[0] + mapParams.object.id;
+      mapParams = OSM.parseHash(location.hash);
+      if (mapParams.center) {
+        params.map = mapParams.zoom + '/' + mapParams.center.lat + '/' + mapParams.center.lng;
+      }
+    } else if (id.data("lat") && id.data("lon")) {
+      params.map = "16/" + id.data("lat") + "/" + id.data("lon");
+    } else {
+      params.map = (mapParams.zoom || 17) + '/' + mapParams.lat + '/' + mapParams.lon;
+    }
+
+    if (hashParams.background) params.background = hashParams.background;
+    if (hashParams.comment) params.comment = hashParams.comment;
+    if (hashParams.disable_features) params.disable_features = hashParams.disable_features;
+    if (hashParams.hashtags) params.hashtags = hashParams.hashtags;
+    if (hashParams.offset) params.offset = hashParams.offset;
+    if (hashParams.walkthrough) params.walkthrough = hashParams.walkthrough;
+
+    if (id.data("gpx")) {
+      params.gpx = id.data("gpx");
+    } else if (hashParams.gpx) {
+      params.gpx = hashParams.gpx;
+    }
+
+    id.attr("src", id.data("url") + "#" + querystring.stringify(params));
+  } else {
+    alert(I18n.t("site.edit.id_not_configured"));
+  }
+});
diff --git a/app/assets/javascripts/edit/potlatch.js.erb b/app/assets/javascripts/edit/potlatch.js.erb
new file mode 100644 (file)
index 0000000..d55d2ea
--- /dev/null
@@ -0,0 +1,61 @@
+//= require swfobject
+
+$(document).ready(function () {
+  window.changesaved = true;
+
+  window.markChanged = function (saved) {
+    window.changesaved = saved;
+  }
+
+  $(window).on("beforeunload", function() {
+    if (!window.changesaved) {
+      return I18n.t("site.edit.potlatch_unsaved_changes");
+    }
+  });
+
+  window.updatelinks = function (lon, lat, zoom, layers, minlon, minlat, maxlon, maxlat, object) {
+    var hash = OSM.formatHash({ lon: lon, lat: lat, zoom: zoom });
+
+    if (hash !== location.hash) {
+      location.replace(hash);
+    }
+
+    updateLinks({ lon: lon, lat: lat }, zoom);
+  }
+
+  var potlatch = $("#potlatch"),
+      urlparams = OSM.params(),
+      potlatch_swf = <%= asset_path("potlatch/potlatch.swf").to_json %>,
+      install_swf = <%= asset_path("expressInstall.swf").to_json %>,
+      flashvars = {},
+      params = {},
+      attributes = {};
+
+  flashvars.winie = document.all && window.print ? true : false;
+  flashvars.token = potlatch.data("token");
+
+  if (potlatch.data("lat") && potlatch.data("lon")) {
+    flashvars.lat = potlatch.data("lat");
+    flashvars.long = potlatch.data("lon");
+    flashvars.scale = potlatch.data("zoom");
+  } else {
+    var mapParams = OSM.mapParams();
+
+    flashvars.lat = mapParams.lat;
+    flashvars.long = mapParams.lon;
+    flashvars.scale = mapParams.zoom || 17;
+  }
+
+  if (flashvars.scale < 11) flashvars.scale = 11;
+
+  if (urlparams.gpx) flashvars.gpx = urlparams.gpx;
+  if (urlparams.way) flashvars.way = urlparams.way;
+  if (urlparams.node) flashvars.node = urlparams.node;
+  if (urlparams.custombg) flashvars.custombg = urlparams.custombg;
+
+  attributes.id = "potlatch";
+  attributes.bgcolor = "#FFFFFF";
+
+  swfobject.embedSWF(potlatch_swf, "potlatch", "100%", "100%", "6",
+                     install_swf, flashvars, params, attributes);
+});
diff --git a/app/assets/javascripts/edit/potlatch2.js.erb b/app/assets/javascripts/edit/potlatch2.js.erb
new file mode 100644 (file)
index 0000000..d5c6ecd
--- /dev/null
@@ -0,0 +1,83 @@
+//= require swfobject
+
+$(document).ready(function () {
+  window.changesaved = true;
+
+  window.markChanged = function (saved) {
+    window.changesaved = saved;
+  }
+
+  $(window).on("beforeunload", function() {
+    if (!window.changesaved) {
+      return I18n.t("site.edit.potlatch2_unsaved_changes");
+    }
+  });
+
+  window.mapMoved = $.throttle(250, function(lon, lat, zoom) {
+    var hash = OSM.formatHash({ lon: lon, lat: lat, zoom: zoom });
+
+    if (hash !== location.hash) {
+      location.replace(hash);
+    }
+
+    updateLinks({ lon: lon, lat: lat }, zoom);
+  });
+
+  var potlatch = $("#potlatch"),
+      urlparams = OSM.params(),
+      potlatch_swf = <%= asset_path("potlatch2.swf").to_json %>,
+      install_swf = <%= asset_path("expressInstall.swf").to_json %>,
+      flashvars = {},
+      params = {};
+      attributes = {};
+
+  if (potlatch.data("lat") && potlatch.data("lon")) {
+    flashvars.lat = potlatch.data("lat");
+    flashvars.lon = potlatch.data("lon");
+    flashvars.zoom = potlatch.data("zoom");
+  } else {
+    var mapParams = OSM.mapParams();
+
+    flashvars.lat = mapParams.lat;
+    flashvars.lon = mapParams.lon;
+    flashvars.zoom = mapParams.zoom || 17;
+  }
+  
+  if (potlatch.data("token")) {
+    flashvars.oauth_token = potlatch.data("token");
+    flashvars.oauth_token_secret = potlatch.data("token-secret");
+    flashvars.oauth_consumer_key = potlatch.data("consumer-key");
+    flashvars.oauth_consumer_secret = potlatch.data("consumer-secret");
+  } else {
+    alert(I18n.t("site.edit.potlatch2_not_configured"));
+  }
+
+  flashvars.assets = <%= asset_path("potlatch2/assets.zip").to_json %>;
+  flashvars.font_library = <%= asset_path("potlatch2/FontLibrary.swf").to_json %>;
+  flashvars.locale = potlatch.data("locale");
+  flashvars.locale_paths = potlatch.data("locale") + "=" + potlatch.data("locale-path");
+  flashvars.intro_image = <%= asset_path("help/introduction.jpg").to_json %>;
+  flashvars.intro_video = <%= asset_path("help/introduction.mp4").to_json %>;
+  if (urlparams.gpx) flashvars.gpx = urlparams.gpx;
+  if (urlparams.tileurl) flashvars.tileurl = urlparams.tileurl;
+  flashvars.api = location.protocol + "//" + location.host + "/api/" + OSM.API_VERSION + "/";
+  flashvars.policy = location.protocol + "//" + location.host + "/api/crossdomain.xml";
+  flashvars.connection = "XML";
+  flashvars.show_help = "once";
+  flashvars.user_check = "warn";
+  flashvars.maximise_function = "maximiseMap";
+  flashvars.minimise_function = "minimiseMap";
+  flashvars.move_function = "mapMoved";
+
+  params.base = "/potlatch2";
+
+  attributes.id = "potlatch";
+  attributes.bgcolor = "#FFFFFF";
+
+  swfobject.embedSWF(potlatch_swf, "potlatch", "100%", "100%", "10.1.102",
+                     install_swf, flashvars, params, attributes);
+
+  if (flashvars.lat && flashvars.lon) {
+    updateLinks({ lon: flashvars.lon, lat: flashvars.lat }, flashvars.scale);
+  }
+});
index ca5594459101720b3e95d297c40411e9a21ba1b8..15839a2ecbc4af23102a608c0804a4b988d92916 100644 (file)
@@ -1,7 +1,14 @@
 //= require leaflet
 //= require leaflet.osm
+//= require i18n/translations
 
 window.onload = function () {
+  if (navigator.languages) {
+    I18n.locale = navigator.languages[0];
+  } else if (navigator.language) {
+    I18n.locale = navigator.language;
+  }
+
   var query = (window.location.search || '?').substr(1),
       args  = {};
 
@@ -11,18 +18,22 @@ window.onload = function () {
     args[parts[0]] = decodeURIComponent(parts[1] || '');
   }
 
+  var thunderforestOptions = {
+<% if defined?(THUNDERFOREST_KEY) %>
+    apikey: <%= THUNDERFOREST_KEY.to_json %>
+<% end %>
+  };
+
   var map = L.map("map");
   map.attributionControl.setPrefix('');
   map.removeControl(map.attributionControl);
 
-  if (!args.layer || args.layer === "mapnik" || args.layer === "osmarender") {
+  if (!args.layer || args.layer === "mapnik" || args.layer === "osmarender" || args.layer === "mapquest") {
     new L.OSM.Mapnik().addTo(map);
   } else if (args.layer === "cyclemap" || args.layer === "cycle map") {
-    new L.OSM.CycleMap().addTo(map);
+    new L.OSM.CycleMap(thunderforestOptions).addTo(map);
   } else if (args.layer === "transportmap") {
-    new L.OSM.TransportMap().addTo(map);
-  } else if (args.layer === "mapquest") {
-    new L.OSM.MapQuestOpen().addTo(map);
+    new L.OSM.TransportMap(thunderforestOptions).addTo(map);
   } else if (args.layer === "hot") {
     new L.OSM.HOT().addTo(map);
   }
@@ -51,7 +62,7 @@ window.onload = function () {
 L.Control.OSMReportAProblem = L.Control.Attribution.extend({
   options: {
     position: 'bottomright',
-    prefix: '<a href="http://www.openstreetmap.org/fixthemap?lat={x}&lon={y}&zoom={z}">Report a problem</a>'
+    prefix: '<a href="http://www.openstreetmap.org/fixthemap?lat={x}&lon={y}&zoom={z}" target="_blank">'+I18n.t('javascripts.embed.report_problem')+'</a>'
   },
 
   onAdd: function (map) {
index 86d2df7e402683a52d9d01cd63f7ee0bb004c590..dd7cd3325f10f293311e79435cec6633a3d1f8ac 100644 (file)
@@ -1,3 +1,58 @@
 //= require iD
-//= require presets
-//= require imagery
+
+/* globals iD */
+
+document.addEventListener("DOMContentLoaded", function() {
+  var container = document.getElementById("id-container");
+
+  if (typeof iD === 'undefined' || !iD.Detect().support) {
+    container.innerHTML = 'This editor is supported ' +
+      'in Firefox, Chrome, Safari, Opera, Edge, and Internet Explorer 11. ' +
+      'Please upgrade your browser or use Potlatch 2 to edit the map.';
+    container.className = 'unsupported';
+  } else {
+    var id = iD.Context()
+      .embed(true)
+      .assetPath("iD/")
+      .assetMap(JSON.parse(container.dataset.assetMap))
+      .locale(container.dataset.locale, container.dataset.localePath)
+      .preauth({
+        urlroot: location.protocol + "//" + location.host,
+        oauth_consumer_key: container.dataset.consumerKey,
+        oauth_secret: container.dataset.consumerSecret,
+        oauth_token: container.dataset.token,
+        oauth_token_secret: container.dataset.tokenSecret
+      });
+
+    id.map().on('move.embed', parent.$.throttle(250, function() {
+      if (id.inIntro()) return;
+      var zoom = ~~id.map().zoom(),
+        center = id.map().center(),
+        llz = { lon: center[0], lat: center[1], zoom: zoom };
+
+      parent.updateLinks(llz, zoom);
+
+      // Manually resolve URL to avoid iframe JS context weirdness.
+      // http://bl.ocks.org/jfirebaugh/5439412
+      var hash = parent.OSM.formatHash(llz);
+      if (hash !== parent.location.hash) {
+        parent.location.replace(parent.location.href.replace(/(#.*|$)/, hash));
+      }
+    }));
+
+    parent.$("body").on("click", "a.set_position", function (e) {
+      e.preventDefault();
+      var data = parent.$(this).data();
+
+      // 0ms timeout to avoid iframe JS context weirdness.
+      // http://bl.ocks.org/jfirebaugh/5439412
+      setTimeout(function() {
+        id.map().centerZoom(
+          [data.lon, data.lat],
+          Math.max(data.zoom || 15, 13));
+      }, 0);
+    });
+
+    id.ui()(container);
+  }
+});
index 085b615c7244f66214f2cddee69f89400c28d3d0..00e6a9d32a0d815b05676e0428540fc6a82ac16a 100644 (file)
@@ -7,6 +7,8 @@
 //= require leaflet.share
 //= require leaflet.polyline
 //= require leaflet.query
+//= require leaflet.contextmenu
+//= require index/contextmenu
 //= require index/search
 //= require index/browse
 //= require index/export
@@ -77,7 +79,8 @@ $(document).ready(function () {
 
   var map = new L.OSM.Map("map", {
     zoomControl: false,
-    layerControl: false
+    layerControl: false,
+    contextmenu: true
   });
 
   map.attributionControl.setPrefix('');
@@ -95,14 +98,26 @@ $(document).ready(function () {
   L.OSM.zoom({position: position})
     .addTo(map);
 
-  L.control.locate({
+  var locate = L.control.locate({
     position: position,
+    icon: 'icon geolocate',
+    iconLoading: 'icon geolocate',
     strings: {
       title: I18n.t('javascripts.map.locate.title'),
       popup: I18n.t('javascripts.map.locate.popup')
     }
   }).addTo(map);
 
+  var locateContainer = locate.getContainer();
+
+  $(locateContainer)
+    .removeClass('leaflet-control-locate leaflet-bar')
+    .addClass('control-locate')
+    .children("a")
+    .attr('href', '#')
+    .removeClass('leaflet-bar-part leaflet-bar-part-single')
+    .addClass('control-button');
+
   var sidebar = L.OSM.sidebar('#map-ui')
     .addTo(map);
 
@@ -136,6 +151,8 @@ $(document).ready(function () {
   L.control.scale()
     .addTo(map);
 
+  OSM.initializeContextMenu(map);
+
   if (OSM.STATUS !== 'api_offline' && OSM.STATUS !== 'database_offline') {
     OSM.initializeNotes(map);
     if (params.layers.indexOf(map.noteLayer.options.code) >= 0) {
@@ -146,6 +163,10 @@ $(document).ready(function () {
     if (params.layers.indexOf(map.dataLayer.options.code) >= 0) {
       map.addLayer(map.dataLayer);
     }
+
+    if (params.layers.indexOf(map.gpsLayer.options.code) >= 0) {
+      map.addLayer(map.gpsLayer);
+    }
   }
 
   var placement = $('html').attr('dir') === 'rtl' ? 'right' : 'left';
@@ -161,17 +182,29 @@ $(document).ready(function () {
       map.getLayersCode(),
       map._object);
 
-    $.removeCookie("_osm_location");
-    $.cookie("_osm_location", OSM.locationCookie(map), { expires: expiry, path: "/" });
+    $.removeCookie('_osm_location');
+    $.cookie('_osm_location', OSM.locationCookie(map), { expires: expiry, path: '/' });
   });
 
   if ($.cookie('_osm_welcome') === 'hide') {
     $('.welcome').hide();
   }
 
-  $('.welcome .close').on('click', function() {
+  $('.welcome .close-wrap').on('click', function() {
     $('.welcome').hide();
-    $.cookie("_osm_welcome", 'hide', { expires: expiry });
+    $.cookie('_osm_welcome', 'hide', { expires: expiry, path: '/' });
+  });
+
+  var bannerExpiry = new Date();
+  bannerExpiry.setYear(bannerExpiry.getFullYear() + 1);
+
+  $('#banner .close-wrap').on('click', function(e) {
+    var cookieId = e.target.id;
+    $('#banner').hide();
+    e.preventDefault();
+    if (cookieId) {
+      $.cookie(cookieId, 'hide', { expires: bannerExpiry, path: '/' });
+    }
   });
 
   if (OSM.PIWIK) {
@@ -192,10 +225,8 @@ $(document).ready(function () {
     map.setView([params.lat, params.lon], params.zoom);
   }
 
-  var marker = L.marker([0, 0], {icon: OSM.getUserIcon()});
-
   if (params.marker) {
-    marker.setLatLng([params.mlat, params.mlon]).addTo(map);
+    L.marker([params.mlat, params.mlon]).addTo(map);
   }
 
   $("#homeanchor").on("click", function(e) {
@@ -205,7 +236,7 @@ $(document).ready(function () {
       center = L.latLng(data.lat, data.lon);
 
     map.setView(center, data.zoom);
-    marker.setLatLng(center).addTo(map);
+    L.marker(center, {icon: OSM.getUserIcon()}).addTo(map);
   });
 
   function remoteEditHandler(bbox, object) {
diff --git a/app/assets/javascripts/index/contextmenu.js b/app/assets/javascripts/index/contextmenu.js
new file mode 100644 (file)
index 0000000..148ccf9
--- /dev/null
@@ -0,0 +1,85 @@
+OSM.initializeContextMenu = function (map) {
+  map.contextmenu.addItem({
+    text: I18n.t("javascripts.context.directions_from"),
+    callback: function directionsFromHere(e) {
+      var precision = OSM.zoomPrecision(map.getZoom()),
+          latlng = e.latlng.wrap(),
+          lat = latlng.lat.toFixed(precision),
+          lng = latlng.lng.toFixed(precision);
+
+      OSM.router.route("/directions?" + querystring.stringify({
+        route: lat + "," + lng + ";" + $("#route_to").val()
+      }));
+    }
+  });
+
+  map.contextmenu.addItem({
+    text: I18n.t("javascripts.context.directions_to"),
+    callback: function directionsToHere(e) {
+      var precision = OSM.zoomPrecision(map.getZoom()),
+          latlng = e.latlng.wrap(),
+          lat = latlng.lat.toFixed(precision),
+          lng = latlng.lng.toFixed(precision);
+
+      OSM.router.route("/directions?" + querystring.stringify({
+        route: $("#route_from").val() + ";" + lat + "," + lng
+      }));
+    }
+  });
+
+  map.contextmenu.addItem({
+    text: I18n.t("javascripts.context.add_note"),
+    callback: function addNoteHere(e) {
+      var precision = OSM.zoomPrecision(map.getZoom()),
+          latlng = e.latlng.wrap(),
+          lat = latlng.lat.toFixed(precision),
+          lng = latlng.lng.toFixed(precision);
+
+      OSM.router.route("/note/new?lat=" + lat + "&lon=" + lng);
+    }
+  });
+
+  map.contextmenu.addItem({
+    text: I18n.t("javascripts.context.show_address"),
+    callback: function describeLocation(e) {
+      var precision = OSM.zoomPrecision(map.getZoom()),
+          latlng = e.latlng.wrap(),
+          lat = latlng.lat.toFixed(precision),
+          lng = latlng.lng.toFixed(precision);
+
+      OSM.router.route("/search?query=" + encodeURIComponent(lat + "," + lng));
+    }
+  });
+
+  map.contextmenu.addItem({
+    text: I18n.t("javascripts.context.query_features"),
+    callback: function queryFeatures(e) {
+      var precision = OSM.zoomPrecision(map.getZoom()),
+          latlng = e.latlng.wrap(),
+          lat = latlng.lat.toFixed(precision),
+          lng = latlng.lng.toFixed(precision);
+
+      OSM.router.route("/query?lat=" + lat + "&lon=" + lng);
+    }
+  });
+
+  map.contextmenu.addItem({
+    text: I18n.t("javascripts.context.centre_map"),
+    callback: function centreMap(e) {
+      map.panTo(e.latlng);
+    }
+  });
+
+  map.on("mousedown", function (e) {
+    if (e.originalEvent.shiftKey) map.contextmenu.disable();
+    else map.contextmenu.enable();
+  });
+
+  var updateMenu = function updateMenu () {
+    map.contextmenu.setDisabled(2, map.getZoom() < 12);
+    map.contextmenu.setDisabled(4, map.getZoom() < 14);
+  };
+
+  map.on("zoomend", updateMenu);
+  updateMenu();
+};
index a141045a3da13141d0b075f09303f654ee2a3f77..bb835f2fb277f21d6db8ea946590f760782deeac 100644 (file)
@@ -26,6 +26,9 @@ OSM.Directions = function (map) {
     Endpoint($("input[name='route_to']"), OSM.MARKER_RED)
   ];
 
+  var expiry = new Date();
+  expiry.setYear(expiry.getFullYear() + 10);
+
   function Endpoint(input, iconUrl) {
     var endpoint = {};
 
@@ -207,8 +210,13 @@ OSM.Directions = function (map) {
         '<span class="icon close"></span></a>' + I18n.t('javascripts.directions.directions') +
         '</h2><p id="routing_summary">' +
         I18n.t('javascripts.directions.distance') + ': ' + formatDistance(route.distance) + '. ' +
-        I18n.t('javascripts.directions.time') + ': ' + formatTime(route.time) + '.</p>' +
-        '<table id="turnbyturn" />';
+        I18n.t('javascripts.directions.time') + ': ' + formatTime(route.time) + '.';
+      if (typeof route.ascend !== 'undefined' && typeof route.descend !== 'undefined') {
+        html += '<br />' +
+          I18n.t('javascripts.directions.ascend') + ': ' + Math.round(route.ascend) + 'm. ' +
+          I18n.t('javascripts.directions.descend') + ': ' + Math.round(route.descend) +'m.';
+      }
+      html += '</p><table id="turnbyturn" />';
 
       $('#sidebar_content')
         .html(html);
@@ -287,10 +295,15 @@ OSM.Directions = function (map) {
     select.append("<option value='" + i + "'>" + I18n.t('javascripts.directions.engines.' + engine.id) + "</option>");
   });
 
-  setEngine('osrm_car');
+  var chosenEngineId = $.cookie('_osm_directions_engine');
+  if(!chosenEngineId) {
+    chosenEngineId = 'osrm_car';
+  }
+  setEngine(chosenEngineId);
 
   select.on("change", function (e) {
     chosenEngine = engines[e.target.selectedIndex];
+    $.cookie('_osm_directions_engine', chosenEngine.id, { expires: expiry, path: '/' });
     if (map.hasLayer(polyline)) {
       getRoute();
     }
@@ -302,10 +315,14 @@ OSM.Directions = function (map) {
   });
 
   $(".routing_marker").on('dragstart', function (e) {
-    e.originalEvent.dataTransfer.effectAllowed = 'move';
-    e.originalEvent.dataTransfer.setData('type', $(this).data('type'));
-    var img = $("<img>").attr("src", $(e.originalEvent.target).attr("src"));
-    e.originalEvent.dataTransfer.setDragImage(img.get(0), 12, 21);
+    var dt = e.originalEvent.dataTransfer;
+    dt.effectAllowed = 'move';
+    var dragData = { type: $(this).data('type') };
+    dt.setData('text', JSON.stringify(dragData));
+    if (dt.setDragImage) {
+      var img = $("<img>").attr("src", $(e.originalEvent.target).attr("src"));
+      dt.setDragImage(img.get(0), 12, 21);
+    }
   });
 
   var page = {};
@@ -321,7 +338,8 @@ OSM.Directions = function (map) {
     $("#map").on('drop', function (e) {
       e.preventDefault();
       var oe = e.originalEvent;
-      var type = oe.dataTransfer.getData('type');
+      var dragData = JSON.parse(oe.dataTransfer.getData('text'));
+      var type = dragData.type;
       var pt = L.DomEvent.getMousePosition(oe, map.getContainer());  // co-ordinates of the mouse pointer at present
       pt.y += 20;
       var ll = map.containerPointToLatLng(pt);
index 2d3455eeeda6ac1ca058de6f08bc71fc39c8f67a..2058a4daf4437bf13955f2d4abefcb4406bdb436 100644 (file)
@@ -1,31 +1,32 @@
 function GraphHopperEngine(id, vehicleType) {
   var GH_INSTR_MAP = {
-    "-3": 6, // sharp left
-    "-2": 7, // left
-    "-1": 8, // slight left
+    "-3": 7, // sharp left
+    "-2": 6, // left
+    "-1": 5, // slight left
     0: 0, // straight
     1: 1, // slight right
     2: 2, // right
     3: 3, // sharp right
-    4: -1, // finish reached
-    5: -1, // via reached
-    6: 11 // roundabout
+    4: 14, // finish reached
+    5: 14, // via reached
+    6: 10 // roundabout
   };
 
   return {
     id: id,
-    creditline: '<a href="https://graphhopper.com/" target="_blank">Graphhopper</a>',
+    creditline: '<a href="https://www.graphhopper.com/" target="_blank">Graphhopper</a>',
     draggable: false,
 
     getRoute: function (points, callback) {
       // GraphHopper Directions API documentation
-      // https://github.com/graphhopper/directions-api/blob/master/docs-routing.md
+      // https://graphhopper.com/api/1/docs/routing/
       return $.ajax({
-        url: document.location.protocol + "//graphhopper.com/api/1/route",
+        url: document.location.protocol + OSM.GRAPHHOPPER_URL,
         data: {
           vehicle: vehicleType,
           locale: I18n.currentLocale(),
           key: "LijBPDQGfu7Iiq80w3HzwB4RUDJbMbhs6BU0dEnn",
+          "ch.disable": vehicleType === "car",
           type: "jsonp",
           elevation: false,
           instructions: true,
@@ -44,17 +45,21 @@ function GraphHopperEngine(id, vehicleType) {
           var len = path.instructions.length;
           for (var i = 0; i < len; i++) {
             var instr = path.instructions[i];
-            var instrCode = (i === len - 1) ? 15 : GH_INSTR_MAP[instr.sign];
+            var instrCode = (i === len - 1) ? 14 : GH_INSTR_MAP[instr.sign];
             var instrText = "<b>" + (i + 1) + ".</b> ";
             instrText += instr.text;
             var latLng = line[instr.interval[0]];
             var distInMeter = instr.distance;
+            var lineseg = [];
+            for (var j = instr.interval[0]; j <= instr.interval[1]; j++) {
+              lineseg.push({lat: line[j][0], lng: line[j][1]});
+            }
             steps.push([
-              {lat: latLng.lat, lng: latLng.lng},
+              {lat: latLng[0], lng: latLng[1]},
               instrCode,
               instrText,
               distInMeter,
-              []
+              lineseg
             ]); // TODO does graphhopper map instructions onto line indices?
           }
 
@@ -62,7 +67,9 @@ function GraphHopperEngine(id, vehicleType) {
             line: line,
             steps: steps,
             distance: path.distance,
-            time: path.time / 1000
+            time: path.time / 1000,
+            ascend: path.ascend,
+            descend: path.descend
           });
         },
         error: function () {
@@ -73,5 +80,6 @@ function GraphHopperEngine(id, vehicleType) {
   };
 }
 
+OSM.Directions.addEngine(new GraphHopperEngine("graphhopper_car", "car"), true);
 OSM.Directions.addEngine(new GraphHopperEngine("graphhopper_bicycle", "bike"), true);
 OSM.Directions.addEngine(new GraphHopperEngine("graphhopper_foot", "foot"), true);
index f46d94dcff92447328a979bf5356a753f76aa5bb..fcc47f103544ed3e99943eb5df17c573b655a826 100644 (file)
@@ -5,25 +5,25 @@
 
 function MapQuestEngine(id, routeType) {
   var MQ_SPRITE_MAP = {
-    0: 1, // straight
-    1: 2, // slight right
-    2: 3, // right
-    3: 4, // sharp right
-    4: 5, // reverse
-    5: 6, // sharp left
-    6: 7, // left
-    7: 8, // slight left
-    8: 5, // right U-turn
-    9: 5, // left U-turn
-    10: 2, // right merge
-    11: 8, // left merge
-    12: 2, // right on-ramp
-    13: 8, // left on-ramp
-    14: 2, // right off-ramp
-    15: 8, // left off-ramp
-    16: 2, // right fork
-    17: 8, // left fork
-    18: 1  // straight fork
+    0: 0, // straight
+    1: 1, // slight right
+    2: 2, // right
+    3: 3, // sharp right
+    4: 4, // reverse
+    5: 7, // sharp left
+    6: 6, // left
+    7: 5, // slight left
+    8: 4, // right U-turn
+    9: 4, // left U-turn
+    10: 21, // right merge
+    11: 20, // left merge
+    12: 21, // right on-ramp
+    13: 20, // left on-ramp
+    14: 24, // right off-ramp
+    15: 25, // left off-ramp
+    16: 18, // right fork
+    17: 19, // left fork
+    18: 0  // straight fork
   };
 
   return {
@@ -36,7 +36,7 @@ function MapQuestEngine(id, routeType) {
       var to = points[points.length - 1];
 
       return $.ajax({
-        url: document.location.protocol + "//open.mapquestapi.com/directions/v2/route",
+        url: document.location.protocol + OSM.MAPQUEST_DIRECTIONS_URL,
         data: {
           key: OSM.MAPQUEST_KEY,
           from: from.lat + "," + from.lng,
index 73643ba465faa613da1426b50bbd85df0bc57967..981fc380746710525809eafa57c493e28de43fef 100644 (file)
@@ -1,45 +1,45 @@
 function MapzenEngine(id, costing) {
   var MZ_INSTR_MAP = [
-    1,  // kNone = 0;
-    14, // kStart = 1;
-    14, // kStartRight = 2;
-    14, // kStartLeft = 3;
-    15, // kDestination = 4;
-    15, // kDestinationRight = 5;
-    15, // kDestinationLeft = 6;
-    1,  // kBecomes = 7;
-    1,  // kContinue = 8;
-    2,  // kSlightRight = 9;
-    3,  // kRight = 10;
-    4,  // kSharpRight = 11;
-    5,  // kUturnRight = 12;
-    5,  // kUturnLeft = 13;
-    6,  // kSharpLeft = 14;
-    7,  // kLeft = 15;
-    8,  // kSlightLeft = 16;
-    1,  // kRampStraight = 17;
-    2 // kRampRight = 18;
-    8,  // kRampLeft = 19;
-    2 // kExitRight = 20;
-    8,  // kExitLeft = 21;
-    1,  // kStayStraight = 22;
-    2,  // kStayRight = 23;
-    8,  // kStayLeft = 24;
-    1,  // kMerge = 25;
-    11, // kRoundaboutEnter = 26;
-    12, // kRoundaboutExit = 27;
-    18, // kFerryEnter = 28;
-    1   // kFerryExit = 29;
+    0,  // kNone = 0;
+    8, // kStart = 1;
+    8, // kStartRight = 2;
+    8, // kStartLeft = 3;
+    14,  // kDestination = 4;
+    14,  // kDestinationRight = 5;
+    14,  // kDestinationLeft = 6;
+    0,  // kBecomes = 7;
+    0,  // kContinue = 8;
+    1,  // kSlightRight = 9;
+    2,  // kRight = 10;
+    3,  // kSharpRight = 11;
+    4,  // kUturnRight = 12;
+    4,  // kUturnLeft = 13;
+    7,  // kSharpLeft = 14;
+    6,  // kLeft = 15;
+    5,  // kSlightLeft = 16;
+    0,  // kRampStraight = 17;
+    24, // kRampRight = 18;
+    25, // kRampLeft = 19;
+    24, // kExitRight = 20;
+    25, // kExitLeft = 21;
+    0,  // kStayStraight = 22;
+    1,  // kStayRight = 23;
+    5,  // kStayLeft = 24;
+    20, // kMerge = 25;
+    10, // kRoundaboutEnter = 26;
+    11, // kRoundaboutExit = 27;
+    17, // kFerryEnter = 28;
+    0   // kFerryExit = 29;
   ];
 
   return {
     id: id,
-    creditline: "<a href='https://mapzen.com/projects/valhalla' target='_blank'>Mapzen</a>",
+    creditline: "<a href='https://mapzen.com/products/turn-by-turn/' target='_blank'>Mapzen</a>",
     draggable: false,
 
     getRoute: function (points, callback) {
       return $.ajax({
-        url: document.location.protocol + "//valhalla.mapzen.com/route",
+        url: document.location.protocol + OSM.MAPZEN_VALHALLA_URL,
         data: {
           api_key: OSM.MAPZEN_VALHALLA_KEY,
           json: JSON.stringify({
index d9ce0a6b1fe9f0e803e77495ee60104ed395bec3..69191e65a6b448516044cf5a9c8280a5a2212788 100644 (file)
 // Doesn't yet support hints
 
 function OSRMEngine() {
-  var previousPoints, hintData;
+  var cachedHints = [];
 
   return {
     id: "osrm_car",
     creditline: '<a href="http://project-osrm.org/" target="_blank">OSRM</a>',
     draggable: true,
 
+    _transformSteps: function(input_steps, line) {
+      var INSTRUCTION_TEMPLATE = {
+        'continue': 'javascripts.directions.instructions.continue',
+        'merge right': 'javascripts.directions.instructions.merge_right',
+        'merge left': 'javascripts.directions.instructions.merge_left',
+        'off ramp right': 'javascripts.directions.instructions.offramp_right',
+        'off ramp left': 'javascripts.directions.instructions.offramp_left',
+        'on ramp right': 'javascripts.directions.instructions.onramp_right',
+        'on ramp left': 'javascripts.directions.instructions.onramp_left',
+        'fork right': 'javascripts.directions.instructions.fork_right',
+        'fork left': 'javascripts.directions.instructions.fork_left',
+        'end of road right': 'javascripts.directions.instructions.endofroad_right',
+        'end of road left': 'javascripts.directions.instructions.endofroad_left',
+        'turn straight': 'javascripts.directions.instructions.continue',
+        'turn slight right': 'javascripts.directions.instructions.slight_right',
+        'turn right': 'javascripts.directions.instructions.turn_right',
+        'turn sharp right': 'javascripts.directions.instructions.sharp_right',
+        'turn uturn': 'javascripts.directions.instructions.uturn',
+        'turn sharp left': 'javascripts.directions.instructions.sharp_left',
+        'turn left': 'javascripts.directions.instructions.turn_left',
+        'turn slight left': 'javascripts.directions.instructions.slight_left',
+        'roundabout': 'javascripts.directions.instructions.roundabout',
+        'rotary': 'javascripts.directions.instructions.roundabout',
+        'depart': 'javascripts.directions.instructions.start',
+        'arrive': 'javascripts.directions.instructions.destination',
+      };
+      var ICON_MAP = {
+        'continue': 0,
+        'merge right': 21,
+        'merge left': 20,
+        'off ramp right': 24,
+        'off ramp left': 25,
+        'on ramp right': 2,
+        'on ramp left': 6,
+        'fork right': 18,
+        'fork left': 19,
+        'end of road right': 22,
+        'end of road left': 23,
+        'turn straight': 0,
+        'turn slight right': 1,
+        'turn right': 2,
+        'turn sharp right': 3,
+        'turn uturn': 4,
+        'turn slight left': 5,
+        'turn left': 6,
+        'turn sharp left': 7,
+        'roundabout': 10,
+        'rotary': 10,
+        'depart': 8,
+        'arrive': 14
+      };
+      var transformed_steps = input_steps.map(function(step, idx) {
+        var maneuver_id;
+
+        // special case handling
+        switch (step.maneuver.type) {
+          case 'on ramp':
+          case 'off ramp':
+          case 'merge':
+          case 'end of road':
+          case 'fork':
+            maneuver_id = step.maneuver.type + ' ' + (step.maneuver.modifier.indexOf('left') >= 0 ? 'left' : 'right');
+            break;
+          case 'depart':
+          case 'arrive':
+          case 'roundabout':
+          case 'rotary':
+            maneuver_id = step.maneuver.type;
+            break;
+          case 'roundabout turn':
+          case 'turn':
+            maneuver_id = "turn " + step.maneuver.modifier;
+            break;
+          // for unknown types the fallback is turn
+          default:
+            maneuver_id = "turn " + step.maneuver.modifier;
+            break;
+        }
+        var template = INSTRUCTION_TEMPLATE[maneuver_id];
+
+        // convert lat,lng pairs to LatLng objects
+        var step_geometry = L.PolylineUtil.decode(step.geometry, { precision: 5 }).map(function(a) { return L.latLng(a); }) ;
+        // append step_geometry on line
+        Array.prototype.push.apply(line, step_geometry);
+
+        var instText = "<b>" + (idx + 1) + ".</b> ";
+        var name = step.name ? "<b>" + step.name + "</b>" : I18n.t('javascripts.directions.instructions.unnamed');
+        if (step.maneuver.type.match(/rotary|roundabout/)) {
+          instText += I18n.t(template + '_with_exit', { exit: step.maneuver.exit, name: name } );
+        } else {
+          instText += I18n.t(template + '_without_exit', { name: name });
+        }
+        return [[step.maneuver.location[1], step.maneuver.location[0]], ICON_MAP[maneuver_id], instText, step.distance, step_geometry];
+      });
+
+      return transformed_steps;
+    },
+
     getRoute: function (points, callback) {
-      var TURN_INSTRUCTIONS = [
-        "",
-        'javascripts.directions.instructions.continue',         // 1
-        'javascripts.directions.instructions.slight_right',     // 2
-        'javascripts.directions.instructions.turn_right',       // 3
-        'javascripts.directions.instructions.sharp_right',      // 4
-        'javascripts.directions.instructions.uturn',            // 5
-        'javascripts.directions.instructions.sharp_left',       // 6
-        'javascripts.directions.instructions.turn_left',        // 7
-        'javascripts.directions.instructions.slight_left',      // 8
-        'javascripts.directions.instructions.via_point',        // 9
-        'javascripts.directions.instructions.follow',           // 10
-        'javascripts.directions.instructions.roundabout',       // 11
-        'javascripts.directions.instructions.leave_roundabout', // 12
-        'javascripts.directions.instructions.stay_roundabout',  // 13
-        'javascripts.directions.instructions.start',            // 14
-        'javascripts.directions.instructions.destination',      // 15
-        'javascripts.directions.instructions.against_oneway',   // 16
-        'javascripts.directions.instructions.end_oneway',       // 17
-        'javascripts.directions.instructions.ferry'             // 18
-      ];
 
       var params = [
-        { name: "z", value: "14" },
-        { name: "output", value: "json" },
-        { name: "instructions", value: true }
+        { name: "overview", value: "false" },
+        { name: "geometries", value: "polyline" },
+        { name: "steps", value: true }
       ];
 
-      for (var i = 0; i < points.length; i++) {
-        params.push({ name: "loc", value: points[i].lat + "," + points[i].lng });
 
-        if (hintData && previousPoints && previousPoints[i].equals(points[i])) {
-          params.push({ name: "hint", value: hintData.locations[i] });
-        }
+      if (cachedHints.length === points.length) {
+        params.push({name: "hints", value: cachedHints.join(";")});
+      } else {
+        // invalidate cache
+        cachedHints = [];
       }
 
-      if (hintData && hintData.checksum) {
-        params.push({ name: "checksum", value: hintData.checksum });
-      }
+      var encoded_coords = points.map(function(p) {
+        return p.lng + ',' + p.lat;
+      }).join(';');
+
+      var req_url = document.location.protocol + OSM.OSRM_URL + encoded_coords;
+
+      var onResponse = function (data) {
+        if (data.code !== 'Ok')
+          return callback(true);
+
+        cachedHints = data.waypoints.map(function(wp) {
+          return wp.hint;
+        });
+
+        var line = [];
+        var transformLeg = function (leg) {
+          return this._transformSteps(leg.steps, line);
+        };
+
+        var steps = [].concat.apply([], data.routes[0].legs.map(transformLeg.bind(this)));
+
+        callback(false, {
+          line: line,
+          steps: steps,
+          distance: data.routes[0].distance,
+          time: data.routes[0].duration
+        });
+      };
 
       return $.ajax({
-        url: document.location.protocol + "//router.project-osrm.org/viaroute",
+        url: req_url,
         data: params,
         dataType: "json",
-        success: function (data) {
-          if (data.status === 207)
-            return callback(true);
-
-          previousPoints = points;
-          hintData = data.hint_data;
-
-          var line = L.PolylineUtil.decode(data.route_geometry, {
-            precision: 6
-          });
-
-          var steps = [];
-          for (i = 0; i < data.route_instructions.length; i++) {
-            var s = data.route_instructions[i];
-            var linesegend;
-            var instCodes = s[0].split('-');
-            if (s[8] === 2) {
-              /* indicates a ferry in car routing mode, see https://github.com/Project-OSRM/osrm-backend/blob/6cbbd1e5a1b441eb27055f56956e1bac14832a58/profiles/car.lua#L151 */
-              instCodes = ["18"];
-            }
-            var instText = "<b>" + (i + 1) + ".</b> ";
-            var name = s[1] ? "<b>" + s[1] + "</b>" : I18n.t('javascripts.directions.instructions.unnamed');
-            if (instCodes[0] === "11" && instCodes[1]) {
-              instText += I18n.t(TURN_INSTRUCTIONS[instCodes[0]] + '_with_exit', { exit: instCodes[1], name: name } );
-            } else {
-              instText += I18n.t(TURN_INSTRUCTIONS[instCodes[0]] + '_without_exit', { name: name });
-            }
-            if ((i + 1) < data.route_instructions.length) {
-              linesegend = data.route_instructions[i + 1][3] + 1;
-            } else {
-              linesegend = s[3] + 1;
-            }
-            steps.push([line[s[3]], instCodes[0], instText, s[2], line.slice(s[3], linesegend)]);
-          }
-
-          callback(false, {
-            line: line,
-            steps: steps,
-            distance: data.route_summary.total_distance,
-            time: data.route_summary.total_time
-          });
-        },
+        success: onResponse.bind(this),
         error: function () {
           callback(true);
         }
index 397daa637f4f7c2397b584a45339cda5a15d6231..54c0b0db150ff25bb2c36a02b540b55cf612ba83 100644 (file)
@@ -69,7 +69,7 @@ OSM.NewNote = function(map) {
     var marker = L.marker(feature.geometry.coordinates.reverse(), {
       icon: noteIcons[feature.properties.status],
       opacity: 0.9,
-      clickable: true
+      interactive: true
     });
     marker.id = feature.properties.id;
     marker.addTo(noteLayer);
@@ -77,7 +77,9 @@ OSM.NewNote = function(map) {
   }
 
   page.pushstate = page.popstate = function (path) {
-    OSM.loadSidebarContent(path, page.load);
+    OSM.loadSidebarContent(path, function () {
+      page.load(path);
+    });
   };
 
   function newHalo(loc, a) {
@@ -97,7 +99,7 @@ OSM.NewNote = function(map) {
     }
   }
 
-  page.load = function () {
+  page.load = function (path) {
     if (addNoteButton.hasClass("disabled")) return;
     if (addNoteButton.hasClass("active")) return;
 
@@ -105,12 +107,34 @@ OSM.NewNote = function(map) {
 
     map.addLayer(noteLayer);
 
-    var mapSize = map.getSize();
-    var markerPosition;
+    var params = querystring.parse(path.substring(path.indexOf('?') + 1));
+    var markerLatlng;
+
+    if (params.lat && params.lon) {
+      markerLatlng = L.latLng(params.lat, params.lon);
+
+      var markerPosition = map.latLngToContainerPoint(markerLatlng),
+          mapSize = map.getSize(),
+          panBy = L.point(0, 0);
+
+      if (markerPosition.x < 50) {
+        panBy.x = markerPosition.x - 50;
+      } else if (markerPosition.x > mapSize.x - 50) {
+        panBy.x = 50 - mapSize.x + markerPosition.x;
+      }
 
-    markerPosition = [mapSize.x / 2, mapSize.y / 2];
+      if (markerPosition.y < 50) {
+        panBy.y = markerPosition.y - 50;
+      } else if (markerPosition.y > mapSize.y - 50) {
+        panBy.y = 50 - mapSize.y + markerPosition.y;
+      }
+
+      map.panBy(panBy);
+    } else {
+      markerLatlng = map.getCenter();
+    }
 
-    newNote = L.marker(map.containerPointToLatLng(markerPosition), {
+    newNote = L.marker(markerLatlng, {
       icon: noteIcons["new"],
       opacity: 0.9,
       draggable: true
index 5bf3f543a3ed4cde9fddcd043eaa7da861195467..3973420bdd3d3536682aa0b87b6720c65b7e9874 100644 (file)
@@ -87,7 +87,7 @@ OSM.Note = function (map) {
     currentNote = L.marker(latLng, {
       icon: noteIcons[data.status],
       opacity: 1,
-      clickable: true
+      interactive: true
     });
 
     map.addLayer(currentNote);
index d5ffbead13d849704b81d413e7445d818cb25819..9feee888c1daca1820ad5cb3baee03b6f30c27e8 100644 (file)
@@ -45,8 +45,9 @@ OSM.initializeNotes = function (map) {
     } else {
       marker = L.marker(feature.geometry.coordinates.reverse(), {
         icon: noteIcons[feature.properties.status],
+        title: feature.properties.comments[0].text,
         opacity: 0.8,
-        clickable: true
+        interactive: true
       });
       marker.id = feature.properties.id;
       marker.addTo(noteLayer);
index 333fce5494866c9c9ff4503a61288b658ede9641..7ac613d71ec1737e2d80088ad5f3c0e29d177868 100644 (file)
@@ -12,7 +12,7 @@ OSM.Query = function(map) {
     weight: 4,
     opacity: 1,
     fillOpacity: 0.5,
-    clickable: false
+    interactive: false
   };
 
   queryButton.on("click", function (e) {
@@ -146,7 +146,7 @@ OSM.Query = function(map) {
 
     if (feature.type === "node" && feature.lat && feature.lon) {
       geometry = L.circleMarker([feature.lat, feature.lon], featureStyle);
-    } else if (feature.type === "way" && feature.geometry) {
+    } else if (feature.type === "way" && feature.geometry && feature.geometry.length > 0) {
       geometry = L.polyline(feature.geometry.filter(function (point) {
         return point !== null;
       }).map(function (point) {
@@ -161,7 +161,7 @@ OSM.Query = function(map) {
     return geometry;
   }
 
-  function runQuery(latlng, radius, query, $section, compare) {
+  function runQuery(latlng, radius, query, $section, merge, compare) {
     var $ul = $section.find("ul");
 
     $ul.empty();
@@ -179,19 +179,34 @@ OSM.Query = function(map) {
       url: url,
       method: "POST",
       data: {
-        data: "[timeout:5][out:json];" + query,
+        data: "[timeout:10][out:json];" + query,
       },
       success: function(results) {
         var elements;
 
         $section.find(".loader").stopTime("loading").hide();
 
-        if (compare) {
-          elements = results.elements.sort(compare);
+        if (merge) {
+          elements = results.elements.reduce(function (hash, element) {
+            var key = element.type + element.id;
+            if ("geometry" in element) {
+              delete element.bounds;
+            }
+            hash[key] = $.extend({}, hash[key], element);
+            return hash;
+          }, {});
+
+          elements = Object.keys(elements).map(function (key) {
+            return elements[key];
+          });
         } else {
           elements = results.elements;
         }
 
+        if (compare) {
+          elements = elements.sort(compare);
+        }
+
         for (var i = 0; i < elements.length; i++) {
           var element = elements[i];
 
@@ -211,6 +226,12 @@ OSM.Query = function(map) {
           }
         }
 
+        if (results.remark) {
+          $("<li>")
+            .text(I18n.t("javascripts.query.error", { server: url, error: results.remark }))
+            .appendTo($ul);
+        }
+
         if ($ul.find("li").length === 0) {
           $("<li>")
             .text(I18n.t("javascripts.query.nothing_found"))
@@ -268,7 +289,7 @@ OSM.Query = function(map) {
       ways = "way(" + around + ")",
       relations = "relation(" + around + ")",
       nearby = "(" + nodes + ";" + ways + ");out tags geom(" + bbox + ");" + relations + ";out geom(" + bbox + ");",
-      isin = "is_in(" + lat + "," + lng + ")->.a;way(pivot.a);out tags geom(" + bbox + ");relation(pivot.a);out tags bb;";
+      isin = "is_in(" + lat + "," + lng + ")->.a;way(pivot.a);out tags bb;out ids geom(" + bbox + ");relation(pivot.a);out tags bb;";
 
     $("#sidebar_content .query-intro")
       .hide();
@@ -287,8 +308,8 @@ OSM.Query = function(map) {
       }
     }, 10);
 
-    runQuery(latlng, radius, nearby, $("#query-nearby"));
-    runQuery(latlng, radius, isin, $("#query-isin"), compareSize);
+    runQuery(latlng, radius, nearby, $("#query-nearby"), false);
+    runQuery(latlng, radius, isin, $("#query-isin"), true, compareSize);
   }
 
   function clickHandler(e) {
index 485920c8e1f901f93c1a04b1e29bdcdac4ba0146..52af38c54f338b1d76290f8195108d48a0cf5de9 100644 (file)
@@ -95,15 +95,18 @@ OSM.Search = function(map) {
     $(this).closest("li").removeClass("selected");
   }
 
-  function clickSearchResult(e) {
-    var data = $(this).data(),
-      center = L.latLng(data.lat, data.lon);
-
+  function panToSearchResult(data) {
     if (data.minLon && data.minLat && data.maxLon && data.maxLat) {
       map.fitBounds([[data.minLat, data.minLon], [data.maxLat, data.maxLon]]);
     } else {
-      map.setView(center, data.zoom);
+      map.setView([data.lat, data.lon], data.zoom);
     }
+  }
+
+  function clickSearchResult(e) {
+    var data = $(this).data();
+
+    panToSearchResult(data);
 
     // Let clicks to object browser links propagate.
     if (data.type && data.id) return;
@@ -119,11 +122,12 @@ OSM.Search = function(map) {
   page.pushstate = page.popstate = function(path) {
     var params = querystring.parse(path.substring(path.indexOf('?') + 1));
     $(".search_form input[name=query]").val(params.query);
+    $(".describe_location").hide();
     OSM.loadSidebarContent(path, page.load);
   };
 
   page.load = function() {
-    $(".search_results_entry").each(function() {
+    $(".search_results_entry").each(function(index) {
       var entry = $(this);
       $.ajax({
         url: entry.data("href"),
@@ -137,6 +141,13 @@ OSM.Search = function(map) {
         },
         success: function(html) {
           entry.html(html);
+          // go to first result of first geocoder
+          if (index === 0) {
+            var firstResult = entry.find('*[data-lat][data-lon]:first').first();
+            if (firstResult.length) {
+              panToSearchResult(firstResult.data());
+            }
+          }
         }
       });
     });
index 68e822e7f3504409d41380abc9b9be2af159325d..5223b1420523fd58770177ea66dca42946483d17 100644 (file)
@@ -60,7 +60,7 @@ L.OSM.key = function (options) {
     }
 
     function updateButton() {
-      var disabled = map.getMapBaseLayerId() !== 'mapnik';
+      var disabled = ['mapnik', 'cyclemap'].indexOf(map.getMapBaseLayerId()) === -1;
       button
         .toggleClass('disabled', disabled)
         .attr('data-original-title',
index 9f2e50a6f4afaa928cb6c1611b24843708cabd09..a465e144993d8470a82c31f740fb09b273d8f5b2 100644 (file)
@@ -49,8 +49,8 @@ L.OSM.layers = function(options) {
         .appendTo(item);
 
       map.whenReady(function() {
-        var miniMap = L.map(div[0], {attributionControl: false, zoomControl: false})
-          .addLayer(new layer.constructor());
+        var miniMap = L.map(div[0], {attributionControl: false, zoomControl: false, keyboard: false})
+          .addLayer(new layer.constructor({ apikey: layer.options.apikey }));
 
         miniMap.dragging.disable();
         miniMap.touchZoom.disable();
@@ -176,6 +176,7 @@ L.OSM.layers = function(options) {
 
       addOverlay(map.noteLayer, 'notes', OSM.MAX_NOTE_REQUEST_AREA);
       addOverlay(map.dataLayer, 'data', OSM.MAX_REQUEST_AREA);
+      addOverlay(map.gpsLayer, 'gps', Number.POSITIVE_INFINITY);
     }
 
     options.sidebar.addPane($ui);
index 58360bbec57513bbd738db621ab79bca00008cd2..e8df0bd618ebfd1c64dead46e932843a19ca9769 100644 (file)
@@ -16,44 +16,51 @@ L.OSM.Map = L.Map.extend({
     var copyright = I18n.t('javascripts.map.copyright', {copyright_url: '/copyright'});
     var donate = I18n.t('javascripts.map.donate_link_text', {donate_url: 'http://donate.openstreetmap.org'});
 
-    this.baseLayers = [
-      new L.OSM.Mapnik({
-        attribution: copyright + " &hearts; " + donate,
-        code: "M",
-        keyid: "mapnik",
-        name: I18n.t("javascripts.map.base.standard")
-      }),
-      new L.OSM.CycleMap({
+    this.baseLayers = [];
+
+    this.baseLayers.push(new L.OSM.Mapnik({
+      attribution: copyright + " &hearts; " + donate,
+      code: "M",
+      keyid: "mapnik",
+      name: I18n.t("javascripts.map.base.standard")
+    }));
+
+    if (OSM.THUNDERFOREST_KEY) {
+      this.baseLayers.push(new L.OSM.CycleMap({
         attribution: copyright + ". Tiles courtesy of <a href='http://www.thunderforest.com/' target='_blank'>Andy Allan</a>",
+        apikey: OSM.THUNDERFOREST_KEY,
         code: "C",
         keyid: "cyclemap",
         name: I18n.t("javascripts.map.base.cycle_map")
-      }),
-      new L.OSM.TransportMap({
+      }));
+
+      this.baseLayers.push(new L.OSM.TransportMap({
         attribution: copyright + ". Tiles courtesy of <a href='http://www.thunderforest.com/' target='_blank'>Andy Allan</a>",
+        apikey: OSM.THUNDERFOREST_KEY,
         code: "T",
         keyid: "transportmap",
         name: I18n.t("javascripts.map.base.transport_map")
-      }),
-      new L.OSM.MapQuestOpen({
-        attribution: copyright + ". Tiles courtesy of <a href='http://www.mapquest.com/' target='_blank'>MapQuest</a> <img src='https://developer.mapquest.com/content/osm/mq_logo.png'>",
-        code: "Q",
-        keyid: "mapquest",
-        name: I18n.t("javascripts.map.base.mapquest")
-      }),
-      new L.OSM.HOT({
-        attribution: copyright + ". Tiles courtesy of <a href='http://hot.openstreetmap.org/' target='_blank'>Humanitarian OpenStreetMap Team</a>",
-        code: "H",
-        keyid: "hot",
-        name: I18n.t("javascripts.map.base.hot")
-      })
-    ];
+      }));
+    }
+
+    this.baseLayers.push(new L.OSM.HOT({
+      attribution: copyright + ". Tiles courtesy of <a href='http://hot.openstreetmap.org/' target='_blank'>Humanitarian OpenStreetMap Team</a>",
+      code: "H",
+      keyid: "hot",
+      name: I18n.t("javascripts.map.base.hot")
+    }));
 
     this.noteLayer = new L.FeatureGroup();
     this.noteLayer.options = {code: 'N'};
 
     this.dataLayer = new L.OSM.DataLayer(null);
     this.dataLayer.options.code = 'D';
+
+    this.gpsLayer = new L.OSM.GPS({
+      pane: "overlayPane",
+      code: "G",
+      name: I18n.t("javascripts.map.base.gps")
+    });
   },
 
   updateLayers: function(layerParam) {
@@ -100,7 +107,7 @@ L.OSM.Map = L.Map.extend({
       params.mlon = latLng.lng.toFixed(precision);
     }
 
-    var url = 'http://' + OSM.SERVER_URL + '/',
+    var url = window.location.protocol + '//' + OSM.SERVER_URL + '/',
       query = querystring.stringify(params),
       hash = OSM.formatHash(this);
 
@@ -114,7 +121,8 @@ L.OSM.Map = L.Map.extend({
     var zoom = this.getZoom(),
       latLng = marker && this.hasLayer(marker) ? marker.getLatLng().wrap() : this.getCenter().wrap(),
       str = window.location.hostname.match(/^www\.openstreetmap\.org/i) ?
-        'http://osm.org/go/' : 'http://' + window.location.hostname + '/go/',
+        window.location.protocol + '//osm.org/go/' :
+        window.location.protocol + '//' + window.location.hostname + '/go/',
       char_array = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_~",
       x = Math.round((latLng.lng + 180.0) * ((1 << 30) / 90.0)),
       y = Math.round((latLng.lat + 90.0) * ((1 << 30) / 45.0)),
@@ -201,19 +209,18 @@ L.OSM.Map = L.Map.extend({
       color: '#FF9500',
       opacity: 1,
       fillOpacity: 0,
-      clickable: false
+      interactive: false
     };
 
-    this._object = object;
-
-    if (this._objectLoader) this._objectLoader.abort();
-    if (this._objectLayer) this.removeLayer(this._objectLayer);
+    this.removeObject();
 
     var map = this;
     this._objectLoader = $.ajax({
       url: OSM.apiUrl(object),
       dataType: "xml",
       success: function (xml) {
+        map._object = object;
+
         map._objectLayer = new L.OSM.DataLayer(null, {
           styles: {
             node: objectStyle,
@@ -276,7 +283,7 @@ L.OSM.Map = L.Map.extend({
   }
 });
 
-L.Icon.Default.imagePath = "/images";
+L.Icon.Default.imagePath = "/images/";
 
 L.Icon.Default.imageUrls = {
   "/images/marker-icon.png": OSM.MARKER_ICON,
index b991210dfad5a063fcc48d76181c0deb5e72a2c6..7cfd50c8e23e09eb7fcc550ca159797e92a797d3 100644 (file)
@@ -145,7 +145,14 @@ L.OSM.share = function (options) {
       .text(I18n.t('javascripts.share.image'))
       .appendTo($imageSection);
 
+    $('<div>')
+      .attr('id', 'export-warning')
+      .attr('class', 'deemphasize')
+      .text(I18n.t('javascripts.share.only_standard_layer'))
+      .appendTo($imageSection);
+
     $form = $('<form>')
+      .attr('id', 'export-image')
       .attr('class', 'standard-form')
       .attr('action', '/export/finish')
       .attr('method', 'post')
@@ -206,6 +213,15 @@ L.OSM.share = function (options) {
       .attr('type', 'hidden')
       .appendTo($form);
 
+    var csrf_param = $("meta[name=csrf-param]").attr("content"),
+        csrf_token = $("meta[name=csrf-token]").attr("content");
+
+    $('<input>')
+      .attr('name', csrf_param)
+      .attr('value', csrf_token)
+      .attr('type', 'hidden')
+      .appendTo($form);
+
     $('<p>')
       .attr('class', 'deemphasize')
       .html(I18n.t('javascripts.share.image_size') + ' <span id="mapnik_image_width"></span> x <span id="mapnik_image_height"></span>')
@@ -364,6 +380,14 @@ L.OSM.share = function (options) {
 
       $("#mapnik_image_width").text(Math.round(size.x / scale / 0.00028));
       $("#mapnik_image_height").text(Math.round(size.y / scale / 0.00028));
+
+      if (map.getMapBaseLayerId() === 'mapnik') {
+        $('#export-image').show();
+        $('#export-warning').hide();
+      } else {
+        $('#export-image').hide();
+        $('#export-warning').show();
+      }
     }
 
     function select() {
diff --git a/app/assets/javascripts/login.js b/app/assets/javascripts/login.js
new file mode 100644 (file)
index 0000000..b7a540f
--- /dev/null
@@ -0,0 +1,25 @@
+$(document).ready(function() {
+  // Preserve location hash in referer
+  if (window.location.hash) {
+    $("#referer").val($("#referer").val() + window.location.hash);
+  }
+
+  // Attach referer to authentication buttons
+  $(".auth_button").each(function () {
+    var params = querystring.parse(this.search.substring(1));
+    params.referer = $("#referer").val();
+    this.search = querystring.stringify(params);
+  });
+
+  // Add click handler to show OpenID field
+  $("#openid_open_url").click(function() {
+    $("#openid_url").val("http://");
+    $("#login_auth_buttons").hide();
+    $("#login_openid_url").show();
+    $("#login_openid_submit").show();
+  });
+
+  // Hide OpenID field for now
+  $("#login_openid_url").hide();
+  $("#login_openid_submit").hide();
+});
index 98ce302e105925de575198d60624de4ce2013443..037e1d730c7d65badd47205fa32c5ff20c24f9af 100644 (file)
@@ -1,18 +1,20 @@
 //= require ohauth
 
 $(document).ready(function () {
+  var application_data = $("head").data();
+
   function makeAbsolute(url) {
     var a = document.createElement('a');
     a.href = url;
     return a.href;
   }
 
-  if (OSM.oauth_token) {
+  if (application_data.token) {
     var headerGenerator = window.ohauth.headerGenerator({
-      consumer_key: OSM.oauth_consumer_key,
-      consumer_secret: OSM.oauth_consumer_secret,
-      token: OSM.oauth_token,
-      token_secret: OSM.oauth_token_secret
+      consumer_key: application_data.consumerKey,
+      consumer_secret: application_data.consumerSecret,
+      token: application_data.token,
+      token_secret: application_data.tokenSecret
     });
 
     $.ajaxPrefilter(function(options, jqxhr) {
index 0f044c24fea192b2983f820dc81d29bdcf7e04f9..ee1c6a115e427a299e9735c4846c98ea187ccf42 100644 (file)
@@ -2,34 +2,44 @@
 
 OSM = {
 <% if defined?(PIWIK) %>
-  PIWIK:                 <%= PIWIK.to_json %>,
+  PIWIK:                   <%= PIWIK.to_json %>,
 <% end %>
 
-  MAX_REQUEST_AREA:      <%= MAX_REQUEST_AREA.to_json %>,
-  SERVER_URL:            <%= SERVER_URL.to_json %>,
-  API_VERSION:           <%= API_VERSION.to_json %>,
-  STATUS:                <%= STATUS.to_json %>,
-  MAX_NOTE_REQUEST_AREA: <%= MAX_NOTE_REQUEST_AREA.to_json %>,
-  OVERPASS_URL:          <%= OVERPASS_URL.to_json %>,
-  NOMINATIM_URL:         <%= NOMINATIM_URL.to_json %>,
+  MAX_REQUEST_AREA:        <%= MAX_REQUEST_AREA.to_json %>,
+  SERVER_URL:              <%= SERVER_URL.to_json %>,
+  API_VERSION:             <%= API_VERSION.to_json %>,
+  STATUS:                  <%= STATUS.to_json %>,
+  MAX_NOTE_REQUEST_AREA:   <%= MAX_NOTE_REQUEST_AREA.to_json %>,
+  OVERPASS_URL:            <%= OVERPASS_URL.to_json %>,
+  NOMINATIM_URL:           <%= NOMINATIM_URL.to_json %>,
+  GRAPHHOPPER_URL:         <%= GRAPHHOPPER_URL.to_json %>,
+  MAPQUEST_DIRECTIONS_URL: <%= MAPQUEST_DIRECTIONS_URL.to_json %>,
+  MAPZEN_VALHALLA_URL:     <%= MAPZEN_VALHALLA_URL.to_json %>,
+  OSRM_URL:                <%= OSRM_URL.to_json %>,
+  DEFAULT_LOCALE:          <%= I18n.default_locale.to_json %>,
 
 <% if defined?(MAPQUEST_KEY) %>
-  MAPQUEST_KEY:          <%= MAPQUEST_KEY.to_json %>,
+  MAPQUEST_KEY:            <%= MAPQUEST_KEY.to_json %>,
 <% end %>
 <% if defined?(MAPZEN_VALHALLA_KEY) %>
-  MAPZEN_VALHALLA_KEY:   <%= MAPZEN_VALHALLA_KEY.to_json %>,
+  MAPZEN_VALHALLA_KEY:     <%= MAPZEN_VALHALLA_KEY.to_json %>,
 <% end %>
+<% if defined?(THUNDERFOREST_KEY) %>
+  THUNDERFOREST_KEY:       <%= THUNDERFOREST_KEY.to_json %>,
+<% end %>
+
+  MARKER_GREEN:            <%= image_path("marker-green.png").to_json %>,
+  MARKER_RED:              <%= image_path("marker-red.png").to_json %>,
 
-  MARKER_GREEN:          <%= image_path("marker-green.png").to_json %>,
-  MARKER_RED:            <%= image_path("marker-red.png").to_json %>,
+  MARKER_ICON:             <%= image_path("images/marker-icon.png").to_json %>,
+  MARKER_ICON_2X:          <%= image_path("images/marker-icon-2x.png").to_json %>,
+  MARKER_SHADOW:           <%= image_path("images/marker-shadow.png").to_json %>,
 
-  MARKER_ICON:           <%= image_path("images/marker-icon.png").to_json %>,
-  MARKER_ICON_2X:        <%= image_path("images/marker-icon-2x.png").to_json %>,
-  MARKER_SHADOW:         <%= image_path("images/marker-shadow.png").to_json %>,
+  NEW_NOTE_MARKER:         <%= image_path("new_note_marker.png").to_json %>,
+  OPEN_NOTE_MARKER:        <%= image_path("open_note_marker.png").to_json %>,
+  CLOSED_NOTE_MARKER:      <%= image_path("closed_note_marker.png").to_json %>,
 
-  NEW_NOTE_MARKER:       <%= image_path("new_note_marker.png").to_json %>,
-  OPEN_NOTE_MARKER:      <%= image_path("open_note_marker.png").to_json %>,
-  CLOSED_NOTE_MARKER:    <%= image_path("closed_note_marker.png").to_json %>,
+  SEARCHING:               <%= image_path("searching.gif").to_json %>,
 
   apiUrl: function (object) {
     var url = "/api/" + OSM.API_VERSION + "/" + object.type + "/" + object.id;
@@ -53,7 +63,12 @@ OSM = {
         j = pair.indexOf('='),
         key = pair.slice(0, j),
         val = pair.slice(++j);
-      params[key] = decodeURIComponent(val);
+
+      try {
+        params[key] = decodeURIComponent(val);
+      } catch (e) {
+        // Ignore parse exceptions
+      }
     }
 
     return params;
index e8ad3324d0ccc2b01e5a4e3b388b39f0d47f6603..1c73d3430456e6016cb48c528a0d89ab1d870366 100644 (file)
@@ -12,14 +12,26 @@ $(document).ready(function () {
     L.OSM.zoom({position: position})
       .addTo(map);
 
-    L.control.locate({
+    var locate = L.control.locate({
       position: position,
+      icon: 'icon geolocate',
+      iconLoading: 'icon geolocate',
       strings: {
         title: I18n.t('javascripts.map.locate.title'),
         popup: I18n.t('javascripts.map.locate.popup')
       }
     }).addTo(map);
 
+    var locateContainer = locate.getContainer();
+
+    $(locateContainer)
+      .removeClass('leaflet-control-locate leaflet-bar')
+      .addClass('control-locate')
+      .children("a")
+      .attr('href', '#')
+      .removeClass('leaflet-bar-part leaflet-bar-part-single')
+      .addClass('control-button');
+
     if (OSM.home) {
       map.setView([OSM.home.lat, OSM.home.lon], 12);
     } else {
@@ -92,4 +104,20 @@ $(document).ready(function () {
   } else {
     enableAuth();
   }
+
+  $("#user_all").change(function () {
+    $("#user_list input[type=checkbox]").prop("checked", $("#user_all").prop("checked"));
+  });
+
+  $("#content.user_confirm").each(function () {
+    $(this).hide();
+    $(this).find("#confirm").submit();
+  });
+
+  $("input[name=legale]").change(function () {
+    var url = $(this).data("url");
+
+    $("#contributorTerms").html("<img src='" + OSM.SEARCHING + "' />");
+    $("#contributorTerms").load(url);
+  });
 });
index 3c937a24d8a8f18134748d9d24a68cf2a0306290..43e64c7ea6f426be4b79e2a28b678feb6cd5b16b 100644 (file)
@@ -7,7 +7,7 @@
        <InputEncoding>UTF-8</InputEncoding>
        <OutputEncoding>UTF-8</OutputEncoding>
        <Image width="16" height="16">data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%19tEXtSoftware%00www.inkscape.org%9B%EE%3C%1A%00%00%01'IDATx%9C%9D%93%B1q%C30%0CE%1F%5Dd%80l%90I%C4*%A7%22%95%CF%85J%97%AE%B2%82%3DC%CE%03%A0%B3%9B%B8f%95%A3%17H%93%05%5C%A7%C8%0A%3F%05E%8A%92l%E7.%D0%E9N%02%81%07%E0Cr%FCaf%A6%FC%BC%5E%AF%DD%F4%3C%3Bt%C5%87%99)%84P%0E%DA%B6%BD%0AI%00%A1%A8%A8%1E%263S%D7u%C9'F%FE%9B%80%0C%C9%C9%22%BD'%B0%0A%AC%86%2CJ%DB%0E%22%11%8F%2F%D4%B3%22%8D%F34%CE%13u%06R%0C%40%D7u%AA%01%C5r%40%0Dq%88%C6%F9i%E8%7C%8CX%5D%A9M%95%D6%A3%A2Ti%C3Xx%CA%9C%F5mf3h%11%B6%07%B8%0APh%97%DD%1E%9E%5E%08!%D0%B6m%F1%87%108%1E%8EY5%007%03%5Cv%7B%00%3E%BF%3E%F8~x%1E%CD%B89l%00%F0I%0FWw%00%20%DB%AEJr%B6%E5%FB%09%80%C6y%CE%7D%91%1AP%B6p%2B%D9%BB%06%18V%3A%B5E%9F%AC%5B%95%AFY%3F%EE%20%A2mW%AA%93%DFN%3F%A0%E1%9B%F0u%E5%BC%BC%89%88%BC.%1F%D5'%DF%FD%C1%EE%F8%FFg%BFp%96%DF%E2%DCw%25%2B%00%00%00%00IEND%AEB%60%82</Image>
-       <Url type="tex