Billef32
Billef32

Reputation: 285

Google map (modern) intergration

I would like to integrate my google map location into my website (html). I've found this reference

https://developers.google.com/maps/tutorials/fundamentals/adding-a-google-map

for doing it but I don't know how to add my info there (like you see in the picture). Also I want the modern look and not the old layout with the black bold strokes and boring graphics. Do you know how can I do this?

Link to the image: http://s15.postimg.org/jejl35j8r/MAp.jpg

Upvotes: 3

Views: 417

Answers (1)

codedude
codedude

Reputation: 6549

Include this in the head of your website html code:

<style>
  #map_canvas {
    width: 500px;
    height: 400px;
  }
</style>
<script src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script>
  function initialize() {
    var map_canvas = document.getElementById('map_canvas');
    var map_options = {
      center: new google.maps.LatLng(YOUR LATITUDE, YOUR LONGITUDE),
      zoom: 8,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    }
    var map = new google.maps.Map(map_canvas, map_options)
  }
  google.maps.event.addDomListener(window, 'load', initialize);
</script>

Put your latitude and longitude where the capitals letters are in the code above. And then put this div where ever you want the map to be in your website.

<div id="map_canvas"></div>

You can find your longitude and latitude easily with this website: http://universimmedia.pagesperso-orange.fr/geo/loc.htm

Upvotes: 1

Related Questions