+ 1
How do I insert Google map into my website project
show with example if you can please
1 Resposta
+ 5
Insert this within your HTML document:
<script src="http://maps.googleapis.com/maps/api/js"></script>
Then, create a <div> element with an id attribute of "map" or anything you'd like.
Then, add the following js:
function initialize() {
var mapProperties = {center: new google.maps.LatLng(-123, 27.0352), zoom: 45, mapTypeId:google.maps.MapTypeId.ROADMAP}; //this sets the longtitude and latitude of the map, and the zoom.
var map = new google.maps.Map(document.getElementById("map"), mapProperties);
}
google.maps.event.addDomListener(window, 'load', initialize);
Hope this helped you a bit :)