<?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>My Learnings - Markish Personal Blog &#187; Adding Google map to Wordpress</title>
	<atom:link href="http://markish.in/tag/adding-google-map-to-wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://markish.in</link>
	<description>It&#039;s my Blog....!</description>
	<lastBuildDate>Thu, 10 Mar 2011 08:41:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Creating a simple Mashup..!</title>
		<link>http://markish.in/2008/08/creating-a-simple-mashup/</link>
		<comments>http://markish.in/2008/08/creating-a-simple-mashup/#comments</comments>
		<pubDate>Thu, 14 Aug 2008 08:52:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Internet Technology]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Adding Google map to Wordpress]]></category>
		<category><![CDATA[Markish]]></category>

		<guid isPermaLink="false">http://markishonline.com/2008/08/14/creating-a-simple-mashup/</guid>
		<description><![CDATA[    As said in my previous post, Mashups are very powerful user-interface when handled with little common sense and creativity. In this post I&#8217;ll try to give an overview of how an Mashup (pretty simple Mashup… J ) can be created. Though this is going to be simple, the logic behind this is same for all [...]]]></description>
			<content:encoded><![CDATA[<p>    As said in my <a href="http://markishonline.com/2008/08/12/what-is-a-mashup/">previous post</a>, Mashups are very powerful user-interface when handled with little common sense and creativity. In this post I&#8217;ll try to give an overview of how an Mashup (pretty simple Mashup… <span style="font-family:Wingdings">J</span> ) can be created. Though this is going to be simple, the logic behind this is same for all Mashups..!
</p>
<p><span id="more-59"></span></p>
<p>Writing any Mashup involves the following steps /actions
</p>
<ul>
<li>Deciding what to write (choose a topic)
</li>
<li>Deciding the data stores (service providers like Google, Amazon, Yahoo, Hostinfo  &#8230;etc)
</li>
<li>Look for necessary APIs exposed them
</li>
</ul>
<p>Once you are at this point, you can really &#8216;Mashup &#8216; you data to provide your end user a creative user-interface. Now, I&#8217;ll take an example and go through the above steps and finally come up with a Mashup widget. I&#8217;d try to create a &#8216;Geo-IP-Map&#8217;. It&#8217;d show the end-user position (place) on the map. It can be embedded on any web page. I&#8217;ve just embedded it in my own sidebar.
</p>
<p style="text-align: center"><img src="http://markish.in/wp-content/uploads/2008/08/081408-0852-creatingasi11.png" alt=""/>
	</p>
<p>For producing this I need the following data
</p>
<ul>
<li>The Map&#8217;s base data
</li>
<li>The latitude and longitude of users&#8217; present location
</li>
<li>The City / Country / Geographical location of the user
</li>
<li>The IP of the end-user
</li>
</ul>
<p>I&#8217;ve given the data in the top-down order. Now let&#8217;s decide the data store provider for each of the data required
</p>
<div style="text-align: center">
<table style="border-collapse:collapse" border="0">
<colgroup>
<col style="width:166px"/>
<col style="width:144px"/>
<col style="width:488px"/></colgroup>
<tbody valign="top">
<tr>
<td colspan=2 style="padding-left: 9px; padding-right: 9px; border-top:  solid yellow 1.5pt; border-left:  solid yellow 1.5pt; border-bottom:  solid yellow 1.5pt; border-right:  solid yellow 1.5pt">
<p><strong>Data</strong> </p>
</td>
<td style="padding-left: 9px; padding-right: 9px; border-top:  solid yellow 1.5pt; border-left:  none; border-bottom:  solid yellow 1.5pt; border-right:  solid yellow 1.5pt">
<p><strong>Data Provider</strong> </p>
</td>
<td style="padding-left: 9px; padding-right: 9px; border-top:  solid yellow 1.5pt; border-left:  none; border-bottom:  solid yellow 1.5pt; border-right:  solid yellow 1.5pt">
<p><strong>Comments on APIs exposed</strong></p>
</td>
</tr>
<tr>
<td colspan="2" style="padding-left: 9px; padding-right: 9px; border-top:  none; border-left:  solid yellow 1.5pt; border-bottom:  solid yellow 1.5pt; border-right:  solid yellow 1.5pt">
<p>IP address </p>
</td>
<td style="padding-left: 9px; padding-right: 9px; border-top:  none; border-left:  none; border-bottom:  solid yellow 1.5pt; border-right:  solid yellow 1.5pt">
<p>Web host </p>
</td>
<td style="padding-left: 9px; padding-right: 9px; border-top:  none; border-left:  none; border-bottom:  solid yellow 1.5pt; border-right:  solid yellow 1.5pt">
<p style="text-align: justify">User&#8217;s IP address can be easily obtained from the server on which your site is hosted using small script. Something like $myip=$_SERVER['REMOTE_ADDR']; will do in PHP</p>
</td>
</tr>
<tr>
<td colspan="2" style="padding-left: 9px; padding-right: 9px; border-top:  none; border-left:  solid yellow 1.5pt; border-bottom:  solid yellow 1.5pt; border-right:  solid yellow 1.5pt">
<p>Geographic Location </p>
</td>
<td style="padding-left: 9px; padding-right: 9px; border-top:  none; border-left:  none; border-bottom:  solid yellow 1.5pt; border-right:  solid yellow 1.5pt">
<p>HostIP </p>
</td>
<td style="padding-left: 9px; padding-right: 9px; border-top:  none; border-left:  none; border-bottom:  solid yellow 1.5pt; border-right:  solid yellow 1.5pt">
<p style="text-align: justify">Once you have the IP address, you can get the geographic location of the user from HostIP. They provide more than one API for different formats</p>
</td>
</tr>
<tr>
<td colspan="2" style="padding-left: 9px; padding-right: 9px; border-top:  none; border-left:  solid yellow 1.5pt; border-bottom:  solid yellow 1.5pt; border-right:  solid yellow 1.5pt">
<p>Latitude &#038; Longitude </p>
</td>
<td style="padding-left: 9px; padding-right: 9px; border-top:  none; border-left:  none; border-bottom:  solid yellow 1.5pt; border-right:  solid yellow 1.5pt">
<p>Google Maps</p>
</td>
<td style="padding-left: 9px; padding-right: 9px; border-top:  none; border-left:  none; border-bottom:  solid yellow 1.5pt; border-right:  solid yellow 1.5pt">
<p style="text-align: justify">Once you have the Physical location from HostIP, you can resolve them into the actual geospatial data using the APIs provided by Google maps</p>
</td>
</tr>
<tr style="height: 16px">
<td colspan="2" style="padding-left: 9px; padding-right: 9px; border-top:  none; border-left:  solid yellow 1.5pt; border-bottom:  solid yellow 1.5pt; border-right:  solid yellow 1.5pt">
<p>Map base data </p>
</td>
<td style="padding-left: 9px; padding-right: 9px; border-top:  none; border-left:  none; border-bottom:  solid yellow 1.5pt; border-right:  solid yellow 1.5pt">
<p>Google Maps</p>
</td>
<td style="padding-left: 9px; padding-right: 9px; border-top:  none; border-left:  none; border-bottom:  solid yellow 1.5pt; border-right:  solid yellow 1.5pt">
<p style="text-align: justify">Google Maps provide a wide range of APIs for producing the Maps and they do support, custom maps.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p><!--adsensestart--></p>
<p>
 </p>
<p>Now you have the API and the data store ready. Both of the above data stores I&#8217;ve used require you to register with them for receiving the API key. This requirement varies with the data providers. Now you have this ready, you can just put things in place and provide a creative UI to your users. I used PHP to code my GEO-IP-Map. I&#8217;ve added this Mashup maplet to my own blog. You can see it in action in the sidebar itself. After all it is simple and cool…!
</p>
<p>If you are interested in this code, you can download the sample from <a href="http://markishonline.com/downloads/gmaps.zip">here</a>. I&#8217;m not a PHP programmer, hence you may find this very crude. You can modify it to your taste and convenience. Do keep me posted.
</p>
<p>I&#8217;ll write more on Mashups in my next post.</p>
]]></content:encoded>
			<wfw:commentRss>http://markish.in/2008/08/creating-a-simple-mashup/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

