<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>string src example</title>
  <meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
  <meta name="description" content="An example of setting a service src to a string">
  <meta name="author" content="Ryan Westphal">
  <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/themes/blitzer/jquery-ui.css" />
  <link rel="stylesheet" type="text/css" href="css/style.css" />
  <style type="text/css">
    #map
    {
      position: fixed;
      left: 0;
      top: 0;
      right: 0;
      bottom: 0;
    }
  </style>
</head>
<body>
  <div>
    <div id="map">
    </div>
    <div class="info">
      <div class="links">
        <a href="../" class="docLink">&lt; docs</a>
        <a href="http://jsfiddle.net/ryanttb/YPkj4/embedded/" class="fiddleLink"><img src="img/jsfiddle.png" alt="" /> jsFiddle &gt;</a>
      </div>
      <h1>string service src</h1>
      <p>This example shows how you can set a service's src property to a jsRender template string.</p>
      <p>The src property of the service object for this map is set to:</p>
      <p>&quot;http://tile.openstreetmap.org/{{:zoom}}/{{:tile.column}}/{{:tile.row}}.png&quot;</p>
    </div>
  </div>
  <script src="/usr/share/javascript/jquery/jquery.min.js"></script>
  <script src="/usr/share/javascript/jquery-ui/jquery-ui.min.js"></script>
  <script src="/usr/share/javascript/excanvas/excanvas.min.js"></script>
  <script src="/usr/share/javascript/jsrender/jsrender.min.js"></script>
  <script src="/usr/share/javascript/jquery-mousewheel/jquery.mousewheel.min.js"></script>
  <script src="/usr/share/javascript/jquery-ui/ui/jquery.ui.widget.min.js"></script>
  <script src="/usr/share/javascript/jquery-geo/jquery.geo.full.min.js"></script>
  <script>
    $(function () {
      // create a map that replaces the default service with
      // one using a string for the src property instead of a function
      var map = $("#map").geomap({
        center: [-71.0595678, 42.3604823],
        zoom: 8,
        services: [ {
          id: "osm-string-src",
          type: "tiled",
          src: "http://tile.openstreetmap.org/{{:zoom}}/{{:tile.column}}/{{:tile.row}}.png"
        } ]
      });
    });  
  </script>

  <script>
    var _gaq = [['_setAccount', 'UA-26084853-1'], ['_trackPageview']];
    (function (d, t) {
      var g = d.createElement(t), s = d.getElementsByTagName(t)[0]; g.async = 1;
      g.src = ('https:' == location.protocol ? '//ssl' : '//www') + '.google-analytics.com/ga.js';
      s.parentNode.insertBefore(g, s);
    } (document, 'script'));
  </script>
</body>
</html>
