Commit graph

41 commits

Author SHA1 Message Date
Tom MacWright
c4f9654891 Refactor mapLayers to create layers up front 2013-07-18 10:34:18 -07:00
John Firebaugh
4563244fd1 Clean up some of the map JS, reduce scope of globals 2013-07-18 10:34:17 -07:00
Tom MacWright
22d6633114 Start refactoring notes layer 2013-07-18 10:31:20 -07:00
Tom MacWright
7d84b81fd9 Remove unnecessary abstraction around rectangles 2013-07-18 10:31:20 -07:00
Tom MacWright
c75d725893 generate short link kind of 2013-07-18 10:31:20 -07:00
Tom MacWright
36fac06bd5 Add share button to map 2013-07-18 10:31:20 -07:00
Tom MacWright
9bf18a360e Add locate widget to map 2013-07-18 10:31:19 -07:00
John Firebaugh
15d148dbd4 Add back basic zoom control 2013-07-18 10:31:19 -07:00
Tom MacWright
73bbee5df9 Add leaflet-locate control, invisible currently. 2013-07-18 10:31:19 -07:00
John Firebaugh
ef37ad8aaa Basic framework for map UI 2013-07-18 10:31:19 -07:00
Tom Hughes
2119911aa5 Tone down the highlighting of Nominatim search results 2013-07-18 15:29:01 +01:00
Tom Hughes
168a9fc327 Replace various Leaflet extensions with new builtin methods 2013-06-27 21:53:26 +01:00
Tom Hughes
a7e67846a7 Persist the state of the notes layer 2013-05-08 21:04:41 +01:00
Tom Hughes
b1308a87be Show OSM objects for Nominatim search results as map overlays 2013-04-26 00:39:26 +01:00
Tom Hughes
56db9ca2b7 Merge branch 'master' into notes 2013-02-02 11:00:46 +00:00
Tom Hughes
f612f573f9 Wrap longitude values explicitly
Leaflet 0.5 no longer wraps longitude values, so we need to do it.
2013-01-22 22:29:50 +00:00
Tom Hughes
843051c1b2 Detach the permalink from the DOM so only one copy is shown 2013-01-18 13:50:37 +00:00
Tom Hughes
3d7eb387a7 Merge branch 'master' into notes
Conflicts:
	Gemfile.lock
	app/assets/stylesheets/common.css.scss
	app/views/browse/_map.html.erb
	app/views/user/view.html.erb
	config/locales/en.yml
2013-01-15 21:11:35 +00:00
Paweł Paprota
bdc536d126 Autofocus the search field on the index page 2012-12-13 19:16:41 +00:00
Tom Hughes
78f608b114 Merge branch 'master' into notes
Conflicts:
	app/assets/javascripts/browse.js
	app/assets/javascripts/map.js.erb
	app/assets/stylesheets/common.css.scss
	app/views/site/index.html.erb
2012-12-01 18:22:30 +00:00
John Firebaugh
05eba79008 Move "Browse Map Data" to layers control
Fixes https://trac.openstreetmap.org/ticket/4680
2012-11-29 18:23:41 +00:00
Tom Hughes
f6ac8ffbab Tidy up 2012-11-22 12:35:49 +00:00
Tom Hughes
bc1b4d53e3 Use the OSM map marker icons on the home page 2012-11-20 21:52:40 +00:00
John Firebaugh
f913b7d8a5 Use nicer markers 2012-11-09 13:31:29 -08:00
John Firebaugh
648f232596 Inline map.js marker functions 2012-11-09 12:59:31 -08:00
John Firebaugh
800f014486 Remove calls to map.setCenter 2012-11-09 12:59:27 -08:00
John Firebaugh
411748a48c Use baselayerchange event 2012-11-09 12:59:27 -08:00
John Firebaugh
1ae4483c69 Update Leaflet 2012-11-09 12:59:27 -08:00
John Firebaugh
30ad58c01f Port to Leaflet 2012-11-09 12:59:27 -08:00
Tom Hughes
e3d5e3da52 Refactor notes code to work with recent site changes 2012-10-13 17:16:07 +01:00
John Firebaugh
b95f9115d7 Move browse-related JS to browse.js 2012-10-13 12:57:59 +01:00
John Firebaugh
52daf1dbc4 Move export-related JS to export.js 2012-10-13 12:57:09 +01:00
Tom Hughes
824a474d93 Refactor updatelinks to avoid exceptions in updateLocation 2012-10-05 16:02:26 +01:00
John Firebaugh
3cf3d888b2 Refactor mapParams to compose better with apiUrl 2012-10-05 15:36:07 +01:00
John Firebaugh
e4ef507c5c Extract OSM.apiUrl 2012-10-05 15:26:54 +01:00
John Firebaugh
6ef19d7e18 Remove unnecessary $(window).load() callbacks
All this is already inside a $(document).ready() callback.
2012-10-02 18:22:36 +01:00
John Firebaugh
f3afd43076 Avoid a JS error on (e.g.) ?way=nnnnn
When showing an object, the map location is not set
until the vector layer has finished loading. Thus
map.getCenter() returns null.

Registering the events earlier avoids the need to call
updateLocation manually at all.
2012-10-02 18:22:17 +01:00
John Firebaugh
605c700895 Clean up search JS
Move it to index.js/edit.js and eliminate the global doSearch
function. Not enough code is shared to justify it.
2012-09-30 12:05:24 +01:00
John Firebaugh
87e8cf3b58 Require index-only JS in index.js 2012-09-30 11:58:14 +01:00
John Firebaugh
c4d9f902d0 Wrap index JS in a single $(document).ready() 2012-09-29 18:00:04 +01:00
John Firebaugh
352f2a1671 Move index JS to page-specific script file 2012-09-29 18:00:04 +01:00