|
News -
Latest News
|
|
Written by Richard Marsden
|
|
Wednesday, 08 April 2009 08:26 |
|
Chris Pietschmann of Simplovation LLC has just released his open source VEToolkit at Codeplex:
The Virtual Earth Toolkit is a set of Controls/Tools that Extend Virtual Earth with functionality not implemented within the Virtual Earth JavaScript API itself, and Controls/Tools to make it easier to implement mapping in various frameworks like ASP.NET MVC. Work has just recently begun on a reusable ASP.NET MVC Component to make it easier to place MS Virtual Earth maps on a Page. You can find the code within the latest Source Code Change Set.
JavaScript Features - Controls/Extenders/Methods
The JavaScript Controls/Tools in the VEToolkit library are completely self contained, and don't require the use of any other JavaScript library to use other than Virtual Earth 6.2 (current version). This allows you to use this toolkit along-side any other JavaScript library (jQuery, ASP.NET AJAX, etc.); plus you can make use of it with any server-side framework of you choice (ASP.NET, ASP.NET MVC, PHP, etc.).
- Controls
- VEToolkit.ShapeListControl
- A simple control that displays a list of Shapes that are currently plotted on the VEMap.
- Extenders
- VEToolkit.ContextMenuExtender
- This extends the VEMap with Context Menu (right click menu) support.
- VEToolkit.DragShapeExtender
- This extends the VEMap to allow the user to reposition Shapes by simply clicking and dragging them around the map. It also implements functionality that allows you (the programmer) to determine at runtime which Shapes are draggable.
- VEToolkit.MiniMapExtender
- This extends the VEMap with better MiniMap support; allowing the MiniMap to easily be positioned and aligned into any side/corner of the VEMap display.
- Helper Methods
- VEToolkit.LoadAPI
- This methods allows you to easily load the Virtual Earth JavaScript API On-Demand at runtime.
- VEToolkit.Drawing.DrawCircle
- This method returns a collection of VELatLong objects that represent a Circle with a given radius surrounding a specific VELatLong center point.
- VEToolkit.Math.CalculateBearing
- This method calculates the bearing (in degrees) between two VELatLong coordinates. This can be used to calculate the direction an object is pointing or traveling.
- VEToolkit.Math.CalculateInverseCoordinate
- This method calculates the Inverse VELatLong coordinate for a given VELatLong coordinate. (Or opposite position on the globe)
- VEToolkit.Math.CalculateMidPoint
- This method calculates the Mid Point (Center Point) in between two VELatLong coordinates.
- VEToolkit.Math.GetPolygonCentroid
- This method calculates the approximate Centroid (Center Point) of a Polygon.
- VEToolkit.Math.IsInPolygon
- This method calculates whether a given VELatLong coordinate exists within a given Polygon made up of an Array/collection of VELatLong coordinates.
JavaScript Intellisense
The JavaScript (.js) source code files for this project also include full Visual Studio 2008 Intellisense support.
JavaScript File Structure
The file structure of the JavaScript (.js) files is as follows:
- VEToolkit.Core.js - This file contains the "core" methods of the toolkit. This includes any basic Math and Drawing functions/methods.
- VEToolkit.{...}Extender.js - Each Extender is contained within it's own .js file that ends with "Extender.js". Extenders are objects that "extend" the VEMap object with a set of functionality that isn't already built into the VE API. The functionality added may not always display any content to the user.
- VEToolkit.{...}Control.js - Each Control is contained within it's own .js file that ends with "Control.js". Controls are objects that display content to the user within the page, and connect to the Map to provide that content within the context of the Map being displayed.
Further information and downloads can be found at: http://www.codeplex.com/VEToolkit
|