I have a model Locations with two columns latitude and longitude. I want to find a way where I can get the list of locations and pass them to google maps using Ajax and java
Oh I was able to find my way to get the list of locations. The controller and view are left untouched.
I added the following ajax in map.js which did the work for me.
$.ajax({
type: "GET",
dataType: "json",
url: "/locations",
success: function(data){}
});
Now data can be passed to the marker object in google maps.