Skip to content
Permalink
Browse files

Update embedded version.

  • Loading branch information
zzolo committed Aug 27, 2013
1 parent 5b6c001 commit fe68c81da1caed691decd290a39ba4a8ab40277b
Showing with 78 additions and 66 deletions.
  1. +78 −66 visualizations/index-embeddable.html
@@ -1,35 +1,87 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>MinnPost</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link type="text/css" rel="stylesheet" media="all" href="http://www.minnpost.com/sites/default/files/css/css_897efb6d6ab1b9493387993c479b5760.css" />
<link type="text/css" rel="stylesheet" media="screen" href="http://www.minnpost.com/sites/default/files/css/css_3b9128a206079d05707d08a5098dd82c.css" />
<link type="text/css" rel="stylesheet" media="print" href="http://www.minnpost.com/sites/default/files/css/css_de1cc6f6bd0846ffe89b17adf1e510de.css" />
<title>Nice Ride</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="http://www.minnpost.com/sites/default/themes/siteskin/favicon.ico" type="image/x-icon" />
<meta name="viewport" content="width=device-width, initial-scale=1"></meta>

<!-- Add in CSS from the site, as it is cached, it can change -->

<link type="text/css" rel="stylesheet" media="all" href="http://www.minnpost.com/sites/default/files/css/css_797d2de1e2575237a18957e389160dc2.css" />
<link type="text/css" rel="stylesheet" media="print" href="http://www.minnpost.com/sites/default/files/css/css_503415ad911b112c9df5167ff19cc90f.css" />
<link type="text/css" rel="stylesheet" media="screen" href="http://www.minnpost.com/sites/default/files/css/css_2dd38cd622df5d453116df8a12f86174.css" />
<!--[if IE]>
<link rel="stylesheet" href="http://www.minnpost.com/sites/default/themes/derma/inc/css/ie.css?d" type="text/css" />
<link rel="stylesheet" href="http://www.minnpost.com/sites/default/themes/derma/inc/css/ie.css?n" type="text/css">
<![endif]-->

<script type="text/javascript" src="http://www.minnpost.com/sites/default/files/js/js_3dcc7c49ae5277587a6a993ce972884c.js"></script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
jQuery.extend(Drupal.settings, {"basePath":"\/","combineBlocks":[["#block-views-most_viewed_by_taxonomy-block","#block-views-most_commented_articles-block_1"],["#block-views-most_viewed_by_node_type-block","#block-views-most_commented_blogs-block_1"],["#block-views-most_viewed_by_node_type-block","#block-views-most_commented_articles-block_1"]],"chartbeat":{"uid":27923,"domain":"minnpost.com"},"googleanalytics":{"trackOutgoing":1,"trackMailto":1,"trackDownload":1,"trackDownloadExtensions":"7z|aac|arc|arj|asf|asx|avi|bin|csv|doc|exe|flv|gif|gz|gzip|hqx|jar|jpe?g|js|mp(2|3|4|e?g)|mov(ie)?|msi|msp|pdf|phps|png|ppt|qtm?|ra(m|r)?|sea|sit|tar|tgz|torrent|txt|wav|wma|wmv|wpd|xls|xml|z|zip"},"contextBlockEditor":{"path":"\/home","params":{},"scriptPlaceholder":"\u003cdiv class='script-placeholder'\u003e\u003cstrong\u003e\u003c\/strong\u003e\u003cdiv class='description'\u003ePlease reload the page to view this block.\u003c\/div\u003e\u003c\/div\u003e"},"activePath":"\/"});
//--><!]]>
</script>
<!-- Add in JS from the site, as it is cached, it can change -->

<meta name="viewport" content="width=device-width, initial-scale=1"></meta>
<script type="text/javascript">var _sf_startpt=(new Date()).getTime()</script>
<script type="text/javascript" src="//s7.addthis.com/js/250/addthis_widget.js#async=1"></script>
<script type="text/javascript">
/* <![CDATA[ */
// Configuration
var OAS_url = 'http://oascentral.minnpost.com/RealMedia/ads/';
var OAS_sitepage = 'MP' + window.location.pathname;
var OAS_listpos = 'TopLeft,Right1,TopRight,Top';
var OAS_query = '';
var OAS_target = '_top';

var OAS_rns = (Math.random() + "").substring(2, 11);
document.write('<scr' + 'ipt type="text/javascript" src="' + OAS_url + 'adstream_mjx.ads/' + OAS_sitepage + '/1' + OAS_rns + '@' + OAS_listpos + '?' + OAS_query + '">' + '<\/script>');

function OAS_AD(pos) {
if (typeof OAS_RICH != 'undefined') {
OAS_RICH(pos);
}
}
/* ]]> */
</script>
<script type="text/javascript">
var _vrq = _vrq || [];
_vrq.push(['id', 401]);
_vrq.push(['automate', false]);
_vrq.push(['track', function(){}]);
(function(d, a){
var s = d.createElement(a),
x = d.getElementsByTagName(a)[0];
s.async = true;
s.src = 'http://a.visualrevenue.com/vrs.js';
x.parentNode.insertBefore(s, x);
})(document, 'script');
</script>
<script type="text/javascript" src="http://www.minnpost.com/sites/default/files/js/js_21d02f9d9421557c8bc6e797aed3b71f.js"></script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
jQuery.extend(Drupal.settings, {"basePath":"\/","combineBlocks":[["#block-views-most_viewed_by_taxonomy-block","#block-views-most_commented_articles-block_1"],["#block-views-most_viewed_by_node_type-block","#block-views-most_commented_blogs-block_1"],["#block-views-most_viewed_by_node_type-block","#block-views-most_commented_articles-block_1"]],"chartbeat":{"uid":27923,"domain":"minnpost.com","title":"Data \u0026amp; Maps"},"googleanalytics":{"trackOutgoing":1,"trackMailto":1,"trackDownload":1,"trackDownloadExtensions":"7z|aac|arc|arj|asf|asx|avi|bin|csv|doc|exe|flv|gif|gz|gzip|hqx|jar|jpe?g|js|mp(2|3|4|e?g)|mov(ie)?|msi|msp|pdf|phps|png|ppt|qtm?|ra(m|r)?|sea|sit|tar|tgz|torrent|txt|wav|wma|wmv|wpd|xls|xml|z|zip"},"addthis":{"config_default":{"services_toolbox":"facebook_like_counter, tweet, print, email","services_compact":"","services_expanded":"","ui_cobrand":"","ui_header_color":"#000000","ui_header_background":"#FFFFFF","ui_click":true,"ui_delay":"","ui_use_addressbook":0,"pubid":"xa-4e2cfd1147868c4e","data_track_clickback":0,"data_ga_tracker":0,"ui_use_css":true,"data_use_cookies":true,"ui_language":"en","data_use_flash":true},"share_default":{"templates":{"twitter":""}}}});
//--><!]]>
</script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
//--><!]]>
</script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
addthis_config = Drupal.settings.addthis.config_default; addthis_share = Drupal.settings.addthis.share_default;
//--><!]]>
</script>

</head>
<body class="not-front logged-in page-node node-type-article one-sidebar sidebar-right admin-nw admin-vertical admin-df section-data section-data-id-2012 section-data-id-2012-id-05 section-data-id-2012-id-05-how-we-built-legislative-bill-explorer one-sidebar sidebar-right">
<body class="not-front logged-in page-node node-type-article one-sidebar sidebar-right section-data">


<div class="outside-embeddable-container">

<!-- START: Embeddable -->


<!-- =========================================================
START: Embeddable
-- ========================================================= -->
<div class="node-body fieldlayout node-field-body">
<style type="text/css">
@import url('https://s3.amazonaws.com/data.minnpost/js/leaflet-master-20120531/leaflet.css');
@import url('//api.tiles.mapbox.com/mapbox.js/v1.3.1/mapbox.css');
@import url('https://s3.amazonaws.com/data.minnpost/js/leaflet-addons-master-20120531/leaflet-addons.css');
</style>

@@ -254,7 +306,7 @@

<!--[if lte IE 8]>
<style type="text/css">
@import url('https://s3.amazonaws.com/data.minnpost/js/leaflet-master-20120531/leaflet.ie.css');
@import url('//api.tiles.mapbox.com/mapbox.js/v1.3.1/mapbox.ie.css');
@import url('https://s3.amazonaws.com/data.minnpost/js/leaflet-addons-master-20120531/leaflet-addons.ie.css');
.control-play-pause-container {
@@ -331,7 +383,7 @@
<!-- XDate for better UTC date handling -->
<script type="text/javascript" src="https://s3.amazonaws.com/data.minnpost/js/xdate.js-0.7/xdate.js"></script>
<!-- Leaflet and wax for mapping -->
<script type="text/javascript" src="https://s3.amazonaws.com/data.minnpost/js/leaflet-master-20120531/leaflet.js"></script>
<script type="text/javascript" src="//api.tiles.mapbox.com/mapbox.js/v1.3.1/mapbox.js"></script>
<script type="text/javascript" src="https://s3.amazonaws.com/data.minnpost/js/leaflet-addons-master-20120531/leaflet-addons.min.js"></script>
<script type="text/javascript" src="https://s3.amazonaws.com/data.minnpost/js/wax-v6.0.4/wax.leaf.min.js"></script>
<!-- Animator.js for simple animation handling -->
@@ -603,9 +655,11 @@
options: {
'mapOptions': {
'minZoom': 8,
'maxZoom': 15
'maxZoom': 15,
'attribution': 'Map imagery from <a target="_blank" href="http://minnpost.com">MinnPost</a>; Map data from <a target="_blank" href="http://openstreetmap.org">OpenStreetMap</a>.'
},
'mapID': 'map',
'mapboxMap': 'minnpost.map-wi88b700,minnpost.minnpost-nice-ride-routes-2011',
'mapDefaultCenter': new L.LatLng(44.96552667056723, -93.25298309326172),
'mapDefaultZoom': 12,
'dataDir': 'data',
@@ -772,8 +826,9 @@

// Create map.
createMap: function() {
this.map = new L.Map(this.options.mapID, this.options.mapOptions);
this.addMapLayers();
this.map = new L.mapbox.map(this.options.mapID, this.options.mapboxMap, this.options.mapOptions);
this.map.removeControl(this.map.legendControl);

this.map.setView(this.options.mapDefaultCenter, this.options.mapDefaultZoom);
this.map.addControl(new L.Control.Fullscreen());

@@ -785,49 +840,6 @@
return this;
},

// Add layers to map.
addMapLayers: function() {
var thisView = this;

// Minnnpost base map
var minnpost = new L.TileLayer('http://{s}.tiles.minnpost.com/minnpost-basemaps/minnpost-minnesota-greyscale-no-labels/{z}/{x}/{y}.png',
{ attribution: 'Map imagery from <a target="_blank" href="http://minnpost.com">MinnPost</a>; Map data from <a target="_blank" href="http://openstreetmap.org">OpenStreetMap</a>.',
scheme: 'tms' });
this.map.addLayer(minnpost);

// Labels
var minnpostLabels = new L.TileLayer('http://{s}.tiles.minnpost.com/minnpost-basemaps/minnpost-minnesota-greyscale-labels/{z}/{x}/{y}.png',
{ scheme: 'tms' });

// Add route layer with TileJSON, then add labels on top
wax.tilejson('http://a.tiles.minnpost.com/minnpost-nice-ride/minnpost-nice-ride-routes/tilejson.jsonp', function(tilejson) {
// Hackaround
tilejson.tiles = [
'http://a.tiles.minnpost.com/minnpost-nice-ride/minnpost-nice-ride-routes/{z}/{x}/{y}.png',
'http://b.tiles.minnpost.com/minnpost-nice-ride/minnpost-nice-ride-routes/{z}/{x}/{y}.png',
'http://c.tiles.minnpost.com/minnpost-nice-ride/minnpost-nice-ride-routes/{z}/{x}/{y}.png',
'http://d.tiles.minnpost.com/minnpost-nice-ride/minnpost-nice-ride-routes/{z}/{x}/{y}.png'
];
tilejson.grids = [
'http://a.tiles.minnpost.com/minnpost-nice-ride/minnpost-nice-ride-routes/{z}/{x}/{y}.grid.json',
'http://b.tiles.minnpost.com/minnpost-nice-ride/minnpost-nice-ride-routes/{z}/{x}/{y}.grid.json',
'http://c.tiles.minnpost.com/minnpost-nice-ride/minnpost-nice-ride-routes/{z}/{x}/{y}.grid.json',
'http://d.tiles.minnpost.com/minnpost-nice-ride/minnpost-nice-ride-routes/{z}/{x}/{y}.grid.json'
];
tilejson.scheme = 'tms';
tilejson.attribution = 'Data provided by <a target="_blank" href="https://www.niceridemn.org/">Nice Ride MN</a>; ';

thisView.map.addLayer(new L.TileLayer('http://{s}.tiles.minnpost.com/minnpost-nice-ride/minnpost-nice-ride-routes/{z}/{x}/{y}.png', tilejson));
thisView.map.addLayer(minnpostLabels);
wax.leaf.interaction()
.map(thisView.map)
.tilejson(tilejson)
.on(wax.tooltip().parent(thisView.map._container).events());
});

return this;
},

// Create flot graph
drawGraph: function() {
// We want to insert this in the leaflet map container

0 comments on commit fe68c81

Please sign in to comment.
You can’t perform that action at this time.