<?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>WhatwasIthinking.co.uk &#187; Yahoo maps</title>
	<atom:link href="http://www.whatwasithinking.co.uk/tag/yahoo-maps/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.whatwasithinking.co.uk</link>
	<description>A Flash Development, Information Architecture, SEO &#38; Web Design Blog</description>
	<lastBuildDate>Tue, 06 Apr 2010 09:38:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>On Flash &#8211; map integration with Yahoo Maps + ActionScript (part 2)</title>
		<link>http://www.whatwasithinking.co.uk/2008/07/09/on-flash-map-integration-with-yahoo-maps-actionscript-part-2/</link>
		<comments>http://www.whatwasithinking.co.uk/2008/07/09/on-flash-map-integration-with-yahoo-maps-actionscript-part-2/#comments</comments>
		<pubDate>Wed, 09 Jul 2008 21:42:10 +0000</pubDate>
		<dc:creator>Alexander Rehm</dc:creator>
				<category><![CDATA[Flash Development]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web development]]></category>
		<category><![CDATA[Actionscript 2.0]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[functionality]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[mash-up]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rich media application]]></category>
		<category><![CDATA[travel blog]]></category>
		<category><![CDATA[travel journal]]></category>
		<category><![CDATA[Yahoo maps]]></category>

		<guid isPermaLink="false">http://www.whatwasithinking.co.uk/?p=66</guid>
		<description><![CDATA[If you followed my entry about Map integration with Yahoo Maps and ActionScript you will probably be wondering what I have to report about the progress. As you may remember, this mash-up is about offering a client a new spin on travel bogging: being able to log in to the client&#8217;s website from anywhere in [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-67" title="On Flash - map integration with Yahoo Maps and ActionScript (part2)" src="http://www.whatwasithinking.co.uk/wp-content/uploads/2008/07/on-flashmaps-00.jpg" alt="On Flash - map integration with Yahoo Maps and ActionScript (part2)" width="170" height="140" align="right" />If you followed my entry about <a title="On Flash - map integration with Yahoo Maps + ActionScript 2.0" href="http://www.whatwasithinking.co.uk/2008/05/05/on-flash-map-integration-with-yahoo-maps-as-20/" target="_blank">Map integration with Yahoo Maps and ActionScript</a> you will probably be wondering what I have to report about the progress. As you may remember, this mash-up is about offering a client a new spin on travel bogging: being able to log in to the client&#8217;s website from anywhere in the world and give other users (and family and friends) the opportunity to see where you are going and what you are doing there.</p>
<p>Last time I wrote about this Yahoo / Flash mashup I connected the Yahoo map&#8217;s API through Flash and PHP to a MySQL database and was able to write / read from the entries. My next goals were to integrate a user-login, adding links, implementing moderation and a Flash image uploader script.<span id="more-66"></span><br />
<span style="color: #ffffff;">.</span></p>
<h3>Integrating a PHP uploader script</h3>
<p>A very important aspect for both users (and our clients) is to be able to &#8216;take part&#8217; and &#8216;be part&#8217; of shaping the user-generated content area of a site, to leave their mark. Naturally, images and content are the weapons of choice, as such the next step was to work on an image-uploader. The task:</p>
<blockquote><p>Develop an image uploader script through Flash that would allow users to upload an image from their desktop, store it online in a writeable folder on the server and reference to it from the SQL database and display the image for the relevant post for the relevant user.</p></blockquote>
<p><a href="http://www.whatwasithinking.co.uk/wp-content/uploads/2008/07/on-flashmaps-001.jpg"  rel="lightbox[roadtrip]"><img class="alignright size-thumbnail wp-image-68" title="On Flash maps - image uploader gone wrong" src="http://www.whatwasithinking.co.uk/wp-content/uploads/2008/07/on-flashmaps-001-150x150.jpg" alt="On Flash maps - image uploader gone wrong" width="150" height="99" align="right" /></a>This wasn&#8217;t such an easy task. I had a good look around how Flash tutorial websites I usually frequent handle image upload. After some working I managed to get the PHP side of things working &#8211; which also had its own issues to start with, it would not update file names properly (<em>see image to the right, click to enlarge</em>)! After some fiddling around I managed to get the php script to work, and if you like you can download it here:</p>
<blockquote><p>Please download the file here: <a href="http://www.whatwasithinking.co.uk/wp-content/uploads/2008/07/fileupload.zip">fileupload.zip</a> (~800 bytes)</p></blockquote>
<p>What the script does is it defines the maximum file dimensions (180&#215;300 max in either direction) and uploads the file to a temporary directory (<em>/tempstore/</em>) before giving it a timestamp and name-change and putting it into the <em>/images/</em> directory.</p>
<p><span style="color: #ffffff;">.</span></p>
<h3>Connecting PHP with Flash</h3>
<p>This was a bit (okay, a hell of a lot) more complicated: through the variables &#8216;<em>FileReference</em>&#8216; and &#8216;<em>browseListener</em>&#8216; and a couple of other event listeners I managed to tell Flash how to use the &#8220;Browse&#8230;&#8221; button and how to handle the uploaded image. At the moment the Flash file uploads the image to the database correctly, but it will break if the image does not have the correct size, so I need to work on getting the image-resizer to work. Once that works I&#8217;ll upload the source as well.</p>
<p><span style="color: #ffffff;">.</span></p>
<h3>Sneak Peak for the image-uploader (snapshot of 9th July 2008)</h3>
<p>The main uploader:<br />
<img class="alignnone size-full wp-image-70" title="On Flash - map integration with Yahoo Maps + Actionscript - the uploader" src="http://www.whatwasithinking.co.uk/wp-content/uploads/2008/07/on-flashmaps-01.jpg" alt="The uploader" width="600" height="440" /></p>
<p><span style="color: #ffffff;">.</span></p>
<p>The uploaded image and adding information:<br />
<img class="alignnone size-full wp-image-71" title="On Flash - map integration with Yahoo Maps + Actionscript - the uploaded image" src="http://www.whatwasithinking.co.uk/wp-content/uploads/2008/07/on-flashmaps-02.jpg" alt="The uploaded image" width="600" height="441" /></p>
<p><span style="color: #ffffff;">.</span></p>
<p>&#8230;and the result:<br />
<img class="alignnone size-full wp-image-72" title="On Flash - map integration with Yahoo maps + Actionscript - the final result" src="http://www.whatwasithinking.co.uk/wp-content/uploads/2008/07/on-flashmaps-03.jpg" alt="The final result...well, for now!" width="600" height="441" /></p>
<p><span style="color: #ffffff;">.</span></p>
<h3>Conclusion and next steps</h3>
<p>Well, so far it is looking very promising with the image-uploader! Obviously we are still some way to go with it, but I think the project is starting to take shape! Integrating browse and upload functionality in Flash took some work, but thanks to ActionScript 2.0&#8242;s event listeners it worked out reasonably well and connected to the database. Obviously we are still taking about only one user at a time, so I would need to review the php code at a later date to also make sure there is a folder structure per user present, but that should not be too much of an issue. Watch out for the next entry on this mash-up, by then I will have the uploader finished and maybe add the ability to upload multiple images to show a slideshow, we will see!</p>
<p><span style="color: #ffffff;">.</span></p>
<p>Lastly, if you enjoyed the article &#8211; or just the flash map &#8211; then please leave a comment, I would really appreciate it, as it gives me always another boost to write more <img src='http://www.whatwasithinking.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.whatwasithinking.co.uk/2008/07/09/on-flash-map-integration-with-yahoo-maps-actionscript-part-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>On Flash &#8211; map integration with Yahoo Maps + ActionScript 2.0</title>
		<link>http://www.whatwasithinking.co.uk/2008/05/05/on-flash-map-integration-with-yahoo-maps-as-20/</link>
		<comments>http://www.whatwasithinking.co.uk/2008/05/05/on-flash-map-integration-with-yahoo-maps-as-20/#comments</comments>
		<pubDate>Mon, 05 May 2008 22:25:35 +0000</pubDate>
		<dc:creator>Alexander Rehm</dc:creator>
				<category><![CDATA[Flash Development]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web development]]></category>
		<category><![CDATA[Actionscript 2.0]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[forums]]></category>
		<category><![CDATA[functionality]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[rich media application]]></category>
		<category><![CDATA[travel blog]]></category>
		<category><![CDATA[travel journal]]></category>
		<category><![CDATA[what was i thinking]]></category>
		<category><![CDATA[Yahoo maps]]></category>

		<guid isPermaLink="false">http://www.whatwasithinking.co.uk/?p=34</guid>
		<description><![CDATA[Alexander Rehm from What was I thinking UK discusses the next generation of travel blogs and has worked on an interactive travel journal with Yahoo Maps and Actionscript 2.0]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-41" title="on-flash" src="http://www.whatwasithinking.co.uk/wp-content/uploads/2008/05/on-flash.jpg" alt="On Flash - map integration with Yahoo Maps + ActionScript 2.0" width="170" height="140" align="right" />In my job it isn&#8217;t always about a swish flash interface, a cool looking site or animation these days &#8211; it is about integration, about offering functionality that jumps out from the rest of the competition. The magic word is integration. A client of ours approached us about adding a special sort of travel-blog.</p>
<blockquote><p>What we would like is some sort of members-only application that allows our users to track their journeys with us and to maybe blog about them, but it should look swish and very easy to use. We would like a similar functionality for our travel guides who would then post information about the tours.</p></blockquote>
<p>The idea of a blog is a great tool for customer retention, if done right it allows users to post comments about their journeys, maybe with images to keep a log of what they are doing while on that trip. It would allow visitors to see what is going on on a journey with &lt;Company Name&gt; and what you can do or what the user(s) saw and took part in. Obviously, I wanted to offer a little bit more than just a blog. My idea was to work on a map-blog&#8230;<span id="more-34"></span></p>
<p><em>(Please note, if you would just like to see the map in action, just scroll down to the bottom of this page)</em></p>
<p><span style="color: #ffffff;">.</span></p>
<h3>Integrating with new technologies</h3>
<p>For (flash) designers and developers there are a number of new technologies that give a user access to content and functionality that was not possible a year or two back. Let us take Google or Yahoo for example: developers are given access to a great and increasing number of technological toys to play with: application programming interfaces (APIs) to integrate content such as Flickr images and albums, mail, rss feeds or maps.</p>
<p>Anyone, from an individual to a development company, has access to these API components, and more and more people are using them to give their clients (or their portfolios) a WOW-factor.</p>
<p><span style="color: #ffffff;">.</span></p>
<h3>Travel blog + map = travel journal</h3>
<p>Looking at the possibilities our CMS at work has (remember, its is aspx / .net) there was quite a range of possibilities we could offer our client something for the money. The obvious would have been setting up blog-facilities based on either each tour or destinations, giving registered users who have participated in a tour to blog and comment about it (we would run the user&#8217;s access against their booking history to grant write-rights). We could also set up forums and sub-forums to allow users to add comments about trips or destinations.</p>
<p>However, travel blogs or forum posts can be a bit text-laden, and the interaction only consists of a user posting, others reading and (if they like) commenting on posts.</p>
<p>Some time ago we did some Google Earth integration to one of our clients&#8217; website which allowed the client to plot out tours on Google Earth, to give the user the ability to &#8216;see&#8217; the tour and where it is going and what is going on. The idea of combining a map with a travel blog kinda became obvious.</p>
<p>With both Google Maps and Yahoo Maps giving excellent access to and support for their APIs I wanted to work on integrating a mapping solution with our user and blog-database. In the end I went for Yahoo Maps simply because their development network had a tremendous amount of information and code-snippets to get started with.</p>
<p><span style="color: #ffffff;">.</span></p>
<h3><a href="http://www.whatwasithinking.co.uk/wp-content/uploads/2008/05/yahoo-flash1.jpg"  rel="lightbox[roadtrip]"><img class="alignright size-thumbnail wp-image-36" title="Yahoo Maps flash integration" src="http://www.whatwasithinking.co.uk/wp-content/uploads/2008/05/yahoo-flash1-150x150.jpg" alt="Yahoo Maps flash integration" width="150" height="150" align="right" /></a>Yahoo maps and ActionScript &#8211; (API) key to success?</h3>
<p>Once the extension was downloaded and a API key registered I went on integrating the map into the workspace. Just import / drag the component into the stage. You can edit its size simply by entering a new width and height into the properties (by default on the bottom of the stage). Your next step will need to be to check out the parameters. The screenshot on the right (<em>click to enlarge</em>) shows you where you can find the API in Flash CS3 and what parameters you will need to change by default, such as API key, zoom factor or starting location (by default USA map).</p>
<p>Now that we have a working API-integration into flash I tackled the next step: integration of a server-database to read posted points as well as add points to it. (<em>In this example I used PHP / MySQL as this blog is based on a PHP system</em>). You need to set up a database via PHPMyAdmin for example. Here is a sql-database for you to have a look at and use:</p>
<blockquote><p><em>Please download the file here:</em> <a href="http://www.whatwasithinking.co.uk/wp-content/uploads/2008/05/dataread.zip"></a><a href="http://www.whatwasithinking.co.uk/wp-content/uploads/2008/05/entries.zip">entries.zip</a><em><br />
</em></p></blockquote>
<p>So, what do we have in this database now: We have an ID (unique value for each entry), lat and long, a date (for timestamping entries), a short info and a descritption. These are the fields I will be using for now.</p>
<p><span style="color: #ffffff;">.</span></p>
<h3>Writing to and from the Database</h3>
<p>The next steps are to read from and enter information to the database through PHP. A simple</p>
<blockquote><p><span style="color: #008000;">$sql = &#8220;INSERT INTO entries (id, lat, lon, date, info, description) VALUES (&#8221;, &#8216;$lat&#8217;, &#8216;$lon&#8217;, &#8216;$date&#8217;, &#8216;$info&#8217;, &#8216;$description&#8217;)&#8221;;</span></p></blockquote>
<p>for entering information should do the trick. Which it did. I am not going into very much detail here, as the project is very code-heavy, but if you are interested in knowing more please do not hesitate to get in touch with me.</p>
<p><span style="color: #ffffff;">.</span></p>
<h3>The first travel journal test</h3>
<p>Here is now a first map-test <em>(please note that I have disabled entering notes at this stage)</em>:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="760" height="560" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.whatwasithinking.co.uk/map-test/map3.swf" /><embed type="application/x-shockwave-flash" width="760" height="560" src="http://www.whatwasithinking.co.uk/map-test/map3.swf"></embed></object></p>
<p><span style="color: #ffffff;">.</span></p>
<h3>Closing comments and future plans for this project</h3>
<p>Getting the API to work was a bit tricky, and it took me a couple of hours to figure out what could be done and what didn&#8217;t when it came down to connecting to a database.</p>
<ul>
<li>User-access: At the moment any user can access the map, as such I will need to work on a login-based system, with each login having their own database table, and maybe a selector at the start to see whose trip journal you would like to visit. This should hopefully not be too difficult *touch wood*.</li>
<li>Image and video-upload: I will need to write an image upload script that saves the images on the server in the user&#8217;s folder and give each one a unique ID just in case. I&#8217;ll have to also look into resizing options and video compression if we are not using youtube etc</li>
<li>Linking: Users should be able to cross-link or link to products / posts / etc</li>
<li>Moderation &amp; Administration: &#8230;and ideally all of the above should be moderated and maintained</li>
<li>Plus, I want this to work in Adobe AIR later on as well, so I will need to rewrite a bit of the code later!</li>
</ul>
<p>Lastly, if you enjoyed the article &#8211; or just the flash map &#8211; then please leave a comment, I would really appreciate it, as it gives me always another boost to write more <img src='http://www.whatwasithinking.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>[<strong>UPDATE:</strong> I have updated this project's progress <a title="On Flash - map integration with Yahoo Maps + ActionScript 2.0 (part 2)" href="http://www.whatwasithinking.co.uk/2008/07/09/on-flash-map-integration-with-yahoo-maps-actionscript-part-2/" target="_self">here</a>]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.whatwasithinking.co.uk/2008/05/05/on-flash-map-integration-with-yahoo-maps-as-20/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
