<?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>Thu, 08 Jul 2010 04:50:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<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/</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" rel="lightbox[746]"><img class="alignright size-medium wp-image-749" 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/</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[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 tag that makes text Blink I thought it would be fitting to apply [...]]]></description>
			<content:encoded><![CDATA[<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 <a href="http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/3.6b1-candidates/build1/">Firefox 3.6</a>.</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>2</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/</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 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>
