<?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>Jeroens blog &#187; Static maps</title>
	<atom:link href="http://blog.bn2vs.com/tag/static-maps/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.bn2vs.com</link>
	<description>Blog of Jeroen De Dauw. The latest news on my open source work and interests.</description>
	<lastBuildDate>Fri, 23 Dec 2011 14:44:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Static map support</title>
		<link>http://blog.bn2vs.com/2009/12/03/static-map-support/</link>
		<comments>http://blog.bn2vs.com/2009/12/03/static-map-support/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 18:44:42 +0000</pubDate>
		<dc:creator>Jeroen De Dauw</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Mapping]]></category>
		<category><![CDATA[Maps]]></category>
		<category><![CDATA[MediaWiki]]></category>
		<category><![CDATA[Open Layers]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[OpenStreetMap]]></category>
		<category><![CDATA[OSM]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Static maps]]></category>
		<category><![CDATA[Wikimedia]]></category>

		<guid isPermaLink="false">http://blog.bn2vs.com/?p=582</guid>
		<description><![CDATA[This has been a big item on the to-do list for new Maps features for a few months now, but I finally managed to make some time for it, and just checked in the last code into the MediaWiki SVN repo Let&#8217;s start at the beginning: what is static map support? Supporting static maps means [...]]]></description>
			<content:encoded><![CDATA[<p>This has been a big item on the to-do list for new <a href="http://www.mediawiki.org/wiki/Extension:Maps" target="_blank">Maps</a> features for a few months now, but I finally managed to make some time for it, and just <a href="http://svn.wikimedia.org/viewvc/mediawiki?view=rev&amp;revision=59705" target="_blank">checked in</a> the last code into the MediaWiki SVN repo <img src='http://blog.bn2vs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Let&#8217;s start at the beginning: what is static map support? Supporting static maps means that you are able to display maps as plain images instead of via a JavaScript (or other non-html language, for example flash) mapping API. This is very important since it makes viewing the maps possible for people who are browsing the web with a browser that does not support JavaScript (or this other language), or simply have it disabled for some reason. This actually made this feature a requirement for getting Maps onto Wikipedia and other Wikimedia Foundation wiki&#8217;s. Another reason to use such a feature is that it can significantly reduce the load on the servers from which the map tiles are fetched, since the plain images can be cached.</p>
<p>So how does it work? Maps now accepts a new parameter called &#8216;static&#8217; that accepts the values &#8216;yes&#8217; and &#8216;no&#8217;. When set to no (or not provided, assuming the default is unchanged, so on &#8216;no&#8217;), you&#8217;ll get the same map as you always did, with no changes whatsoever. When the values is &#8216;yes&#8217;, you&#8217;ll get a plain .png image fetched from a WF server. If you have JavaScript enabled, and click on the image, it&#8217;ll be replaced with the dynamic map.</p>
<p>Maps 0.5 will support this for the display_map parser function when using the OSM service. It&#8217;s possible I&#8217;ll also add support for display_point(s). Note that my work is just a link in a big chain here. Most effort to make this functionality possible is done by the guys doing the mapping server side work. Also, a lot of my code Maps is using for displaying static maps is heavily based on code from the <a href="http://www.mediawiki.org/wiki/Extension:SlippyMap" target="_blank">SlippyMap</a> extension by Ã†var ArnfjÃ¶rÃ° Bjarmason and others.</p>
<p>Since there are no demo&#8217;s available anywhere yet, here you have some screenshots:</p>
<p>A static map:</p>
<p><a href="http://blog.bn2vs.com/wp-content/uploads/2009/12/mapsOsmStatic.gif"><img class="alignnone size-full wp-image-583" title="Maps displaying a static map of Brussels, Belgium" src="http://blog.bn2vs.com/wp-content/uploads/2009/12/mapsOsmStatic.gif" alt="Maps displaying a static map of Brussels, Belgium" width="604" height="352" /></a></p>
<p>The dynamic map you get after clicking the static map:</p>
<p><a href="http://blog.bn2vs.com/wp-content/uploads/2009/12/mapsOsmDynamic.gif"><img class="alignnone size-full wp-image-584" title="Maps displaying a dynamic map of Brussels, Belgium" src="http://blog.bn2vs.com/wp-content/uploads/2009/12/mapsOsmDynamic.gif" alt="Maps displaying a dynamic map of Brussels, Belgium" width="599" height="348" /></a></p>
<p>And yes, the zoom level is off, this is a bug that still needs to be fixed <img src='http://blog.bn2vs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bn2vs.com/2009/12/03/static-map-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

