Revert "Export"
[framework/web/web-ui-fw.git] / libs / js / jquery-geo-1.0a4 / docs / examples / stringsrc.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4   <meta charset="utf-8">
5   <title>string src example</title>
6   <meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
7   <meta name="description" content="An example of setting a service src to a string">
8   <meta name="author" content="Ryan Westphal">
9   <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/blitzer/jquery-ui.css" />
10   <link rel="stylesheet" type="text/css" href="css/style.css" />
11   <style type="text/css">
12     #map
13     {
14       position: fixed;
15       left: 0;
16       top: 0;
17       right: 0;
18       bottom: 0;
19     }
20   </style>
21 </head>
22 <body>
23   <div>
24     <div id="map">
25     </div>
26     <div class="info">
27       <div class="links">
28         <a href="../" class="docLink">&lt; docs</a>
29         <a href="http://jsfiddle.net/ryanttb/RaLeN/embedded/" class="fiddleLink"><img src="img/jsfiddle.png" alt="" /> jsFiddle &gt;</a>
30       </div>
31       <h1>string service src</h1>
32       <p>This example shows how you can set a service's src property to a jsRender template string.</p>
33       <p>The src property of the service object for this map is set to:</p>
34       <p>&quot;http://tile.openstreetmap.org/{{=zoom}}/{{=tile.column}}/{{=tile.row}}.png&quot;</p>
35     </div>
36   </div>
37   <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
38   <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
39   <script src="http://code.jquerygeo.com/jquery.geo-1.0a4.min.js"></script>
40   <script>
41     $(function () {
42       // create a map that replaces the default service with
43       // one using a string for the src property instead of a function
44       var map = $("#map").geomap({
45         center: [-71.0595678, 42.3604823],
46         zoom: 8,
47         services: [ {
48           id: "osm-string-src",
49           type: "tiled",
50           src: "http://tile.openstreetmap.org/{{=zoom}}/{{=tile.column}}/{{=tile.row}}.png"
51         } ]
52       });
53     });  
54   </script>
55
56   <script>
57     var _gaq = [['_setAccount', 'UA-26084853-1'], ['_trackPageview']];
58     (function (d, t) {
59       var g = d.createElement(t), s = d.getElementsByTagName(t)[0]; g.async = 1;
60       g.src = ('https:' == location.protocol ? '//ssl' : '//www') + '.google-analytics.com/ga.js';
61       s.parentNode.insertBefore(g, s);
62     } (document, 'script'));
63   </script>
64 </body>
65 </html>