Put Google Map Search on Your Blog

Loading...

Recommendations

Caffeine

Thai Food

Pizza

Gym

Hotel Avante

Residence Inn

The Four Seasons

The Westin, Palo Alto

Loading...
Random Weather Map
Loading...

Click on a tag to change the Video Bar

Loading...
Loading...

Tuesday, December 5, 2006

Reuters Video News in Beta Blogs.

Reuters Video News can now be made available to beta blog readers.......

Reuters is the world's largest international multimedia news agency, providing investing news, world news, business news, technology news, headline news, small business news, news alerts, personal finance, stock market, and mutual funds information available on Reuters.com, video, mobile, and interactive television platforms. Reuters journalists are subject to the Reuters Editorial Handbook which requires fair presentation and disclosure of relevant interests.

The free video player has upto 20 of the latest breaking stories from around the world - updated throughout the day. The player is compatible with most browsers and takes just a few minutes to integrate into your blog. Visitors can watch full news stories right in the context of your page. There are no popups or software installs.

To put the player in your blog you will first have to get the code from the Reuters website. For UK visitors go to here. Others should go here. You need a Brightcove account to install the player. Registration is free and requires you to add the url of your blog. You will get a confirmation by Email and click on the link to get the Javascript code for the player.

There are two size players :
Standard 540 by320px
Slimline or blog friendly designed to work with blog publishing software 500 by 675px.





Copy the code and paste it in the location shown below.

To install it in Beta Blogger go to Edit Html subtab of Template tab and first backup your template. Then scroll down till you come to :

<b:section class='main' id='main'>

Modify the above line to :

<b:section class='main' id='main' maxwidgets='2' showaddelement='yes'>

Save Template. Go to Page Elements tab and click on Add Page Element link in the Blog Posts section. Choose Html/Javascript option and paste the code for the player in the content window and save. It will stay on top of all your blog posts.




To see it in action go to Google Search Map.


The Reuters Video Player is free. The service is supported by advertising sold by Reuters.

It requires flash plugin installed and Javascript enabled in your browser. You can advertise across the Reuters Video Network. For more info see here.




Thursday, November 30, 2006

Google Search Map

To add a Google Map to your blog go to http://www.google.com/apis/maps/ and click on the Sign up for a Google Maps API key button. It will take you to this page :
http://www.google.com/apis/maps/signup.html. This key identifies your web site to Google and helps them track usage of Google Maps. A new and distinct key is needed for each directory on your website that includes Google Maps.
Put a check in the box where it says I have read and agree with the terms and conditions and paste your blog url in the text box below and click on Generate API Key button.(Step 1)

Copy paste this code (ONLY THE BLUE LINES) just below the title tag in your template :


<!-- maps api, ajax search api, map search solution code -->
<script src="http://maps.google.com/maps?file=api&v=2&key=YOUR-KEY"
type="text/javascript">


IN THE ABOVE LINE ADD amp; AFTER BOTH THE & CHARACTERS OR YOU WILL GET ERROR MESSAGE.


</script>
<script src="http://www.google.com/uds/api?file=uds.js&v=1.0&key=YOUR-KEY"
type="text/javascript">
IN THE ABOVE LINE ADD amp; AFTER BOTH THE & CHARACTERS OR YOU WILL GET ERROR MESSAGE.
</script>
<script src="http://www.google.com/uds/solutions/mapsearch/gsmapsearch.js"
type="text/javascript"></script>



<!-- ajax search stylesheet, map search stylesheet -->
<link href="http://www.google.com/uds/css/gsearch.css" rel="stylesheet"
type="text/css"/>
<link href="http://www.google.com/uds/solutions/mapsearch/gsmapsearch.css"
rel="stylesheet" type="text/css"/>


Type in your Google API key code where it says 'YOUR KEY ' above.(Step 2)

Define a location on your page for the Map Search Control (Step 3)

It is necessary to have an empty space in the right hand part of the body of your template to add this in the way I have done. I have used the Minima template and added a float left property to the outside wrapper to create room for the Google Map on the right side.
This is typically done by defining a named <div> element as we have shown below:
Then paste this code in your template just after <body> tag :

<div id="mapsearch">Loading...</div>

You might want to set some styling attributes on this element to constrain the width of the control, set a border or margin, etc. For example, a style rule like this might be useful.
Add the following to the CSS part of your template

#mapsearch {
width : 400px;
float:right;
margin : 10px;
padding : 4px;
border : 1px solid #f9f9f9;
}


You can change the width to suit your blog.
In addition to this base style, the height of the idle state map and the active state map is easily modified.

/* set height of idle state map */
#mapsearch .gsmsc-idleMapDiv { height : 200px; }

/* set height of active state map */
#mapsearch .gsmsc-mapDiv { height : 300px; }


to get code to run add this code after the <body> tag (Step 4)


<body onload="OnLoad()">

After the above line add the following code which will create a map that will center itself on Google corporate headquarters located at "1600 Amphitheatre Parkway, Mountain View, CA.":



<script type="text/javascript">
function OnLoad() {

// set title to the Googleplex and the link to
// the Google corporate information page
var options =
{
title : "Googleplex",
url : "http://www.google.com/corporate/index.html"
}

// create the map search control
new GSmapSearchControl(
document.getElementById("mapsearch"),
"1600 Amphitheatre Parkway, Mountain View, CA",
options
);
}
</script>


To display the map of any other place in the USA add code similar to this line :

"1000 NE Multnomah, Portland, OR",
("Place Location, CITY NAME, STATE",)

instead of this line in above code :

"1600 Amphitheatre Parkway, Mountain View, CA",


To Set up hot spots (Step 6) add this code in the css to style the hotspots :


/* define the CSS used to style the hotspots */
h4.hotspot {
font-size : 100%;
font-weight : normal;
color : rgb(9, 122, 182);
margin-left : 8px;
margin-top : 0px;
margin-bottom : 2px;
font-style : normal;
cursor : pointer;
}

h4.hotspot:hover {
color : rgb(237, 92, 11);
text-decoration : underline;
}

To show the hotspots on the page add the following code after the mapsearch div code added in Step 3

<h3 class="hotspotheader">Recommendations</h3>
<h4 id="hs01" class="hotspot">Caffeine</h4>
<h4 id="hs02" class="hotspot">Thai Food</h4>
<h4 id="hs03" class="hotspot">Pizza</h4>
<h4 id="hs04" class="hotspot">Gym</h4>
<h4 id="hs05" class="hotspot">Hotel Avante</h4>
<h4 id="hs06" class="hotspot">Residence Inn</h4>
<h4 id="hs07" class="hotspot">The Four Seasons</h4>
<h4 id="hs08" class="hotspot">The Westin, Palo Alto</h4>


To create the hotspots use the following script :


  • <script type="text/javascript">

  • function OnLoad() {


  • // Create an array of hotspots. Each entry contains and html element
    // from your page, and the query to execute when that element is clicked
    var hotspotsList = [
    { element : document.getElementById("hs01"), query : "Starbucks" },
    { element : document.getElementById("hs02"), query : "Amarin Thai" },
    { element : document.getElementById("hs03"), query : "Frankie Johnnie Luigi" },
    { element : document.getElementById("hs04"), query : "Hotel Avante" },
    { element : document.getElementById("hs05"), query : "Residence Inn" },
    { element : document.getElementById("hs06"), query : "Four Seasons Palo Alto" },
    { element : document.getElementById("hs07"), query : "Westin Palo Alto" }
    ];

    // set title to the Googleplex and the link to
    // the Google corporate information page
    // set the hotspot list to the list above
    var options =
    { title : "Googleplex",
    url : "http://www.google.com/corporate/index.html",
    hotspots : hotspotsList
    }

    // create the map search control
    new GSmapSearchControl(
    document.getElementById("mapsearch"),
    "1600 Amphitheatre Parkway, Mountain View, CA",
    options
    );
    }
    </script>