<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>BlinkTag Inc &#187; javascript</title>
	<atom:link href="http://blinktag.com/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://blinktag.com</link>
	<description></description>
	<lastBuildDate>Tue, 15 Nov 2011 21:55:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>Google Transit Layer through Google Maps API</title>
		<link>http://blinktag.com/google-transit-layer-through-google-maps-api/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=google-transit-layer-through-google-maps-api</link>
		<comments>http://blinktag.com/google-transit-layer-through-google-maps-api/#comments</comments>
		<pubDate>Tue, 24 May 2011 05:36:03 +0000</pubDate>
		<dc:creator>Brendan Nee</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[google maps]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[maps]]></category>
		<category><![CDATA[transit]]></category>

		<guid isPermaLink="false">http://blinktag.com/?p=1057</guid>
		<description><![CDATA[This is a followup to a post we did a while back that showed how to add the Google Transit and Google Bike layer to a google map using the Google Maps API. We&#8217;ve updated this with code based on Google Maps Javascript API version 3. Google Maps API v3 now allows you to add [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blinktag.com/wp-content/uploads/2011/05/Google-Maps-298x300.jpg" alt="" title="Google Maps" width="298" height="300" class="alignright size-medium wp-image-1062 colorbox-1057" />This is a followup to a post we did a while back that showed <a href="http://blinktag.com/add-google-bike-or-google-transit-layer-to-your-google-maps-api/">how to add the Google Transit and Google Bike layer to a google map using the Google Maps API</a>. We&#8217;ve updated this with code based on <a href="http://code.google.com/apis/maps/documentation/javascript/">Google Maps Javascript API version 3</a>.</p>
<p>Google Maps API v3 now allows you to add the <a href="http://code.google.com/apis/maps/documentation/javascript/reference.html#BicyclingLayer">Bike route layer</a> and <a href="http://code.google.com/apis/maps/documentation/javascript/reference.html#TrafficLayer">traffic layer</a> via the API, but there still isn&#8217;t an easy way to get at the transit layer.  </p>
<p style="clear:both">To add the Bike layer:</p>
<p><script src="https://gist.github.com/988233.js"> </script></p>
<p>To add the Traffic layer:<br />
<script src="https://gist.github.com/988234.js"> </script></p>
<p>However, you can use the code below to add the Google Transit layer it as a custom tile layer.  This will load the image tiles directly from Google&#8217;s servers:</p>
<p><script src="https://gist.github.com/988231.js"> </script></p>
<p>This loads the full image types, so any other styles you&#8217;ve applied to the basemap will get covered up.  Unlike Google Transit, the stations won&#8217;t be clickable and transit info won&#8217;t pop up unless you add your own markers to the map, but this should work ok for just showing transit routes.</p>
<p>You can see this technique live in our <a href="http://pwn.blinktag.com">Realtime Transit Map project</a> (also on <a href="http://github.com/brendannee/Realtime-Transit-Display">github</a>).</p>
]]></content:encoded>
			<wfw:commentRss>http://blinktag.com/google-transit-layer-through-google-maps-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add Google Bike or Google Transit layer to your Google Maps API</title>
		<link>http://blinktag.com/add-google-bike-or-google-transit-layer-to-your-google-maps-api/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=add-google-bike-or-google-transit-layer-to-your-google-maps-api</link>
		<comments>http://blinktag.com/add-google-bike-or-google-transit-layer-to-your-google-maps-api/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 08:45:04 +0000</pubDate>
		<dc:creator>Brendan Nee</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[bike maps]]></category>
		<category><![CDATA[biking]]></category>
		<category><![CDATA[google maps]]></category>
		<category><![CDATA[google transit]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[maps]]></category>
		<category><![CDATA[transit]]></category>

		<guid isPermaLink="false">http://blinktag.com/?p=746</guid>
		<description><![CDATA[Using Google Maps API you can choose between a few different background layers: Standard, Satellite, Hybrid and Physical. This is done using the setMapType() method. However, there currently isn&#8217;t a way to get display the transit or bike map layer. However, Google Maps allows you to create your own tile layer and load in into [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blinktag.com/wp-content/uploads/2010/04/Page-St-to-Harrison-St-Google-Maps.jpg"><img class="alignright size-medium wp-image-749 colorbox-746" title="Page St to Harrison St - Google Maps" src="http://blinktag.com/wp-content/uploads/2010/04/Page-St-to-Harrison-St-Google-Maps-300x153.jpg" alt="" width="300" height="153"></a>Using Google Maps API you can choose between a few different background layers: Standard, Satellite, Hybrid and Physical.  This is done using the <a href="http://code.google.com/apis/maps/documentation/introduction.html#MapTypes"><code>setMapType()</code> method</a>.</p>
<p>However, there currently isn&#8217;t a way to get display the transit or bike map layer.  However, Google Maps allows you to create your own tile layer and load in into the map.  It&#8217;s not too difficult to create your own custom tile layer and actually refer to the actual bike map or transit map tiles and load them directly from Google.</p>
<p>The URL template you need for getting bike maps is:</p>
<blockquote><p><code>http://mt1.google.com/vt/lyrs=m@121,bike&amp;hl=en&amp;x={X}&amp;y={Y}&amp;z={Z}</code></p></blockquote>
<p>and for transit maps:</p>
<blockquote><p><code>http://mt1.google.com/vt/lyrs=m@121,transit|vm:1&amp;hl=en&amp;opts=r&amp;x={X}&amp;y={Y}&amp;z={Z}</code></p></blockquote>
<p>To create your own tile layer, use one of the URL templates above:</p>
<blockquote><p><code></p>
<pre>function initialize() {
  var map = new GMap2(document.getElementById("map_canvas"));
  map.setCenter(new GLatLng(37.880002, -122.189941), 11);

  //Create new Tile Layer
  var gTileUrlTemplate = 'http://mt1.google.com/vt/lyrs=m@121,bike&#038;hl=en&#038;x={X}&#038;y={Y}&#038;z={Z}';
  var tileLayerOverlay = new GTileLayerOverlay(
    new GTileLayer(null, null, null, {
      tileUrlTemplate: gTileUrlTemplate,
      isPng:true,
      opacity:0.8
    })
  );
  map.addOverlay(tileLayerOverlay);
  }</pre>
<p></code></p></blockquote>
<p>These URLs could change at any time, so there is no guarantee that this won&#8217;t break.  You can see this in action at <a href="http://whereisbart.com">whereisbart.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blinktag.com/add-google-bike-or-google-transit-layer-to-your-google-maps-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finally, something more gimmicky than the Blink Tag (Firefox 3.6 Orientation events)</title>
		<link>http://blinktag.com/finally-something-more-gimmicky-than-the-blink-tag-firefox-orientation-events/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=finally-something-more-gimmicky-than-the-blink-tag-firefox-orientation-events</link>
		<comments>http://blinktag.com/finally-something-more-gimmicky-than-the-blink-tag-firefox-orientation-events/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 06:17:11 +0000</pubDate>
		<dc:creator>Brendan Nee</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[accelerometer]]></category>
		<category><![CDATA[blinktag]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[firefox 3.6]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://blnktag.com/?p=540</guid>
		<description><![CDATA[Update: Orientation events are now baked into the stable release of Firefox 3.6. Firefox 3.6 beta was released today. It added support for &#8220;Orientation&#8221; events in web content. This javascript event can use a devices built in accelerometers to detect the orientation and update accordingly. Since our company name is based on a non-standard HTML [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update: Orientation events are now baked into the stable release of <a href="https://www.mozilla.com/en-US/firefox/">Firefox 3.6</a>.</strong></p>
<p>Firefox 3.6 beta was released today.  It added support for &#8220;Orientation&#8221; events in web content.  This javascript event can use a devices built in accelerometers to detect the orientation and update accordingly.  </p>
<p>Since our company name is based on a non-standard HTML tag that makes text <blink>Blink</blink> I thought it would be fitting to apply the orientation event to our entire site.  To view, you need a laptop with an accelerometer (a newer macbook pro or Thinkpad) and to install and run Firefox 3.6.</p>
<p>Check it out some demos:</p>
<ul>
<li><a href="http://disruptive-innovations.com/zoo/accel/orient.html">A level Web App</a></li>
<li><a href="http://disruptive-innovations.com/zoo/accel/blackHole.html">Accelerometer + Canvas Tag Demo</a></li>
<li><a href="http://people.mozilla.com/~prouget/demos/orientation/index.xhtml">Rotating Video &#038; Other elements</a></li>
<li><a href="http://people.mozilla.com/~prouget/demos/orientation/test2.html">Rotating Firefox Logo</a></li>
<li><a href="http://hacks.mozilla.org/2009/10/orientation-for-firefox/">View some code examples</a></li>
</ul>
<p>In case you don&#8217;t have that, <a href="http://www.youtube.com/watch?v=XSvB-89xwBE">I made a video of the fun effects</a> you are missing out on:</p>
<p><object width="640" height="505"><param name="movie" value="http://www.youtube.com/v/XSvB-89xwBE&#038;hl=en&#038;fs=1&#038;rel=0&#038;color1=0x3a3a3a&#038;color2=0x999999"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/XSvB-89xwBE&#038;hl=en&#038;fs=1&#038;rel=0&#038;color1=0x3a3a3a&#038;color2=0x999999" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="505"></embed></object></p>
<p>It turns out that if you actually have orientation events enabled, this embedded youtube video will disappear as it doesn&#8217;t play nice with embedded youtube videos.   However, if you are seeing this effect live, then you don&#8217;t need to see the video. </p>
]]></content:encoded>
			<wfw:commentRss>http://blinktag.com/finally-something-more-gimmicky-than-the-blink-tag-firefox-orientation-events/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>you&#8217;d think this would be easy &#8211; Google Maps panes API</title>
		<link>http://blinktag.com/youd-think-this-would-be-easy-google-maps-panes-api/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=youd-think-this-would-be-easy-google-maps-panes-api</link>
		<comments>http://blinktag.com/youd-think-this-would-be-easy-google-maps-panes-api/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 17:35:02 +0000</pubDate>
		<dc:creator>jed</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ac transit]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[einsert]]></category>
		<category><![CDATA[google maps]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[map panes]]></category>
		<category><![CDATA[maps]]></category>

		<guid isPermaLink="false">http://blnktag.com/?p=460</guid>
		<description><![CDATA[You&#8217;d think it would be easy to change the stacking order of things you overlay in Google Maps, right? Like, no one wants that stupid AC Transit logo to go underneath the polygon they drew . . . . . you&#8217;d think . . . . Anyways, after like five or six hours of poking [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://511contracosta.org/contra-costa-transit-map"><img class="colorbox-460"  src="http://blinktag.com/images/e1445611deebee36b041ed8ffe038e5e.png"></a></p>
<p>You&#8217;d think it would be easy to change the stacking order of things you overlay in Google Maps, right?  Like, no one wants that stupid <a href="http://actransit.org">AC Transit</a> logo to go <em>underneath</em> the polygon they drew . . . . . you&#8217;d think . . . .</p>
<p>Anyways, after like five or six hours of poking around on forums I found a solution.</p>
<p>First, it turns out that overlays on Google Maps have both a ZIndex and a &#8220;GPane&#8221; associated with them.  If you change the ZIndex, you change the order in which objects on the same pane are displayed.  Turns out that polygons and ground overlays (like the AC Transit image) are automatically added to the same pane, so no help there.</p>
<p>Here&#8217;s the magic.  <a href="http://code.google.com/apis/maps/documentation/overlays.html#Custom_Overlays">Google lets you create custom overlay classes</a>, where you can specify GPanes for individual images or whatever.  But it looks really hard, and I&#8217;m lazy.</p>
<p>So I stole <a href="http://econym.org.uk/gmap/einsertg.htm">this js class</a> that does basically what I want.  Just replace the following snippit of code</p>
<p>map.getPane(1).appendChild(div);</p>
<p>with this one</p>
<p>map.getPane(<em>Some higher number, like 7</em>).appendChild(div);</p>
<p>and you&#8217;re good to go.</p>
]]></content:encoded>
			<wfw:commentRss>http://blinktag.com/youd-think-this-would-be-easy-google-maps-panes-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching 14/24 queries in 0.022 seconds using disk: basic

Served from: blinktag.com @ 2012-02-05 21:00:55 -->
