parameters: (api_key, left_boundaries, right_boundaries, center_lat,
               center_lon)
return_statement: return html
docstring: function to generate html code.
docstring_summary: function to generate html code.
docstring_tokens: function to generate html code .
function: def generate(api_key, left_boundaries, right_boundaries, center_lat,
               center_lon):
      """
      function to generate html code.
      """
      doc, tag, text, line = Doc().ttl()
      doc.asis('<!DOCTYPE html>')
      api_url = 'https://maps.googleapis.com/maps/api/js?key=' + \
                api_key + '&callback=initMap'
      with tag('html'):
          with tag('head'):
              with tag('title'):
                  text('Gmap Viewer')
              doc.asis('<meta name="viewport" content="initial-scale=1.0">')
              doc.asis('<meta charset="utf-8">')
              with tag('style'):
                  doc.asis('#map { height: 100%; }')
                  doc.asis('html, body { height: 100%; margin: 0; padding: 0; }')
          with tag('body'):
              with tag('div', id='map'):
                  pass
              with tag('script'):
                  doc.asis('\nvar map;\n')
                  doc.asis("\nvar colors = ['#e6194b', '#3cb44b', '#ffe119', \
                  '#0082c8', '#f58231', '#911eb4', '#46f0f0', '#f032e6', \
                  '#d2f53c', '#fabebe', '#008080', '#e6beff', '#aa6e28', \
                  '#fffac8', '#800000', '#aaffc3', '#808000', '#ffd8b1', \
                  '#000080', '#808080', '#000000']\n")
                  doc.asis('function initMap() {\n')
                  doc.asis("map = new google.maps.Map(\
                  document.getElementById('map'), {\n")
                  doc.asis('center: {lat: ' + str(center_lat) +
                           ', lng: ' + str(center_lon) + '},\n')
                  doc.asis('zoom: 16\n')
                  doc.asis('});\n')
                  doc.asis('var left_boundaries = ' +
                           json.dumps(left_boundaries) + ';\n')
                  doc.asis("""
                      for (var i = 0; i < left_boundaries.length; i++) {
                          var boundary = new google.maps.Polyline({
                              path: left_boundaries[i],
                              geodesic: true,
                              strokeColor: colors[i % colors.length],
                              strokeOpacity: 1.0,
                              strokeWeight: 3
                          });
                          boundary.setMap(map);
                      }
                  """)
                  doc.asis('var right_boundaries = ' +
                           json.dumps(right_boundaries) + ';\n')
                  doc.asis("""
                      for (var i = 0; i < right_boundaries.length; i++) {
                          var boundary = new google.maps.Polyline({
                              path: right_boundaries[i],
                              geodesic: true,
                              strokeColor: colors[i % colors.length],
                              strokeOpacity: 1.0,
                              strokeWeight: 3
                          });
                          boundary.setMap(map);
                      }
                  """)
                  doc.asis('}\n')
              doc.asis('<script src="' + api_url + '"></script>')
      html = doc.getvalue()
      return html
function_tokens: def generate ( api_key , left_boundaries , right_boundaries , center_lat , center_lon ) : doc , tag , text , line = Doc ( ) . ttl ( ) doc . asis ( '<!DOCTYPE html>' ) api_url = 'https://maps.googleapis.com/maps/api/js?key=' + api_key + '&callback=initMap' with tag ( 'html' ) : with tag ( 'head' ) : with tag ( 'title' ) : text ( 'Gmap Viewer' ) doc . asis ( '<meta name="viewport" content="initial-scale=1.0">' ) doc . asis ( '<meta charset="utf-8">' ) with tag ( 'style' ) : doc . asis ( '#map { height: 100%; }' ) doc . asis ( 'html, body { height: 100%; margin: 0; padding: 0; }' ) with tag ( 'body' ) : with tag ( 'div' , id = 'map' ) : pass with tag ( 'script' ) : doc . asis ( '\nvar map;\n' ) doc . asis ( "\nvar colors = ['#e6194b', '#3cb44b', '#ffe119', \
                  '#0082c8', '#f58231', '#911eb4', '#46f0f0', '#f032e6', \
                  '#d2f53c', '#fabebe', '#008080', '#e6beff', '#aa6e28', \
                  '#fffac8', '#800000', '#aaffc3', '#808000', '#ffd8b1', \
                  '#000080', '#808080', '#000000']\n" ) doc . asis ( 'function initMap() {\n' ) doc . asis ( "map = new google.maps.Map(\
                  document.getElementById('map'), {\n" ) doc . asis ( 'center: {lat: ' + str ( center_lat ) + ', lng: ' + str ( center_lon ) + '},\n' ) doc . asis ( 'zoom: 16\n' ) doc . asis ( '});\n' ) doc . asis ( 'var left_boundaries = ' + json . dumps ( left_boundaries ) + ';\n' ) doc . asis ( """
                      for (var i = 0; i < left_boundaries.length; i++) {
                          var boundary = new google.maps.Polyline({
                              path: left_boundaries[i],
                              geodesic: true,
                              strokeColor: colors[i % colors.length],
                              strokeOpacity: 1.0,
                              strokeWeight: 3
                          });
                          boundary.setMap(map);
                      }
                  """ ) doc . asis ( 'var right_boundaries = ' + json . dumps ( right_boundaries ) + ';\n' ) doc . asis ( """
                      for (var i = 0; i < right_boundaries.length; i++) {
                          var boundary = new google.maps.Polyline({
                              path: right_boundaries[i],
                              geodesic: true,
                              strokeColor: colors[i % colors.length],
                              strokeOpacity: 1.0,
                              strokeWeight: 3
                          });
                          boundary.setMap(map);
                      }
                  """ ) doc . asis ( '}\n' ) doc . asis ( '<script src="' + api_url + '"></script>' ) html = doc . getvalue ( ) return html