2014-04-22 18:56:20 +08:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
{% capture title %}{% if page.title %}{{ page.title }} - {% elsif post.title %}{{ post.title }} - {% endif %}{% endcapture %}
|
|
|
|
|
|
|
|
<title>{{ title }}Leaflet - a JavaScript library for interactive maps</title>
|
|
|
|
|
|
|
|
<meta charset="utf-8" />
|
|
|
|
|
|
|
|
{% if title == '' %}
|
|
|
|
<meta property="og:title" content="Leaflet — an open-source JavaScript library for interactive maps" />
|
|
|
|
<meta property="og:description" content="Leaflet is a modern, lightweight open-source JavaScript library for mobile-friendly interactive maps." />
|
|
|
|
<meta property="og:image" content="http://leafletjs.com/docs/images/logo.png" />
|
|
|
|
|
|
|
|
<meta itemprop="name" content="Leaflet">
|
|
|
|
<meta itemprop="description" content="Leaflet — a modern, lightweight open-source JavaScript library for mobile-friendly interactive maps.">
|
|
|
|
<meta itemprop="image" content="http://leafletjs.com/docs/images/logo.png">
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
|
|
|
|
{% capture root %}{% if page.root %}{{ page.root }}{% else %}{{ post.root }}{% endif %}{% endcapture %}
|
|
|
|
|
|
|
|
<link rel="icon" type="image/png" href="{{ root }}docs/images/favicon.png" />
|
|
|
|
|
|
|
|
<link href="http://leafletjs.com/atom.xml" type="application/atom+xml" rel="alternate" title="Leaflet Dev Blog Atom Feed" />
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="{{ root }}docs/css/normalize.css" />
|
|
|
|
<link rel="stylesheet" href="{{ root }}docs/css/main.css" />
|
|
|
|
|
2014-04-22 20:05:11 +08:00
|
|
|
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,300' rel='stylesheet' type='text/css'>
|
|
|
|
|
2014-04-22 18:56:20 +08:00
|
|
|
<script src="{{ root }}docs/highlight/highlight.pack.js"></script>
|
|
|
|
<link rel="stylesheet" href="{{ root }}docs/highlight/styles/github.css" />
|
|
|
|
|
|
|
|
<!-- Leaflet -->
|
|
|
|
<link rel="stylesheet" href="{{ root }}dist/leaflet.css" />
|
|
|
|
<script src="{{ root }}dist/leaflet.js"></script>
|
|
|
|
|
|
|
|
{% if page.css %}<style>{{ page.css }}</style>{% endif %}
|
|
|
|
|
|
|
|
<script>
|
|
|
|
CM_ATTR = 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
|
|
|
|
'<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
|
|
|
'Imagery © <a href="http://cloudmade.com">CloudMade</a>';
|
|
|
|
|
|
|
|
CM_URL = 'http://{s}.tile.cloudmade.com/d4fc77ea4a63471cab2423e66626cbb6/{styleId}/256/{z}/{x}/{y}.png';
|
|
|
|
|
|
|
|
OSM_URL = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
|
|
|
|
OSM_ATTRIB = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors';
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body{% if page.bodyclass %} class="{{ page.bodyclass }}"{% endif %}>
|
2014-04-22 21:51:21 +08:00
|
|
|
{% if page.title != nil %}
|
2014-04-22 18:56:20 +08:00
|
|
|
<div class="container">
|
2014-04-22 21:51:21 +08:00
|
|
|
{% endif %}
|
2014-04-22 18:56:20 +08:00
|
|
|
|
2014-04-22 21:51:21 +08:00
|
|
|
<h1><a href="http://leafletjs.com"><img src="{{ root }}docs/images/logo-800.png" alt="Leaflet" width="300" /></a></h1>
|
|
|
|
<h3 class="tagline">an open-source JavaScript library<br> for mobile-friendly interactive maps</h3>
|
2014-04-22 18:56:20 +08:00
|
|
|
|
|
|
|
<ul class="nav">
|
|
|
|
<li>
|
|
|
|
{% if page.title == nil %}
|
|
|
|
<span>Overview</span>
|
|
|
|
{% else %}
|
|
|
|
<a href="{{ root }}index.html">Overview</a>
|
|
|
|
{% endif %}
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
{% if page.title == 'Tutorials' %}
|
|
|
|
<span>Tutorials</span>
|
|
|
|
{% else %}
|
|
|
|
<a href="{{ root }}examples.html"{% if page.tutorial == true %} class="active"{% endif %}>Tutorials</a>
|
|
|
|
{% endif %}
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
{% if page.title == 'Documentation' %}
|
|
|
|
<span>API</span>
|
|
|
|
{% else %}
|
2014-04-22 20:05:11 +08:00
|
|
|
<a href="{{ root }}reference.html">Docs</a>
|
2014-04-22 18:56:20 +08:00
|
|
|
{% endif %}
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
{% if page.title == 'Download' %}
|
|
|
|
<span>Download</span>
|
|
|
|
{% else %}
|
|
|
|
<a href="{{ root }}download.html">Download</a>
|
|
|
|
{% endif %}
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
{% if page.title == 'Plugins' %}
|
|
|
|
<span>Plugins</span>
|
|
|
|
{% else %}
|
|
|
|
<a href="{{ root }}plugins.html">Plugins</a>
|
|
|
|
{% endif %}
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
{% if page.title == 'Blog' %}
|
|
|
|
<span>Blog</span>
|
|
|
|
{% else %}
|
|
|
|
<a href="{{ root }}blog.html"{% if page.post == true %} class="active"{% endif %}>Blog</a>
|
|
|
|
{% endif %}
|
|
|
|
</li>
|
2014-04-22 20:05:11 +08:00
|
|
|
<!--
|
2014-04-22 18:56:20 +08:00
|
|
|
<li><a class="forum-link" href="https://groups.google.com/forum/#!forum/leaflet-js">Forum</a></li>
|
|
|
|
<li><a class="twitter-link" href="http://twitter.com/LeafletJS">Twitter</a></li>
|
|
|
|
<li><a class="github-link" href="http://github.com/Leaflet/Leaflet">GitHub</a></li>
|
2014-04-22 20:05:11 +08:00
|
|
|
-->
|
2014-04-22 18:56:20 +08:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
{{ content }}
|
|
|
|
|
2014-04-22 21:51:21 +08:00
|
|
|
{% if page.title != nil %}
|
2014-04-22 18:56:20 +08:00
|
|
|
<div class="footer">
|
|
|
|
<p>© 2010–2014 <a href="http://agafonkin.com/en">Vladimir Agafonkin</a>, 2010–2011 <a href="http://cloudmade.com">CloudMade</a>. Maps © <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors.</p>
|
|
|
|
</div>
|
2014-04-22 21:51:21 +08:00
|
|
|
|
2014-04-22 18:56:20 +08:00
|
|
|
</div>
|
2014-04-22 21:51:21 +08:00
|
|
|
{% endif %}
|
2014-04-22 18:56:20 +08:00
|
|
|
|
|
|
|
<script>
|
|
|
|
hljs.tabReplace = ' ';
|
|
|
|
|
|
|
|
(function () {
|
|
|
|
var codes = document.getElementsByTagName('code'),
|
|
|
|
parentClass;
|
|
|
|
|
|
|
|
for (var i = 0, len = codes.length; i < len; i++) {
|
|
|
|
if (!codes[i].className) {
|
|
|
|
parentClass = codes[i].parentNode.className;
|
|
|
|
if (parentClass) {
|
|
|
|
codes[i].className = parentClass;
|
|
|
|
} else if (codes[i].innerHTML.match(/^\s*</)) {
|
|
|
|
codes[i].className = 'xml';
|
|
|
|
} else {
|
|
|
|
codes[i].className = 'javascript';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})();
|
|
|
|
|
|
|
|
(function () {
|
|
|
|
var headers = document.getElementsByTagName('h2');
|
|
|
|
|
|
|
|
for (var i = 0, len = headers.length; i < len; i++) {
|
|
|
|
if (headers[i].id) {
|
|
|
|
headers[i].onclick = function() {
|
|
|
|
window.location.hash = '#' + this.id;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})();
|
|
|
|
|
|
|
|
hljs.initHighlighting();
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
var _gaq = _gaq || [];
|
|
|
|
_gaq.push([ '_setAccount', 'UA-4147697-4' ]);
|
|
|
|
_gaq.push([ '_trackPageview' ]);
|
|
|
|
|
|
|
|
(function() {
|
|
|
|
var ga = document.createElement('script');
|
|
|
|
ga.type = 'text/javascript';
|
|
|
|
ga.async = true;
|
|
|
|
ga.src = ('https:' == document.location.protocol ? 'https://ssl'
|
|
|
|
: 'http://www')
|
|
|
|
+ '.google-analytics.com/ga.js';
|
|
|
|
var s = document.getElementsByTagName('script')[0];
|
|
|
|
s.parentNode.insertBefore(ga, s);
|
|
|
|
})();
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|