Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

saving lat and lng in location_coords

  • Loading branch information...
commit 117af8c3ebe84dc515cdf5e39d7ad92bc3642ee2 1 parent cfd8119
@marco-gallardo marco-gallardo authored
View
1  app/views/shared/_publisher.html.haml
@@ -31,6 +31,7 @@
#file-upload.btn{:title => t('.upload_photos')}
= image_tag 'icons/camera.png', :alt => t('.upload_photos').titleize, :class => 'publisher_image'
= hidden_field :location, :address
+ = hidden_field :location, :coords
- if publisher_public
= hidden_field_tag 'aspect_ids[]', "public"
View
2  public/javascripts/app/views/location_view.js
@@ -21,9 +21,9 @@ app.views.Location = Backbone.View.extend({
locator = new Google.Locator;
locator.getAddress(function(address, latlng){
- console.log(address, latlng);
$('#location').html('<div id="location_address">' + address + '</div>');
$('#location_address').val(address);
+ $('#location_coords').val(latlng.Ya + "," + latlng.Za);
$('#location').append('<a id="hide_location"><img alt="delete location" src="/images/deletelabel.png"></a>');
});
},
Please sign in to comment.
Something went wrong with that request. Please try again.