I am new in JSP. I have a requirement where i have to build a webpage which will fetch records of address fields(consist of Street,region,city,exchange,country name) from Database and will display the same on google map with markers.
For this i am not having the latitude/longitude of the address but have the physical address details in the database.
Can someone please suggest me on this.
The current code i am having is like as below, bit it need latitude/langitue and also it for a single location. I have to display multiple points based on database output and input parameter will be their physical address.
var myCenter=new google.maps.LatLng(51.508742,-0.120850);
function initialize()
{
var mapProp = {
center:myCenter,
zoom:5,
mapTypeId:google.maps.MapTypeId.ROADMAP
};
var map=new google.maps.Map(document.getElementById("googleMap"),mapProp);
var marker=new google.maps.Marker({
position:myCenter,
});
marker.setMap(map);
}
google.maps.event.addDomListener(window, 'load', initialize);
<head>
<script
src="http://maps.googleapis.com/maps/api/js">
</script>
</head>
<body>
<div id="googleMap" style="width:500px;height:380px;"></div>
</body>