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

User location #19

Merged
merged 16 commits into from
May 1, 2014
Merged

User location #19

merged 16 commits into from
May 1, 2014

Conversation

andersoncardoso
Copy link
Member

  • Add postgis

need to recreate the DB.. see new db settings on database.yaml.sample

  • add location column to user
  • GeoJSON module:
GeoJSON::encode user.location
GeoJSON::encode user.location, user.id, user.geojson_properties

GeoJSON.parse geojson  # => RGeo object
GeoJSON.parse geojson, :to => :wkt  # output WKT string
  • Geometry
class MyModel
   include Geometry

  geojson_field :location  # adds location_geojson method, and handle factories

  def geojson_properties # to define feature properties on the geojson
    {:name => name, :image => "url" }
  end
end
  • Improves overlay component:
<div data-components="overlay" data-overlay="<%= {:style => "dark", :message => t('some.message') } %>"
# created a dark overlay with a centered message
  • Show user location on users#show

LuizArmesto added a commit that referenced this pull request May 1, 2014
@LuizArmesto LuizArmesto merged commit a1db780 into master May 1, 2014
@andersoncardoso andersoncardoso deleted the user-location branch May 1, 2014 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants