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">
28 <a href="../" class="docLink">< docs</a>
29 <a href="http://jsfiddle.net/ryanttb/RaLeN/embedded/" class="fiddleLink"><img src="img/jsfiddle.png" alt="" /> jsFiddle ></a>
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>"http://tile.openstreetmap.org/{{=zoom}}/{{=tile.column}}/{{=tile.row}}.png"</p>
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>
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],
50 src: "http://tile.openstreetmap.org/{{=zoom}}/{{=tile.column}}/{{=tile.row}}.png"
57 var _gaq = [['_setAccount', 'UA-26084853-1'], ['_trackPageview']];
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'));