//= require leaflet.key
//= require leaflet.note
//= require leaflet.share
+//= require leaflet.query
//= require index/search
//= require index/browse
//= require index/export
//= require index/history
//= require index/note
//= require index/new_note
+ //= require index/changeset
+//= require index/query
//= require router
(function() {
sidebar: sidebar
}).addTo(map);
+ L.OSM.query({
+ position: position,
+ sidebar: sidebar
+ }).addTo(map);
+
L.control.scale()
.addTo(map);
$.cookie("_osm_location", OSM.locationCookie(map), { expires: expiry, path: "/" });
});
+ if ($.cookie('_osm_sotm') == 'hide') {
+ $('#sotm').hide();
+ }
+
+ $('#sotm .close').on('click', function() {
+ $('#sotm').hide();
+ $.cookie("_osm_sotm", 'hide', { expires: expiry });
+ });
+
if ($.cookie('_osm_welcome') == 'hide') {
$('.welcome').hide();
}
"/node/:id(/history)": OSM.Browse(map, 'node'),
"/way/:id(/history)": OSM.Browse(map, 'way'),
"/relation/:id(/history)": OSM.Browse(map, 'relation'),
- "/changeset/:id": OSM.Browse(map, 'changeset'),
- "/changeset/:id": OSM.Changeset(map)
++ "/changeset/:id": OSM.Changeset(map),
+ "/query": OSM.Query(map)
});
if (OSM.preferred_editor == "remote" && document.location.pathname == "/edit") {
if (query) {
OSM.router.route("/search?query=" + encodeURIComponent(query) + OSM.formatHash(map));
} else {
- OSM.router.route("/" + OSM.formatHash(map));
+ OSM.router.route("/");
}
});
/* Default rules for the body of every page */
* {
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
+ box-sizing: border-box;
}
body {
.icon.close:hover { background-position: -200px -20px; }
.icon.check { background-position: -220px 0; }
.icon.note { background-position: -240px 0; }
-.icon.gear { background-position: -260px 0; }
+.icon.query { background-position: -260px 0; }
/* Rules for links */
#noscript {
z-index: 20000000;
- position: absolute;
- top: 15px;
- left: 15px;
+ margin-left: 400px;
+ margin-top: 50px;
}
/* Rules for bootstrap tooltips */
#map {
height: 100%;
overflow: hidden;
+
+ &.query-active {
+ cursor: help;
+ }
+
+ &.query-disabled {
+ cursor: not-allowed;
+ }
}
#map-ui {
.leaflet-popup-content-wrapper {
border-radius: 4px !important;
- -webkit-border-radius: 4px !important;
}
/* Rules for attribution text under the main map shown on printouts */
border-right: none;
transition: 300ms linear;
- -webkit-transition: 300ms linear;
- -moz-transition: 300ms linear;
}
input:focus {
font-size: 90%;
}
- .note-comments li {
+ .note-comments li, .changeset-comments li {
margin: $lineheight/2 0;
p {
}
}
+ .comments-header {
+ float: left;
+ }
+
+ .subscribe-buttons {
+ float: left;
+ margin: 18px 10px 10px;
+ min-width: 80px;
+ }
+
+ .subscribe-buttons input {
+ font-size: 90%;
+ line-height: 15px;
+ min-height: 20px;
+ }
+
+ span.action-button:hover {
+ cursor: pointer;
+ text-decoration: underline;
+ }
+
.note-description {
overflow: hidden;
margin: 0 0 10px 10px;
}
+
+ .query-intro p {
+ padding: $lineheight $lineheight $lineheight/2;
+ }
+
+ .query-results {
+ display: none;
+
+ h3 {
+ padding: $lineheight $lineheight $lineheight/2;
+ margin: 0;
+ }
+
+ ul {
+ li {
+ padding: 15px 20px;
+ border-bottom: 1px solid #ddd;
+
+ &.query-result {
+ cursor: pointer;
+ }
+
+ &.selected {
+ background: #FFFFE6;
+ }
+
+ a {
+ color: #000;
+ }
+ }
+ }
+ }
}
/* Rules for export sidebar */
}
}
+ /* Rules for the new trace form */
+
+ #new_trace {
+ input[type=text] {
+ width: 50%;
+ width: calc(100% - 150px);
+ max-width: 500px;
+ }
+ }
+
+ /* Rules for the edit trace form */
+
+ .edit_trace {
+ .form-row p {
+ margin-bottom: 0px;
+ }
+
+ input[type=text] {
+ width: 50%;
+ width: calc(100% - 150px);
+ max-width: 500px;
+ }
+ }
+
/* Rules for the user profile page */
#userinformation {
cursor: pointer;
border: 0;
display: inline-block;
- line-height: 20px;
padding: $lineheight/4 $lineheight/2;
min-height: 20px + $lineheight/2;
min-width: 120px;
background: $blue;
text-align: center;
border-radius: 2px;
- -moz-border-radius: 2px;
&:hover {
background: darken($blue, $hovercolor);
text-decoration: none;
}
}
+ input[type="button"],
+ input[type="submit"],
+ input[type="reset"] {
+ line-height: normal;
+ }
+
+ a.button {
+ line-height: 20px;
+ }
+
.buttons {
min-width: 200px;
input[type="submit"],
input.richtext_title[type="text"] {
width: 50%;
- width: -moz-calc(100% - 235px);
- width: -webkit-calc(100% - 235px);
width: calc(100% - 235px);
@media only screen and (max-width:768px) {
.richtext_content {
width: 50%;
- width: -moz-calc(100% - 235px);
- width: -webkit-calc(100% - 235px);
width: calc(100% - 235px);
display: inline-block;
vertical-align: top;
border-radius: 0 3px 3px;
*border-right-width: 2px;
*border-bottom-width: 2px;
- -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
- -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
- box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
- -webkit-background-clip: padding-box;
- -moz-background-clip: padding;
- background-clip: padding-box;
+ box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+ background-clip: padding-box;
}
.dropdown-menu.pull-right {
}
}
+ #sidebar #sotm {
+ padding: 10px;
+ min-height: 120px;
+
+ img {
+ float: left;
+ width: 100px;
+ height: 100px;
+ }
+
+ h2 {
+ margin-left: 100px;
+ padding: 7px 10px 6px 15px;
+ }
+
+ p {
+ margin-left: 100px;
+ padding: 6px 10px 7px 15px;
+ }
+
+ a {
+ color: $darkgrey;
+ }
+
+ :hover {
+ text-decoration: none;
+ color: darken($darkgrey, 25%);
+ }
+ }
+
@import 'browse';
@media only screen and (max-width:960px) {
require_terms_seen: false
# Whether to require users to agree to the CTs before editing
require_terms_agreed: false
+ # Imagery to return in capabilities as blacklisted
+ imagery_blacklist:
+ - ".*\\.googleapis\\.com/.*"
+ - ".*\\.google\\.com/.*"
+ - ".*\\.google\\.ru/.*"
+ # URL of Overpass instance to use for feature queries
+ overpass_url: "//overpass-api.de/api/interpreter"
development:
<<: *defaults
way_paginated: "Ways (%{x}-%{y} of %{count})"
relation: "Relations (%{count})"
relation_paginated: "Relations (%{x}-%{y} of %{count})"
+ comment: "Comments (%{count})"
+ hidden_commented_by: "Hidden comment from %{user} <abbr title='%{exact_time}'>%{when} ago</abbr>"
+ commented_by: "Comment from %{user} <abbr title='%{exact_time}'>%{when} ago</abbr>"
changesetxml: "Changeset XML"
osmchangexml: "osmChange XML"
feed:
title: "Changeset %{id}"
title_comment: "Changeset %{id} - %{comment}"
+ join_discussion: "Log in to join the discussion"
+ discussion: Discussion
node:
title: "Node: %{name}"
history_title: "Node History: %{name}"
wiki_link:
key: "The wiki description page for the %{key} tag"
tag: "The wiki description page for the %{key}=%{value} tag"
+ wikidata_link: "The %{page} item on Wikidata"
wikipedia_link: "The %{page} article on Wikipedia"
telephone_link: "Call %{phone_number}"
note:
reopened_by: "Reactivated by %{user} <abbr title='%{exact_time}'>%{when} ago</abbr>"
reopened_by_anonymous: "Reactivated by anonymous <abbr title='%{exact_time}'>%{when} ago</abbr>"
hidden_by: "Hidden by %{user} <abbr title='%{exact_time}'>%{when} ago</abbr>"
+ query:
+ title: "Query Features"
+ introduction: "Click on the map to find nearby features."
+ nearby: "Nearby features"
+ enclosing: "Enclosing features"
changeset:
changeset_paging_nav:
showing_page: "Page %{page}"
load_more: "Load more"
timeout:
sorry: "Sorry, the list of changesets you requested took too long to retrieve."
+ rss:
+ title_all: OpenStreetMap changeset discussion
+ title_particular: "OpenStreetMap changeset #%{changeset_id} discussion"
+ comment: "New comment on changeset #%{changeset_id} by %{author}"
+ commented_at_html: "Updated %{when} ago"
+ commented_at_by_html: "Updated %{when} ago by %{user}"
+ full: Full discussion
diary_entry:
new:
title: New Diary Entry
primary_link: "Primary Road"
proposed: "Proposed Road"
raceway: "Raceway"
- residential: "Residential"
+ residential: "Residential Road"
rest_area: "Rest Area"
road: "Road"
secondary: "Secondary Road"
tram: "Tramway"
tram_stop: "Tram Stop"
yard: "Railway Yard"
+ route:
+ bus: "Bus Route"
shop:
alcohol: "Off License"
antiques: "Antiques"
text: Make a Donation
learn_more: "Learn More"
more: More
+ sotm_header: State of the Map 2014
+ sotm_line_1: 8th Annual Conference
+ sotm_line_2: November 7th-9th 2014
+ sotm_line_3: Buenos Aires, Argentina
license_page:
foreign:
title: About this translation
your_note: "%{commenter} has reactivated one of your map notes near %{place}."
commented_note: "%{commenter} has reactivated a map note you have commented on. The note is near %{place}."
details: "More details about the note can be found at %{url}."
+ changeset_comment_notification:
+ greeting: "Hi,"
+ commented:
+ subject_own: "[OpenStreetMap] %{commenter} has commented on one of your changesets"
+ subject_other: "[OpenStreetMap] %{commenter} has commented on a changeset you are interested in"
+ your_changeset: "%{commenter} has left a comment on one of your changesets created at %{time}"
+ commented_changeset: "%{commenter} has left a comment on a map changeset you are watching created by %{changeset_author} at %{time}"
+ partial_changeset_with_comment: "with comment '%{changeset_comment}'"
+ partial_changeset_without_comment: "without comment"
+ details: "More details about the changeset can be found at %{url}."
message:
inbox:
title: "Inbox"
yahoo:
title: Login with Yahoo
alt: Login with a Yahoo OpenID
- myopenid:
- title: Login with myOpenID
- alt: Login with a myOpenID OpenID
wordpress:
title: Login with Wordpress
alt: Login with a Wordpress OpenID
createnote_disabled_tooltip: Zoom in to add a note to the map
map_notes_zoom_in_tooltip: Zoom in to see map notes
map_data_zoom_in_tooltip: Zoom in to see map data
+ queryfeature_tooltip: Query features
+ queryfeature_disabled_tooltip: Zoom in to query features
+ changesets:
+ show:
+ comment: "Comment"
+ subscribe: "Subscribe"
+ unsubscribe: "Unsubscribe"
+ hide_comment: "hide"
+ unhide_comment: "unhide"
notes:
new:
intro: "Spotted a mistake or something missing? Let other mappers know so we can fix it. Move the marker to the correct position and type a note to explain the problem. (Please don't enter personal information or information from copyrighted maps or directory listings.)"
comment_and_resolve: Comment & Resolve
comment: Comment
edit_help: Move the map and zoom in on a location you want to edit, then click here.
+ query:
+ node: Node
+ way: Way
+ relation: Relation
+ nothing_found: No features found
+ error: "Error contacting %{server}: %{error}"
+ timeout: "Timeout contacting %{server}"
redaction:
edit:
description: "Description"
match 'api/0.6/changeset/:id/upload' => 'changeset#upload', :via => :post, :id => /\d+/
match 'api/0.6/changeset/:id/download' => 'changeset#download', :via => :get, :as => :changeset_download, :id => /\d+/
match 'api/0.6/changeset/:id/expand_bbox' => 'changeset#expand_bbox', :via => :post, :id => /\d+/
- match 'api/0.6/changeset/:id' => 'changeset#read', :via => :get, :as => :changeset_read, :via => :get, :id => /\d+/
+ match 'api/0.6/changeset/:id' => 'changeset#read', :via => :get, :as => :changeset_read, :id => /\d+/
+ match 'api/0.6/changeset/:id/subscribe' => 'changeset#subscribe', :via => :post, :as => :changeset_subscribe, :id => /\d+/
+ match 'api/0.6/changeset/:id/unsubscribe' => 'changeset#unsubscribe', :via => :post, :as => :changeset_unsubscribe, :id => /\d+/
match 'api/0.6/changeset/:id' => 'changeset#update', :via => :put, :id => /\d+/
match 'api/0.6/changeset/:id/close' => 'changeset#close', :via => :put, :id => /\d+/
match 'api/0.6/changesets' => 'changeset#query', :via => :get
+ post 'api/0.6/changeset/:id/comment' => 'changeset#comment', :as => :changeset_comment, :id => /\d+/
+ post 'api/0.6/changeset/comment/:id/hide' => 'changeset#hide_comment', :as => :changeset_comment_hide, :id => /\d+/
+ post 'api/0.6/changeset/comment/:id/unhide' => 'changeset#unhide_comment', :as => :changeset_comment_unhide, :id => /\d+/
match 'api/0.6/node/create' => 'node#create', :via => :put
match 'api/0.6/node/:id/ways' => 'way#ways_for_node', :via => :get, :id => /\d+/
match '/relation/:id' => 'browse#relation', :via => :get, :id => /\d+/, :as => :relation
match '/relation/:id/history' => 'browse#relation_history', :via => :get, :id => /\d+/
match '/changeset/:id' => 'browse#changeset', :via => :get, :as => :changeset, :id => /\d+/
+ match '/changeset/:id/comments/feed' => 'changeset#comments_feed', :via => :get, :as => :changeset_comments_feed, :id => /\d*/, :defaults => { :format => 'rss' }
match '/note/:id' => 'browse#note', :via => :get, :id => /\d+/, :as => "browse_note"
match '/note/new' => 'browse#new_note', :via => :get
match '/user/:display_name/history' => 'changeset#list', :via => :get
match '/about' => 'site#about', :via => :get, :as => :about
match '/history' => 'changeset#list', :via => :get
match '/history/feed' => 'changeset#feed', :via => :get, :defaults => { :format => :atom }
+ match '/history/comments/feed' => 'changeset#comments_feed', :via => :get, :as => :changesets_comments_feed, :defaults => { :format => 'rss' }
match '/export' => 'site#export', :via => :get
match '/login' => 'user#login', :via => [:get, :post]
match '/logout' => 'user#logout', :via => [:get, :post]
match '/offline' => 'site#offline', :via => :get
match '/key' => 'site#key', :via => :get
match '/id' => 'site#id', :via => :get
+ match '/query' => 'browse#query', :via => :get
match '/user/new' => 'user#new', :via => :get
match '/user/new' => 'user#create', :via => :post
match '/user/terms' => 'user#terms', :via => :get
CREATE FUNCTION maptile_for_point(bigint, bigint, integer) RETURNS integer
LANGUAGE c STRICT
- AS '/srv/www/master.osm.compton.nu/db/functions/libpgosm.so', 'maptile_for_point';
- AS '/home/ukasiu/repos/openstreetmap-website/db/functions/libpgosm', 'maptile_for_point';
++ AS '/srv/www/overpass.osm.compton.nu/db/functions/libpgosm.so', 'maptile_for_point';
--
CREATE FUNCTION tile_for_point(integer, integer) RETURNS bigint
LANGUAGE c STRICT
- AS '/srv/www/master.osm.compton.nu/db/functions/libpgosm.so', 'tile_for_point';
- AS '/home/ukasiu/repos/openstreetmap-website/db/functions/libpgosm', 'tile_for_point';
++ AS '/srv/www/overpass.osm.compton.nu/db/functions/libpgosm.so', 'tile_for_point';
--
--
CREATE FUNCTION xid_to_int4(xid) RETURNS integer
- LANGUAGE c STRICT
- AS '/home/ukasiu/repos/openstreetmap-website/db/functions/libpgosm', 'xid_to_int4';
+ LANGUAGE c IMMUTABLE STRICT
- AS '/srv/www/master.osm.compton.nu/db/functions/libpgosm.so', 'xid_to_int4';
++ AS '/srv/www/overpass.osm.compton.nu/db/functions/libpgosm.so', 'xid_to_int4';
SET default_tablespace = '';
ALTER SEQUENCE acls_id_seq OWNED BY acls.id;
+ --
+ -- Name: changeset_comments; Type: TABLE; Schema: public; Owner: -; Tablespace:
+ --
+
+ CREATE TABLE changeset_comments (
+ id integer NOT NULL,
+ changeset_id bigint NOT NULL,
+ author_id bigint NOT NULL,
+ body text NOT NULL,
+ created_at timestamp without time zone NOT NULL,
+ visible boolean NOT NULL
+ );
+
+
+ --
+ -- Name: changeset_comments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+ --
+
+ CREATE SEQUENCE changeset_comments_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MINVALUE
+ NO MAXVALUE
+ CACHE 1;
+
+
+ --
+ -- Name: changeset_comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+ --
+
+ ALTER SEQUENCE changeset_comments_id_seq OWNED BY changeset_comments.id;
+
+
--
-- Name: changeset_tags; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
ALTER SEQUENCE changesets_id_seq OWNED BY changesets.id;
+ --
+ -- Name: changesets_subscribers; Type: TABLE; Schema: public; Owner: -; Tablespace:
+ --
+
+ CREATE TABLE changesets_subscribers (
+ subscriber_id bigint NOT NULL,
+ changeset_id bigint NOT NULL
+ );
+
+
--
-- Name: client_applications; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
--
CREATE TABLE note_comments (
- id integer NOT NULL,
+ id bigint NOT NULL,
note_id bigint NOT NULL,
visible boolean NOT NULL,
created_at timestamp without time zone NOT NULL,
--
CREATE TABLE notes (
- id integer NOT NULL,
+ id bigint NOT NULL,
latitude integer NOT NULL,
longitude integer NOT NULL,
tile bigint NOT NULL,
id integer NOT NULL,
title character varying(255),
description text,
- created_at timestamp without time zone NOT NULL,
- updated_at timestamp without time zone NOT NULL,
+ created_at timestamp without time zone,
+ updated_at timestamp without time zone,
user_id bigint NOT NULL,
description_format format_enum DEFAULT 'markdown'::format_enum NOT NULL
);
status user_status_enum DEFAULT 'pending'::user_status_enum NOT NULL,
terms_agreed timestamp without time zone,
consider_pd boolean DEFAULT false NOT NULL,
+ openid_url character varying(255),
preferred_editor character varying(255),
terms_seen boolean DEFAULT false NOT NULL,
- openid_url character varying(255),
description_format format_enum DEFAULT 'html'::format_enum NOT NULL,
image_fingerprint character varying(255),
changesets_count integer DEFAULT 0 NOT NULL,
ALTER TABLE ONLY acls ALTER COLUMN id SET DEFAULT nextval('acls_id_seq'::regclass);
+ --
+ -- Name: id; Type: DEFAULT; Schema: public; Owner: -
+ --
+
+ ALTER TABLE ONLY changeset_comments ALTER COLUMN id SET DEFAULT nextval('changeset_comments_id_seq'::regclass);
+
+
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--
ADD CONSTRAINT acls_pkey PRIMARY KEY (id);
+ --
+ -- Name: changeset_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
+ --
+
+ ALTER TABLE ONLY changeset_comments
+ ADD CONSTRAINT changeset_comments_pkey PRIMARY KEY (id);
+
+
--
-- Name: changesets_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX gpx_files_visible_visibility_idx ON gpx_files USING btree (visible, visibility);
---
--- Name: index_changeset_comments_on_body; Type: INDEX; Schema: public; Owner: -; Tablespace:
---
-
-CREATE INDEX index_changeset_comments_on_body ON changeset_comments USING btree (body);
-
-
+ --
+ -- Name: index_changeset_comments_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace:
+ --
+
+ CREATE INDEX index_changeset_comments_on_created_at ON changeset_comments USING btree (created_at);
+
+
+ --
+ -- Name: index_changesets_subscribers_on_changeset_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
+ --
+
+ CREATE INDEX index_changesets_subscribers_on_changeset_id ON changesets_subscribers USING btree (changeset_id);
+
+
+ --
+ -- Name: index_changesets_subscribers_on_subscriber_id_and_changeset_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
+ --
+
+ CREATE UNIQUE INDEX index_changesets_subscribers_on_subscriber_id_and_changeset_id ON changesets_subscribers USING btree (subscriber_id, changeset_id);
+
+
--
-- Name: index_client_applications_on_key; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX ways_timestamp_idx ON ways USING btree ("timestamp");
+ --
+ -- Name: changeset_comments_author_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ --
+
+ ALTER TABLE ONLY changeset_comments
+ ADD CONSTRAINT changeset_comments_author_id_fkey FOREIGN KEY (author_id) REFERENCES users(id);
+
+
+ --
+ -- Name: changeset_comments_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ --
+
+ ALTER TABLE ONLY changeset_comments
+ ADD CONSTRAINT changeset_comments_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
+
+
--
-- Name: changeset_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ADD CONSTRAINT changeset_tags_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
+ --
+ -- Name: changesets_subscribers_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ --
+
+ ALTER TABLE ONLY changesets_subscribers
+ ADD CONSTRAINT changesets_subscribers_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
+
+
+ --
+ -- Name: changesets_subscribers_subscriber_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+ --
+
+ ALTER TABLE ONLY changesets_subscribers
+ ADD CONSTRAINT changesets_subscribers_subscriber_id_fkey FOREIGN KEY (subscriber_id) REFERENCES users(id);
+
+
--
-- Name: changesets_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--
INSERT INTO schema_migrations (version) VALUES ('20140210003018');
+ INSERT INTO schema_migrations (version) VALUES ('20140507110937');
+
+ INSERT INTO schema_migrations (version) VALUES ('20140519141742');
+
INSERT INTO schema_migrations (version) VALUES ('21');
INSERT INTO schema_migrations (version) VALUES ('22');
INSERT INTO schema_migrations (version) VALUES ('8');
INSERT INTO schema_migrations (version) VALUES ('9');
++