marți, 11 februarie 2014

Simple HTML5 script and google map.

Today I found one old html script ( few ages ago ). In the past I worked with html5 and this is simple example I make it.
The 'simple script and can be use with any features of google API.
About Google API you can learn more from developers google maps.
Let's see this script :
<html>
<head>

<style type="text/css">
  html { height: 100% }
  body { height: 100%; margin: 10px; padding: 10px }
  #map_canvas { height: 50% }
</style>
<script src="//maps.google.com/maps/api/js?sensor=true" type="text/javascript">
</script>
<script type="text/javascript">
  function initialize() {
    var latlng = new google.maps.LatLng(33, 16);
    var myOptions = {
      zoom: 2,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.TERRAIN 
    };
    var map = new google.maps.Map(document.getElementById("map_canvas"),
        myOptions);
  }

</script>
</head>
<body onload="initialize()">
  <div id="map_canvas" style="height: 50%; width: 100%;">
</div>
</body>
</html>

Niciun comentariu:

Trimiteți un comentariu