openstreetmap / openstreetmap-website Goto Github PK
View Code? Open in Web Editor NEWThe Rails application that powers OpenStreetMap
Home Page: https://www.openstreetmap.org/
License: GNU General Public License v2.0
The Rails application that powers OpenStreetMap
Home Page: https://www.openstreetmap.org/
License: GNU General Public License v2.0
Currently, OSM objects in the API appear at /api/.../{node|way|relation}/id
and there is /api/.../{node|way|relation}/id/version
A specific object version is immutable. Once an object is set, it cannot be modified under the same version.
This means that this url is completely cachable. I believe we specify that cacheablity now in the headers, if not- we should.
Unfortunately, most per-object calls do not include the version number, so they cannot be cached.
I suggest that the non-versioned call return a HTTP 303 (See Other) call which directs the http client to the current version.
This would also effect the .../full call, which would need to be modified sightly to support the new format.
Summary:
The current Zoom control does not in any way fit into the rest of the web site.
Potential Fix:
Note that the direction arrows are simply removed, as they're basically useless except on the mobile site which already has a sane style.
Like the 'where am I?' link, this is quite confusing and would make more sense if it were just an geolocation button on the map.
Not sure what's going on here - I think that 13289d4 introduced this bug and now ties multiple handlers to the edit link.
All data displayed on "browse" pages (bboxes for changesets, node positions etc.) is offset to north-west. This doesn't change with panning and zooming. I can provide screenshots later, this is easily reproducible.
opera 12.10 on linux.
opening osm.org and zooming in/out with the moousewheel a few times hangs the map area. links and other elements on the page work ok. panning does not seem to cause this issue.
no javascript errors reported.
worked ok some time ago :)
once frozen, + and - buttons do not work either. clicking on the zoom indicator bar changes the bar, but not the zoom itself.
clicking on the panning buttons unfreezes the map area
I/we want to finish the JSON API work initially prototyped by Jeff Warren.
Basically this consists of adding & testing the json format from Rails, implementing this in cgimap if needed, and scoping out supporting GeoJSON on some calls so that the API results are more easily usable.
Okay, how about this one... 'Rails port' is devoid of meaning to any newcomers, and really doesn't matter that much at this point (when was it ported? from what?).
I submit that it could be called osm-website
or osm-application
.
rails-dev
list, discuss.
== AddMoreChangesetIndexes: migrating ========================================
-- add_index("changesets", ["created_at"], {:name=>"changesets_created_at_idx"})
-> 0.0017s
-- add_index("changesets", ["closed_at"], {:name=>"changesets_closed_at_idx"})
-> 0.0015s
-- add_index("changesets", ["min_lat", "max_lat", "min_lon", "max_lon"], {:name=>"changesets_bbox_idx", :method=>"GIST"})
rake aborted!
An error has occurred, this and all later migrations canceled:
PG::Error: ERROR: data type integer has no default operator class for access method "gist"
HINT: You must specify an operator class for the index or define a default operator class for the data type.
: CREATE INDEX "changesets_bbox_idx" ON "changesets" USING GIST ("min_lat", "max_lat", "min_lon", "max_lon")
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
The leaflet port has changed the behaviour of the changeset browser - previously hovering over the outine of a changeset on the map would highlight it but now hovering anywhere over the changeset triggers the highlight.
This makes selecting a changeset harder where there are overlapping changesets.
Hello.
I attempt to install a local copy of a osm-website on the server under
FreeBSD 8.2.
To be exact, I try to upgrade the rails port v2.* to v3.* by the full installation.
However now, on a step 'rake db:migrate' I receive a following error:
rake db:migrate
== CreateCountries: migrating ================================================
-- innodb_table()
-> 0.0001s
-- create_table(:countries, {:options=>"", :force=>true, :id=>false})
NOTICE: CREATE TABLE will create implicit sequence "countries_id_seq" for serial column "countries.id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "countries_pkey" for table "countries"
-> 0.0110s
-- add_index(:countries, [:code], {:unique=>true, :name=>"countries_code_idx"})
-> 0.0035s
rake aborted!
An error has occurred, this and all later migrations canceled:
Can't mass-assign protected attributes: code, max_lon, min_lat, max_lat, min_lon
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
Can somebody tell me what it is possible to make to correct this error?
Thank you,
Sergey
I just came by a wacky interface message translation on Translatewiki, and found out that the original wasn't much better.
The Reading your messages heading in the messaging system should be replaced with the subject of the message (like in Gmail, and probably other messaging systems) or something that makes more sense / is simpler.
Who's "reading your messages"? I am ... reading ... my messages perhaps. Or is OSM reading my messages, anyway looks very awkward.
I've just done a quick test of the full relation API, and 1.9.3 was twice as fast as 1.8.7:
https://gist.github.com/3933830
Upgrading to 1.9 would give us significant performance improvements without code changes or porting more of the API to C++.
It would be great, if the main map on the OpenStreetMap website showed a "geolocate me" button using the W3C geolocation. For this feature, an OpenLayers example exists on http://openlayers.org/dev/examples/geolocation.html. User SamatJain blogged about this some time ago: http://www.openstreetmap.org/user/SamatJain/diary/11287
When adding this feature, one should clarify the "Where am I?" link (which reverse-geolocates the current map position) – I have always been expecting the geolocation feature.
The core API should support XAPI-style nodes-only, ways-only, etc queries. This might not be the same scope as XAPI, and as a read/write API has more issues, but I'm cool to look through them and see if this would work.
This would constitute a real benefit to limited editors, so that they can pull data from dense areas (read cities) and just edit the data they present (read POIs)
Also, this may be implemented in cgimap instead - @TomH & @zerebubuth have the wisdom there.
This is a test issue
Instead of
http://www.openstreetmap.org/?lat=38&lon=-95.8&zoom=4&layers=M
We should be able to support
http://www.openstreetmap.org/#lat=38&lon=-95.8&zoom=4&layers=M
These should have the benefit of never hitting the rails app and just going to cache (sidenote: what's the caching infrastructure for OSM? Is this going straight to Apache?)
I updated the openstreetbugs branch a bit, but before I continue to work on it I want to ask whether that feature is still desired?
We should get rid of the LTR stylesheet, write LTR styles in the common stylesheet, then override LTR's with an RTL stylesheet. This makes writing CSS a lot simpler.
@tomhughes do you have any objections to this?
osmosis --read-xml-0.6 file="RU-VGG.osm.bz2" --write-apidb-0.6 populateCurrentTables=yes host="localhost" database="openstreetmap" user="openstreetmap" password="openstreetmap" validateSchemaVersion=no
outputs error:
...
SEVERE: Thread for task 1-read-xml-0.6 failed
...
Caused by: org.postgresql.util.PSQLException: ERROR: column "active" of relation "users" does not exist
...
The reason is migration 051_add_status_to_user.rb
@tomhughes - could we have a tag for 'API improvements'? I don't seem to be able to create any tags and they come in handy as we start work on multiple related tickets. See http://lists.openstreetmap.org/pipermail/dev/2012-October/025742.html /cc @tmcw
There are a number of models and controllers like
old_controller.rb
old_node_controller.rb
old_relation_controller.rb
old_relation_member_controller.rb
old_way_controller.rb
old_way_node_controller.rb
Are these still needed? Are they used by some API?
Right now the rails port dispatches requests to nominatim ( https://github.com/openstreetmap/openstreetmap-website/blob/master/app/helpers/geocoder_helper.rb#L24 ) and parses the XML, and then formats. This could be more efficient if the browser hit nominatim directly and got JSONp that could be easily formatted into page content.
Latest FF/Win7, looks like this:
https://twitter.com/nimwendil/status/271955843531014146/photo/1
It's also definitely not a Leaflet problem because all other Leaflet maps with the layers control work well. Should be something in the app stylesheets that triggers that weird FF redrawing issue, but I didn't manage to figure this out yet...
Layer switcher and zoom-control on HTC Explorer (A310e) web browser are situated right over Map link and Log in/Register link.
The asset pipeline will handle minification, and it's nice to have the unminified version for debugging purposes in the development environment.
I'd submit a pull request, but I'm not sure exactly what OL version is being used.
When I choose a nonstandard map layout, say bicycle layout
and export a map into an image format,
the image of the map is in the standard layout.
The crucial lines seem to be in ExportController#finish
where there's a redirect to
"http://parent.tile.openstreetmap.org/cgi-bin/export?bbox=#{bbox}&scale=#{scale}&format=#{format}"
No info on the map layout is passed.
The error "Display Name is invalid" while registering might not be too helpful. Instead, display which characters are not allowed (I'm not completely sure about the handling of \/
):
diff --git a/app/models/user.rb b/app/models/user.rb
index 3b43130..27662f1 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -36,7 +36,7 @@ class User < ActiveRecord::Base
validates_length_of :display_name, :within => 3..255, :allow_nil => true
validates_email_format_of :email, :if => Proc.new { |u| u.email_changed? }
validates_email_format_of :new_email, :allow_blank => true, :if => Proc.new { |u| u.new_email_changed? }
- validates_format_of :display_name, :with => /^[^\/;.,?%#]*$/, :if => Proc.new { |u| u.display_name_changed? }
+ validates_format_of :display_name, :with => /^[^\/;.,?%#]*$/, :message => "contains invalid characters (\/;.,?%#)" :if => Proc.new { |u| u.display_name_changed? }
validates_format_of :display_name, :with => /^\S/, :message => "has leading whitespace", :if => Proc.new { |u| u.display_name_changed? }
validates_format_of :display_name, :with => /\S$/, :message => "has trailing whitespace", :if => Proc.new { |u| u.display_name_changed? }
validates_numericality_of :home_lat, :allow_nil => true
This helper in app/helpers/application_helper.rb
could be implemented with better html & css structuring - adding conditionals to erb or adding classes to the body tag for admin-users.
Looking at some style fixes - here's the in-progress: http://i.imgur.com/cLQFR.jpg . Still needs rtl & content justification, margins. Is this viable in terms of actually getting in?
This is a good starter task:
app/views/site/index.html.erb
has lots of JS & Ruby logic which should be pushed into Javascript files, ruby controllers & helpers. The JS also could use serious refactoring and cleanupBig views:
loc
73 app/views/message/read.html.erb
75 app/views/diary_entry/edit.html.erb
78 app/views/export/start.html.erb
83 app/views/changeset/_map.html.erb
84 app/views/user/login.html.erb
91 app/views/site/_potlatch2.html.erb
91 app/views/user/_map.html.erb
92 app/views/browse/_changeset_details.html.erb
92 app/views/changeset/list.atom.builder
100 app/views/user/new.html.erb
138 app/views/user/account.html.erb
141 app/views/user/view.html.erb
150 app/views/layouts/site.html.erb
156 app/views/browse/_map.html.erb
303 app/views/site/index.html.erb
/cc @lxbarth
Don't know if it is just me, but on the "+" and "-" zoom controls there seems to be a small "+"/"-" text character overlaid on the graphic, which (if you look closely) gains an underline on a mouseover.
Javascript error at line 884 in leaflet.js. Stack goes something like this (IE debugging tools SUCK):
leaflet.zoom.js:126 L.DomUtil.setPosition(this._knob, new L.Point(0, y));
leaflet.zoom.js:24 this._snapToSliderValue();
map.js:91 new L.Control.Zoomslider({stepHeight: 7}).addTo(map);
index.js:9 var map = createMap("map");
If someone requests a changeset feed for a user that doesn't exist, the feed should give an HTTP 404. It currently seems to give a valid feed for the user that edited most recently.
New accounts should have more cues:
This is an intermediate task - requires some localization and a bit of erb-wrangling.
Trying to look at the history of the geometry of a way is difficult. Doing so means that a client would need to call a way's history, then retrieve node history for each node.
This means a lot of requests to the server.
If the server could return a full history that included all the versions of all the way, along with all the history of the nodes ever in that way, this would make generating a geometry history much easier and less expensive to the server in terms of reducing the number of calls.
Currently the Rails Port declares itself as XHTML 1.0 Transitional. I think we should go for <!DOCTYPE html>
to fall in line with the majority of the internets, unless there's a reason not to.
The main reason not too would be, maybe, if OpenLayers vector features break since this might cause the compatibility mode in IE to change.
Right now there's no LICENSE file in this repo, mention of license on the osm wiki page or in the README. After finding out what it is :) it should be added somewhere.
This will be a two-fer - permalink should move to the left of the layers dialog and be turned into an icon with a more user-friendly text field where you can copy & paste the url rather than 'going to it', and in the space left there, the default attribution.
People expect attribution on the map in roughly that spot, and this makes the transition between the main Mapnik layer and the other layers clearer.
requirements: OpenLayers, template hacking, hacking the sprite
http://not.textual.ru/zverik/2/3/screen-20121123-231028.png
Opera 12.10 build 1652 ru_RU; Linux x86_64, 3.5.4-1-ARCH
Tried to get permalink and found out that it is below the bottom border of the screen. If you look closely, there are some pixels from the scale bar in the bottom left corner of the map.
Being able to get simple output for tagging - analysis like 'top 10 values of x tag' or such would be massive to help editors autocomplete tag information and highlight tags that are less recommended.
This has unknown performance implications; maybe it could be naively implemented with rails counters, or it might require some more strong magic.
From #132 it should be possible for users to get localized versions of OpenStreetMap.org. This is primarily a design problem - we need screen real estate and a good way to present this. Secondarily this might include automatic detection of language, but that would be after the first push.
Hello, I hope this is the right place for this issue.
The smaller version of the openstreetmap.org site (when width < x pixels) has a zoomworld button between the + and - zoom buttons. I think this button doesn't have a real purpose, and if you browse the site on a touch-screen device it is very easy to touch it accidentally. It is quite frustrating, and the solution is simple. Just remove it :)
Thanks for all the work done here,
Janko Mihelić
Hello.
After the installation 'rake test' has given following failures and errors:
E.......F....F.F.................F...........................................................................................FFF...........................................................
Finished in 175.081784 seconds.
Error:
test_feed(ChangesetControllerTest):
ActionView::Template::Error: wrong number of arguments (1 for 2)
app/views/changeset/list.atom.builder:25:in _app_views_changeset_list_atom_builder___861221088_17571292720' app/views/changeset/list.atom.builder:24:in
_app_views_changeset_list_atom_builder___861221088_17571292720'
app/views/changeset/list.atom.builder:23:in _app_views_changeset_list_atom_builder___861221088_17571292720' app/views/changeset/list.atom.builder:4:in
_app_views_changeset_list_atom_builder___861221088_17571292720'
app/controllers/changeset_controller.rb:335:in list' app/controllers/changeset_controller.rb:342:in
feed'
app/controllers/application_controller.rb:330:in web_timeout' app/controllers/application_controller.rb:329:in
web_timeout'
test/functional/changeset_controller_test.rb:1767:in `test_feed'
Error:
test_feed_user(ChangesetControllerTest):
ActionView::Template::Error: wrong number of arguments (1 for 2)
app/views/changeset/list.atom.builder:25:in _app_views_changeset_list_atom_builder___861221088_17571292720' app/views/changeset/list.atom.builder:24:in
_app_views_changeset_list_atom_builder___861221088_17571292720'
app/views/changeset/list.atom.builder:23:in _app_views_changeset_list_atom_builder___861221088_17571292720' app/views/changeset/list.atom.builder:4:in
_app_views_changeset_list_atom_builder___861221088_17571292720'
app/controllers/changeset_controller.rb:335:in list' app/controllers/changeset_controller.rb:342:in
feed'
app/controllers/application_controller.rb:330:in web_timeout' app/controllers/application_controller.rb:329:in
web_timeout'
test/functional/changeset_controller_test.rb:1782:in `test_feed_user'
Failure:
test_read(ChangesetControllerTest) [test/functional/changeset_controller_test.rb:167]:
Expected exactly 1 element matching "osm[version='0.6'][generator='OpenStreetMap server']", found 0.
is not true.
Failure:
test_upload_create_valid(ChangesetControllerTest) [test/functional/changeset_controller_test.rb:400]:
Expected exactly 1 element matching "diffResult[version='0.6'][generator='OpenStreetMap server']", found 0.
is not true.
Failure:
test_upload_delete_if_unused(ChangesetControllerTest) [test/functional/changeset_controller_test.rb:606]:
Expected exactly 1 element matching "diffResult[version='0.6'][generator='OpenStreetMap server']", found 0.
is not true.
Failure:
test_upload_xml_errors(ChangesetControllerTest) [test/functional/changeset_controller_test.rb:1182]:
Expected exactly 1 element matching "osmError[version='0.6'][generator='OpenStreetMap server']", found 0.
is not true.
Failure:
test_relations_for_node(RelationControllerTest)
[test/functional/relation_controller_test.rb:94:in check_relations_for_element' test/functional/relation_controller_test.rb:71:in
test_relations_for_node']:
Expected exactly 1 element matching "osm[version='0.6'][generator='OpenStreetMap server']", found 0.
is not true.
Failure:
test_relations_for_relation(RelationControllerTest)
[test/functional/relation_controller_test.rb:94:in check_relations_for_element' test/functional/relation_controller_test.rb:83:in
test_relations_for_relation']:
Expected exactly 1 element matching "osm[version='0.6'][generator='OpenStreetMap server']", found 0.
is not true.
Failure:
test_relations_for_way(RelationControllerTest)
[test/functional/relation_controller_test.rb:94:in check_relations_for_element' test/functional/relation_controller_test.rb:77:in
test_relations_for_way']:
Expected exactly 1 element matching "osm[version='0.6'][generator='OpenStreetMap server']", found 0.
is not true.
270 tests, 3313 assertions, 7 failures, 2 errors
Loaded suite /usr/local/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/rake_test_loader
Started
................F.......................
Finished in 222.101461 seconds.
test_user_create_success' test/integration/user_creation_test.rb:61:in
test_user_create_success'each' test/integration/user_creation_test.rb:58:in
test_user_create_success']:40 tests, 2867 assertions, 1 failures, 0 errors
Errors running test:functionals! #<RuntimeError: Command failed with status (1): [/usr/local/bin/ruby18 -I"lib:test" -I"/usr...]>
Errors running test:integration! #<RuntimeError: Command failed with status (1): [/usr/local/bin/ruby18 -I"lib:test" -I"/usr...]>
What it is possible to make to correct it?
Thank you,
Sergey
Example generated from the Export tab:
The sidebar is one of the strongest candidates for style de-duplication - the browse, geocoder, and mapkey styles could be unified and greatly improved.
This is a good starter task - just involves touching erb & common.css.scss.
Test issue
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.