Project Nimbus: One Marina Boulevard Map Application by The MIC Interns

Project Nimbus is an effort to get more data sets online and accessible for innovators to build on. With the available data sets we have, the Project Nimbus team wanted to create an application which not only uses data just from one provider but mashing up different data sets together to make handy applications. We came out with this application to help you locate us better! Enter the location you are coming from and the application will route you straight to us showing you the traffic images along the route. What’s more? When you do visit us, it gives you an overview of the restaurants around Microsoft Innovative Centre Singapore to satisfy your hunger.

How was the application implemented?

1. Get an application key – Email projectnimbus@live.com.sg to get your key.

2. Add in the AccountKey & UniqueUserID into the request header.

[cc lang='csharp' ]private static void ModifyRequest(object sender, SendingRequestEventArgs e)
{
   e.RequestHeaders["accountkey"] = "Your AccountKey";
   e.RequestHeaders["UniqueUserID"] = Guid.NewGuid().ToString();
}[/cc]

3. Download the proxy class of the dataset you have chosen.

4. Add references to the library.

5. Retrieving data from Project Nimbus.

[cc lang='csharp' ]List returnedImages = new List();

foreach (var pl in (query.EndExecute(result)))
{
    //Get image data based on query
    returnedImages.Add(pl);
}

//Get attributes of returned objects
var trafficQuery = from l in returnedImages select new GenericObjects
{
   CameraImage = new LTAModel.CameraImage
   {
      CameraID = l.CameraID,
      CameraImageID = l.CameraImageID,
      CreateDate = l.CreateDate,
      Distance = l.Distance,
      ImageURL = l.ImageURL,
      Latitude = l.Latitude,
      Longitude = l.Longitude,
      Summary = l.Summary
   }
};

foreach (var t in trafficQuery) { Items.Add(t); }

foreach (CameraImage oCameraImage in returnedImages)
{
    //Get camera image
    UIElement oUIElement = CreateCameraImageUIElement(oCameraImage.CameraImageID, oCameraImage.ImageURL);

    //Get location(lat,long) of image
    Location location = GetLocation(oCameraImage.Latitude.ToString(),
    oCameraImage.Longitude.ToString());

    //Get position of origin for image
    PositionOrigin position = GetPositionOrigin();

    //Add image onto cameralayer using location & position of origin
    cameralayer.AddChild(oUIElement, location, position);
    MapLayer.SetPositionOffset(oUIElement, new Point(0, 0));
}[/cc]

6. For the implementation of Bing Map into the application, we added reference to the Bing Map library. The Bing Maps Silverlight Control combines the power of Silverlight and Bing Maps to create an immersive mapping experience. You can find the Bing Maps Silverlight Control SDK here.

Try out our app below!

[silverlight: http://innovativesingapore.com/scripts/BingMapApplicationforMIC.xap, 630, 400]

Related Posts

2 Responses to “Project Nimbus: One Marina Boulevard Map Application”

  1. Guest

    hmmm is TCC missing from level 1M or is it just me?! :P

    Reply
  2. Jonathan Wong

    Hmm… Maybe the Project Nimbus data for restaurants is not the full set of data from HungryGoWhere but only a subset at the moment?

    Reply

Leave a Reply