Author: Sheludkov
Free Download: TimeMachine.sis
Google Maps provides a really simple way to display geographical information, such as a set of pinpoints or a route, in the context of the surrounding geography, and developers can use it for free on Internet-facing sites. If you have data stored in Microsoft SharePoint products or technologies that includes geographical information, you should consider if a map display might help your users. I'm going to show you how to use Google Maps with the SharePoint user interface and demonstrate some simple coding techniques.
Microsoft's flagship SharePoint product is Microsoft Office SharePoint Server 2007 but you could easily use maps in the free Windows SharePoint Services 3.0 or other products based on SharePoint, such as Search Server 2008.
Take a good look at all the mapping solutions before starting to code. You may prefer Virtual Earth's user interface or find that Yahoo! Maps have more detail in a location that is important to you. I've coded Google Maps for a customer, and it is the most popular solution, but if you chose Virtual Earth instead the only difference would be in the JavaScript code I describe.
I'll concentrate on the use of Google Maps to display search results but the methods described can be applied other sources of data such as a SharePoint list, an Excel spreadsheet, or a Business Data Catalog (BDC) connection.
SharePoint is built on the ASP.NET 2.0 server-side development technology and its user interface is built from ASP.NET Web Parts. Web Parts allow administrators and users to customize the user interface to match their needs. They can add or remove Web Parts or rearrange them on the page. In the Web Part Gallery, site administrators can control which Web Parts are available. When you develop user interface components for SharePoint you should create them as Web Parts to inherit this flexibility automatically. You should also consider whether to create more than one Web Part to encapsulate different aspects of functionality that users can easily differentiate.
As an example consider a search tool for geographical data. When the user clicks "Search" the tool presents a list of results that match their terms as you might see in an Internet search engine or the SharePoint Search Center. However this tool also presents a Google map with the results pinpointed. This tool might warrant three Web Parts; one for the search terms, one for the results in a list, and a final one for the results on a map. In this architecture users or administrators could show just the list, just the map, or both displays.
Unlike Web Parts, Google Maps are coded in client-side code. JavaScript is used in the browser to create and position the map, add pinpoints, add captions, and draw shapes. This is what makes life interesting. Your Google Maps SharePoint solution must address how to communicate between server-side Web Parts and client-side JavaScript. You could, for example, publish a Web Service on the server and have client-side code query it and present results. AJAX would provide a lot of help with this. In the method I used, a server-side Web Part generates XML and renders it as an island amongst the SharePoint HTML. In the browser, JavaScript can locate this island and use it to draw the map and add pinpoints.
In most search tools, results are presented in a list with links to each, a short description, and sometimes other fields. To build a SharePoint Web Part that displays search results, you submit a query by using a Microsoft.SharePoint.Search.Query.FullTextSqlQuery object. This returns a ResultTable object through which you must loop to evaluate each individual result and display them to users.
As your code loops through the ResultTable, you can build the XML to place as an island in the Web page that will be returned to the client. To do this, create a System.Xml.XmlWriter object and configure it with a corresponding XmlWriterSettings object:
//Create the XML Writer Settings for configuration
XmlWriterSettings settings = new XmlWriterSettings();
settings.Encoding = System.Text.Encoding.UTF8;
settings.Indent = true;
settings.OmitXmlDeclaration = true;
//This string builder will be used to render the XML
resultsForMap = new StringBuilder();
//Create the XML writer
XmlWriter writer = XmlWriter.Create(resultsForMap, settings);
Then you can write the start element for your XML:
writer.WriteStartElement("MapResults", "my.namespace");
Looping through the DataRow objects in the ResultTable.Rows collection, you can add XML elements with the properties you need. For example:
foreach (DataRow currentResult in myResults.Rows)
{
writer.WriteStartElement("Result");
writer.WriteElementString("Title",
currentResult["Title"].ToString());
writer.WriteElementString("Path", path);
writer.WriteElementString("Latitude",
currentResult["SupplierLatitude"].ToString());
writer.WriteElementString("Longitude",
currentResult["SupplierLongitude"].ToString());
writer.WriteEndElement();
}
You must remember to end the XML and flush the writer:
writer.WriteEndElement();
writer.Flush();
Your XML is now flushed to the StringBuilder object (named resultsForMap in the above example). To render this string on the SharePoint Web page you can use an ASP.NET Label like this:
returnedXmlLabel.Text = "<xml id="\">" +
resultsForMap.ToString() + "</xml>";
The ID you use for this XML island allows JavaScript code to locate it when the map is rendered on the client.
Since the work of populating the map with points and captions is done in client-side code, there is little to be done in ASP.NET code for the Map Results Web Part. However it is necessary to render a <div> tag for the map, and a <script> tag for the Google Maps code library. This <script> tag is where you must render the Google Key associated with your Google Maps account.
protected override void Render(System.Web.UI.HtmlTextWriter writer)
{
//Render the script tags that link to Google Maps API
writer.WriteLine(String.Format("<script " +
src="\http://maps.google.com/maps?" +
file="api&v=2&key={0}\ " +
type=\"text/javascript\"> </script>",
"Your key here" ()));
//Render the div that will display the map
writer.Write("<br /><div id=\"map\" " +
"style=\"width: 800px; height: 600px\" ></div>");
}
In the Map Results Web Part, you must also ensure that the JavaScript, which generates the map and populates it with pinpoints, executes when the page reaches the client. ASP.NET 2.0 provides an elegant way to do this: you can embed script files as resources in the same assembly as the Map Results Web Part. This makes deployment simple, because the script is part of the assembly.
You must complete several steps to embed a script file in your Web Part assembly:
This file is where you place all the Google Maps code. For examples of such code, see "JavaScript Files" below.
This file contains information about the assembly such as version numbers. You can add a reference to a script file like this:
[assembly: WebResource("MyNameSpace.MapScripts.js",
"text/javascript", PerformSubstitution = true)]
You should do this in the OnPreRender method:
protected override void OnPreRender(EventArgs e)
{
//Register the JavaScript file
Page.ClientScript.RegisterClientScriptResource(
this.GetType(), "MyNameSpace.MapScripts.js");
}
You do this by registering the script as a startup script. Add the following line to the Map Result Web Part in the Render method:
this.Page.ClientScript.RegisterStartupScript(
this.GetType(), "MapScriptsStart", "loadMap();", true);
We now have an XML island rendered in the SharePoint Web Part that contains all the results that must appear on the map. We have also embedded a JavaScript file in the Web Part assembly to execute when the page loads on the client. The final task is to write JavaScript in the embedded file that loads the Google Map and add pinpoints and other objects.
First, create a global variable to reference the map itself. You will need this throughout the script file:
var map;
Next create a function to load the map. This should match the function you specified in the RegisterStartupScript method in the previous section:
function loadMap(){
//Create the map
map = new GMap2(document.getElementById("map"));
//Centre it on default latitude and longitude.
map.setCenter(new GLatLng(54.59088, -4.24072), 16);
//Set a default zoom level
map.setZoom(5);
//Add the controls
var mapControl = new GLargeMapControl();
map.addControl(mapControl);
map.enableScrollWheelZoom();
map.addControl(new GMapTypeControl());
map.setMapType(G_SATELLITE_MAP);
//Parse the XML in the HTML data
parseXmlIsland();
}
The last line of the above code calls a separate parseXmlIsland function. This function locates the XML island and loads it into a variable. This must be done slightly differently depending on the user's browser:
var xmlIsland;
try //Internet Explorer
{
xmlIsland = new ActiveXObject("Microsoft.XMLDOM");
}
catch (e)
{
try //Firefox, Mozilla, Opera etc.
{
xmlIsland =
document.implementation.createDocument("", "", null);
}
}
xmlIsland.async = "false";
xmlIsland.validateOnParse = "false";
xmlIsland.loadXML(document.getElementById("resultsformap").innerHTML);
Setup some variables and get all the results nodes you placed in the XML:
var Title, Path, Latitude, Longitude;
var resultNodes = xmlIsland.getElementsByTagName("Result");
Now, loop through the node, storing relevant information:
var resultNode;
var resultNodeChild;
for (i = 0; i < resultNodes.length; i++) {
resultnode = resultNodes[i];
for ( j = 0; j < resultNode.childNodes.length; j++) {
resultNodeChild = resultNode.childNodes[j];
switch (resultNodeChild.nodeName) {
case "Title":
Title = resultNodeChild.text;
break;
case "Path":
Path = resultNodeChild.text;
break;
case "Latitude":
Latitude = parseFloat(resultNodeChild.text);
case "Longitude":
Longitude = parseFloat(resultNodeChild.text);
break;
}
}
//Add a point for this result
addPinPoint(Title, Path, Latitude, Longitude);
}
The above code calls the addPinPoint function for every result in the XML island. This function adds a pinpoint to the Google map in the standard way:
function addPinPoint(Title, Path, Latitude, Longitude){
//Set up the icon
var myIcon = new GIcon(G_DEFAULT_ICON);
//Select the right icon
myIcon.image = "mapimages/myPinPointIcon.png";
myIcon.iconSize = new GSize(12, 30);
myIcon.shadow = "mapimages/myPinPointShadow.png";
myIcon.shadowSize = new GSize(23, 30);
myIcon.iconAnchor = new GPoint(6, 30);
markerOptions = { icon:myIcon };
//Formulate the HTML that goes into the caption window
var infoHtml = "<a href="http://www.blogger.com/">" + Title + "</a>";
//Add the marker
var point = new GLatLng(Latitude, Longitude, false);
var marker = new GMarker(point, markerOptions);
//Add an info window
GEvent.addListener(marker, "click", function () {
marker.openInfoWindowHtml(infoHtml);
});
//Add the overlay
map.addOverlay(marker);
}
The techniques I've outlined illustrate that Google Maps can be easily integrated into a SharePoint site and become a valuable addition to SharePoint functionality. However, before you develop such a solution, you must investigate licensing restrictions fully. This section describes the main issues and alternative map providers.
Google Maps is free for use on Internet-facing, non-subscription sites. If you use SharePoint to host your organisation's main Web site, or more targeted sites for departments, subsidiaries, or products, you can use Google Maps for no charge on pages with no access restrictions.
Google Maps does not allow free use on any password-protected page or on intranet sites. In such cases you can still use the technology, but you must take out a Google Maps for Enterprise license. Google Maps for Enterprise is licensed on a per-concurrent-user basis.
Microsoft's Virtual Earth service competes directly with Google Maps and works in a similar way. There is an approximately equivalent set of features and maps are drawn and populated by using client-side code just like Google Maps. To use Virtual Earth with SharePoint your general approach can be identical to that described above although you must rewrite the JavaScript code to use the Virtual Earth classes and methods. On the intranet, Virtual Earth is licensed on the basis of total users.
Yahoo! also have a mapping service. This can be used free on both Internet and intranet sites so you should consider it carefully for SharePoint enterprise content management or knowledge management solutions restricted to your internal users. Yahoo! Maps cannot be used in applications for which you charge users. There are also other alternatives, such as PushPin.
Google Maps represents the easiest way to display geographical data on Web sites, including those hosted in Microsoft SharePoint products and technologies. If you carefully plan how to integrate the server-side SharePoint technology with the client-side Google Maps code, you can easily integrate the two and generate a rich user experience for geographical data.
Windows SharePoint Services Developer Center
SharePoint Server Developer Center
Google Maps API Documentation
The front cover of the April 2009 issue of Night Magazine is dedicated to All Star Lanes, Brick Lane, which includes a major integrated installation of JBL Control Contractor, JBL AE, BSS Soundweb and Crown XTi amplifiers.
A combination of JBL Control 30, Control 29 and AE-Series is used throughout the 3 primary zone, 11 sub-zone system. All are powered by Crown XTi Series amplifiers. The network is controlled by BSS Soundweb London.
The ample power of the Soundweb DSP provides dynamic audio control and routing, "Aside from maintaining even sound dispersion, critical to the operation is an intuitive relay matrix, in which any source can be routed to any destination."
Particularly pleasing in the article is SDG's David Graham comment, "The back-up we received from Harman Pro's new distributors, Sound Technology, was exceptional."
More information:
http://www.soundtech.co.uk/installprojects
The latest edition of Audio Media magazine features round-ups of the latest offerings in the live and studio microphone sectors.
The AKG C214 is picked out in the studio category , whist the just-shipping limited edition all-chrome D7 premium dynamic is their choice in the live category.
More information:
http://www.soundtech.co.uk/akg/news/d7limited
http://www.soundtech.co.uk/akg/news/audiomediac214
"The features of this unit are extensive. There's a lot going on ... though it is refreshingly easy to navigate".
Having already seen three great Digitech RP1000 reviews in as many months, May is no exception. This time it is Guitar Buyer Magazine's turn to cast its eye over Digitech's flagship multi-effects processor. The magazines 'Gold Stars' are awarded for its 'Large range of good-quality sounds', 'tough construction' and the fact that it's 'easy to use'.
More information:
http://www.soundtech.co.uk/digitech/news/digitech-rp1000-guitar-buyer-review
Reason Premium Edition has been given a 'Recommended' award by IT Reviews, the UK website for independent reviews of hardware, software and games by professional journalists (established 1998, with a readership of over 700,000 visitors each month).
"If you've ever wanted to be a dedicated digital composer without having to spend a fortune on instruments and recording studios, then this deluxe version of Reason 4 has to be one of the finest examples of music recording software on the market."
More information:
http://www.soundtech.co.uk/propellerhead/reasonpremiumedition
‘Great sounding headphones that are good for far more than dance music’
The latest issue of T3 selects the AKG K 181 DJ headphones to join its ‘Headphones Top Five’. This is a great result for the – arguably – specialist cans, which appear in T3’s ‘Best of Everything’ guide.
T3 is Future Publishing’s flagship consumer electronics brand both on and offline, attracting hundreds of thousands of gadget fans every month to its magazine and website. T3 recently delivered its highest ever circulation.
Continuing the stream of fantastic reviews and praise from the press, the Larrivee L-10 is reviewed in the new issue of Guitar & Bass Magazine.
"The L-10 sounds pretty darn fab. We're always cautious of makers' own claims, but when Jean Larrivee says 'the bass is solid and tight, with great projection; midrange is strong and highs are crystal clear', he's not overstating his case. Our example really does display those traits, along with a supple, generous dynamics, and he could have added that the low end, apart from it's firmness and power, has a richly-toned warmth that resonates though the whole instrument, but not at the expense of cross-string balance and definition, which remain excellent'.
More information:
http://www.soundtech.co.uk/larivee/larrivee-l-10-review-guitar-and-bass-magazine
Not only can the Nord Wave use samples, FM synthesis and digital waveforms to complement its already fat and juicy analog style waveforms, it is designed around a very powerful synthesizer architecture that provides you with loads of modulation and sound sculpting capabilities.
We hand picked some of the planet's best synthesizer sound programmers and asked them to create their individual - and ultimate - Nord Wave sound banks. And we sure got some awesome sounds! The results were so amazing that instead of making a couple of best-of banks, we decided that all of these great sounds should be published.
The mission was to bring out the big, bad synthesizer in the Nord Wave, and to exploit its unique sonic character to the limit. The banks reflect the musical heritage and sound preferences of each and every programmer with plenty of personality.
The UK entry was a special project with Future Music magazine.
Further descriptions, sound clips and the actual Banks themselves are available in the Nord Wave Program Library area:
http://www.nordkeyboards.com/main.asp?tm=Products&clpm=Nord_Wave&clnwm=Program_Library
The June issue of the UK's No.1 dedicated Acoustic Guitar Magazine, 'Acoustic', includes a round up of the industry's best DI boxes.
The Active BSS AR-133 and dbx dB12 are featured, as is the Passive dbx dB10. Most importantly all three are rated as 'Superb' with no 'Cons' whatsoever.
The dbx dB10 and db12 are available now at £92 and £126 RRP respectively. The BSS AR-133 is also available now at £189 RRP.
To read the full round up, pick up the June Issue (Issue 30) of Acoustic Magazine.
When RaceTech audio systems engineer Robin Dibble undertook the sound system fit-out in the old Queens Stand at the famous Epsom Downs Racecourse eight years ago, he used BSS Audio’s then state-of-the-art Soundweb 9088 ‘Green’ boxes to construct his network.
But the world of digital audio networking moves even faster than the pack on Derby Day, and when Jockey Club Racecourses recently commissioned a £38m three-year development project, including the construction of the new 11,000 capacity Duchess Grandstand, he knew that with today’s technology he could adopt vastly more progressive system architecture.
Several generations on, Robin Dibble was able to specify five BSS Audio Soundweb BLU-160 DSPs — placed on the new fault-tolerant BLU-link 256-channel ring. Based on Gigabit Ethernet cabling, The BLU-link equipped Soundweb units are situated in a dedicated air-conditioned control room that houses four 48U racks.
In summary, he says, “The BLU’s have made a huge difference to the efficiency and have enabled us to deliver a very user-friendly system. BLU-Link offers greater digital capacity and all the processing simply floats in the middle of the BLU-link network.
“Fifteen years ago this would have required huge amounts of cable and external processors, patch leads and so on. Now everything is contained within the Soundweb Processors and with a great deal more flexibility.”
More information:
http://www.bssaudio.com/soundweb_london.php
*** Sound Technology offers free monthly BSS Soundweb training for both Soundweb Original (Green) and Soundweb London (BLU). For details please visit www.soundtech.co.uk/bss/training ***
When Midge Ure, Warren Cann, Chris Cross and Billy Currie decided to reform Ultravox for a reunion Return to Eden tour this spring, it was the first time the classic line up of the band had performed together since Live Aid in 1985.
They would be performing exclusively back catalogue material converting the classical analogue early ‘80s synth-driven New Romantics sound into digital and it seemed a natural choice for them to use Midge's long-serving FOH engineer Berenice Hardman and production manager/monitor man, Dave Claxton
Soundcraft Vi6 with AdLib's Hassan Essiahi
But Claxton and Hardman admit that in ‘switching codes’ to digital they only opted for the Soundcraft Vi6 for FOH after much evaluation, sourcing their requirements — including a JBL VerTec line array system — from Adlib Audio, with whom they have enjoyed a long relationship.
"I've used most of the digital boards on the market and never been overly happy with any of them. It always seems to be a compromise between footprint and usability, with the former winning the battle."
"We’ve known [Adlib Audio’ MD] Andy Dockerty since the late 80's and we went to him because he had the Soundcraft Vi6 and we knew we would get the correct standard of service." says Berenice. "It's intuitive and feels like a desk — I knew straight away that I had made the right choice. A very wise man once told me that the best engineers had nothing between their ears and their fingertips. I don't want to have to THINK about how to achieve something, it should just happen"
More information:
http://www.soundtech.co.uk/soundcraft/news/soundcraft-vi6-ultravox
The latest incarnation of the Nord Electro is reviewed in this month's Keyboard Player magazine.
The Electro 3 features a new organ section, a new piano section, new effects and a new exciting feature that allows the Electro 3 to use any samples from the Nord Sample library. The Electro 3 now uses the virtual modeling of Nord's C1 dedicated organ.
"Starting with the Electro 3's pianos, its electric pianos are one of the real high points and the opening Fender Rhodes sound was one I kept returning to, time after time. Even without effects this is a real killer sound".
"The tonewheel organ was a vital feature of the first Electro and this evolution of that sound is indeed a fine re-creation. I felt it had the edge over the C1 Combo Organ with an earthier feel and 'grimy' sound beloved by many player; it was a pleasure to work with".
"...if the Electro 3 were a poker player, I'd fold my cards immediately".
More information:
http://www.soundtech.co.uk/nord/news/nord-electro-3-review-keyboard-player
http://www.soundtech.co.uk/nord/nordelectro3synth73
http://www.soundtech.co.uk/nord/nordelectro3synth61
Saturday 9th May 2009 saw Propellerhead host simultaneous Producer's Conferences across the world. The UK Conference, organised by UK distributor Sound Technology at the Academy of Contemporary Music in Guildford, has been hailed as a great success. A near capacity crowd of 170 saw a series of excellent and varied presentations, including a DJ set from A Guy Called Gerald, plus a secret preview of Propellerhead's Record software announced today.
Sound Technology would like to thank everyone who attended the event, we hope it was a valuable day for you. We'd also like to thank our fantastic guest presenters and all the staff of the Academy of Contemporary Music and the Electric Theatre for helping to make the event a success.
If you'd like to be informed of any future events please sign-up for our monthly newsletter:
http://www.soundtech.co.uk/enewsletters
Gary Bromham opened the conference with a great session on mixing on mastering - from basic mix tips and tricks, to practical use of EQ, dynamics and mastering effects.
Michael Tognarelli of London-based production outfit Blu Mar Ten stepped up with a fascinating look at sampling techniques within Reason, particularly using the NNXT sampler device. Michael gave an excellent insight into Blu Mar Ten's sample layering techniques - both an art and a science!
Alex Blanco delivered a brilliant ReCycle demo - presenting the flexible and creative benefits of its technology for today's productions.
As the final artist presentation, Reason's flexibility was demonstrated once again as the audience were treated to an amazing DJ set from A Guy Called Gerald with live on-the-fly editing and mixing. During the Q&A session Gerald answered questions regarding his use of Reason and his switch from racks of analogue gear to working almost exclusively in Reason, both for production and live work.
And finally, the event saw a secret preview of Propellerhead's new Record audio recording software by Propellerhead's VP of Marketing, Tim Self. Not only did the attendees get an exclusive advance look, but also received beta-test codes for immediate access to the software.
Audience reactions to the Record 'reveal':
Propellerhead Software today unveiled Record, the recording software that puts the musician in focus. Record combines effortless recording and a stunning software mixer console with a limitless rack of audio processing gear that builds itself or can be infinitely customized.
“We figured it was time that someone took a fresh look at recording from a musician’s perspective. Not needing to bolt music features onto an ageing audio application, we truly started from scratch with full knowledge of today’s computer architectures and capabilities. Record is the result,” says Ernst Nathorst-Böös, CEO. “In short we wanted to do what we’ve always done—help people make more and better music.”
Recording done right
Built for independent minded musicians, Record has the feel of a million dollar recording studio with the streamlined simplicity of a tape deck. For guitar players, the built-in virtual Pod from Line 6® brings a wide range of top quality guitar amps and cabinets. Record’s software mixer’s sound is faithfully modeled* after the renowned SSL® 9000K hardware with flexible routing, full dynamics, EQ, advanced effects handling and complete automation. With its state-of-the-art dynamic multicore audio handling, Record uses a computer's processing power to its fullest. Users will never have worry about track counts, latency issues or adding that extra reverb or effect. With an easy to grasp interface, it won't get in the way of ideas and will inspire users to make more music.
Pricing & availability
Record begins beta testing today and will be available for purchase worldwide on September 9, 2009. Record will be available through all Propellerhead dealers worldwide at an expected retail price of £249 inc VAT.
Propellerhead will also offer special bundles and pricing to its users through its retailers.
Learn more about Record
To learn more about Record and to see video on its use, please visit
www.record-you.com
Please click on images below for high-resolution versions:
About Propellerhead Software
Propellerhead Software is a privately owned company based in Stockholm, Sweden. Formed in 1994, Propellerhead has created some of the world's most innovative music software and technology standards. Musicians, producers and the media have praised the products Reason, ReCycle and ReBirth for being inspiring, great sounding, easy to use and superior quality. Technologies such as ReWire and the REX file format are now de-facto industry standards, implemented in all major music software. Today, Reason is used all over the world by professionals and enthusiasts for all kinds of music making.
*All product names used are trademarks of their respective owners, and in no way constitute an association or affiliation with Propellerhead Software. The SSL and/or Solid State Logic trademarks are solely used to identify the products whose sound was studied during Propellerhead Software’s sound modeling development. The trademarks SSL and Solid State Logic are owned by Red Lion 49 Limited.