Trans Siberian Leaflet

This was a great learning experience. Same as the GitHub example, but now with Leaflet.

Leaflet code:

<script type="text/javascript">
var map ='map').setView([45,77], 4);

L.tileLayer('http://otile{s}{z}/{x}/{y}.png', {
    attribution: 'Tiles Courtesy of <a href="" target="_blank">MapQuest</a> <img src="">',
maxZoom: 18,
    subdomains: '1234',

function style(feature) {
    return {
        weight: 3,
        opacity: 0.6,
        color: 'red',
var route = new L.geoJson(route, {
		style: style,


In addition we have the following in the header:

<script src=""> </script>
<script src="route.js"></script>

So the route is being read directly from a .geojson file. Although it has been renamed to route.js, and “var route = [” has been added to the beginning of the file and “]” to the end.

Leave a Reply

Your email address will not be published. Required fields are marked *