I've been working with Virtual Earth for a few Months now. Prior to that Google Maps was my weapon of choice as it was a more complete & robust system. But for me, MS is starting to inch ahead in terms of API completeness, which just feels 'right'.
However, it's not there yet.
One of the concepts within VE is that you get the VEShapeLayer class (they're called GTileLayerOverlay in GMaps). Layers are extremely useful things that appear within all concepts of screen elements. I first got to understand them 10+ years ago when I was kicking around in Photoshop 5, and ever since have been able to easily create compositions with the assistance of the all-mighty z-index. The downside as I see it to the VEShapeLayer is that it has no concept of assigning or retrieving layers based on their ID - only based on their index.
This is fine for basic applications of layers, but recently I've been working with pulling aggregated and drilldown data from SSAS, and not having support for ID's or child/parent relationships between layers is a bit of a hassle.
The saving grace is, of course, that everything's written in Javascript; so if you don't like something then you can change it. And change it I did. The new implementation now defines a "Map" as:
Map.prototype.GetLayer = function(LayerID)
{
var layer = new VEShapeLayer();
this.VEMap.AddShapeLayer(layer);
/* IP specific stuff */
this.CurrentLayer = layer;
this.CurrentLayer.ParentLayer = null;
return layer;
}
Map.prototype.NewShapeLayer = function() { }
Map.prototype.DrillDown = function(ParentID) { /* implementation */ }
Map.prototype.DrillUp = function(ParentID) { /* implementation */ }
So essentially that's the direction I'm taking with VEShapeLayer for the time being. Having a link between a layer and it's parent allows me to map aggregated data I get back using DrillDown's and DrillUp's (ie: Rollups) in a way which geographically represents the data I feed into it.
It works quite well, but I'm guessing it's only a matter of time before the MS/Dundas people spit out a certified control that does exactly that, though I won't be holding my breath.
posted @ Tuesday, December 11, 2007 7:42 AM