Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

W3C Geolocation added to user account settings page (4rd attempt) #27

Closed
wants to merge 3 commits into from
Closed

Conversation

mvexel
Copy link
Contributor

@mvexel mvexel commented Feb 29, 2012

I added W3C Geolocation functionality to the user location map on the account settings page. This attempts to find a coarse location if the user has no home location set, so as to make setting the home location easier. If the location is already set, the map can be manually centered on the approx location by clicking a link on top of the map. When W3C geolocation fails (or is denied by the user), the page falls back to the old behaviour of showing a world map.

@@ -112,7 +112,8 @@
<tr>
<td></td>
<td>
<p><%= t 'user.account.update home location on click' %> <input type="checkbox" value="1" <% unless @user.home_lat and @user.home_lon %> checked="checked" <% end %> id="updatehome" /> </p>
<p><%= t 'user.account.update home location on click' %> <input type="checkbox" value="1" <% unless @user.home_lat and @user.home_lon %> checked="checked" <% end %> id="updatehome" />
<% if @user.home_lat and @user.home_lon %><span align=right><a href="#map" onClick=locate_user()>center map on my current position</a></span><% end %></p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest using the link_to_function rails helper here instead of creating the link yourself, and the text of the link needs to be translatable - use t("user.account...") and add the string to config/locales/en.yml.

@tomhughes
Copy link
Member

The redesign work (#498) which has just been merged has added geolocation support to the user settings page.

@tomhughes tomhughes closed this Nov 28, 2013
danstowell pushed a commit to danstowell/openstreetmap-website that referenced this pull request Jan 26, 2015
…ebox

Use 'close-box' appearance (less confusing) for exit-from-directions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui User Interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants