I need to pass values longitude and latitude stored in the database trough GetLocation method and pass them to javascript, how can I do this?
DATABASE TABLE Location
LocationId
Latitude
Longitude
Name
BUSSINES CLASS METHOD
public List<Location> GetLocation() { return Bd.Location.ToList(); }
JAVASCRIPT
function initMap() {
var mapCanvas = document.getElementById("map");
var mapOptions = {
center: new google.maps.LatLng( **Latitude** , **Longitude**), <--
zoom: 15
};
var map = new google.maps.Map(mapCanvas, mapOptions);
}