Welcome to MSDN Blogs Sign in | Join | Help

BillboardPlugin.cs

using System;

using System.Collections.Generic;

using System.Drawing;

using System.Text;

 

using Microsoft.MapPoint.PlugIns;

using Microsoft.MapPoint.Rendering3D;

using Microsoft.MapPoint.Rendering3D.Cameras;

 

namespace VirtualEarth3DSamplePlugins.Billboard

{

    public class BillboardPlugin : PlugIn

    {

        #region Constructor

        public BillboardPlugin(Host host)

            : base(host)

        {

 

        }

        #endregion

        #region Overrides

        public override void Activate(object activationObject)

        {

            base.Activate(activationObject);

 

            LatLonAlt position = LatLonAlt.CreateUsingDegrees(46.849743288383046, -121.7498016357422, 5000);

 

            // Add the actor at the specified position

            this.Host.Actors.Add(new BillboardActor(position));

 

            this.Host.Notifications.Display("Flying to view billboard");

            // Now move the camera to view the newly placed billboard

            this.Host.Navigation.FlyTo(position.LatitudeDegrees, position.LongitudeDegrees, position.Altitude, 0, 0, 8000);

        }

 

        public override string Name

        {

            get

            {

                return "BillboardPlugin";

            }

        }

        #endregion

    }

}

Published Wednesday, November 14, 2007 11:20 AM by Kristoffer

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
required 
(required) 
 
Page view tracker