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 :

<style type="text/css">
  html { height: 100% }
  body { height: 100%; margin: 10px; padding: 10px }
  #map_canvas { height: 50% }
<script src="//" type="text/javascript">
<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"),

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