VEMap Shape layers

Jan 27, 2010 at 8:38 PM

Hello everyone,

I an using the InfoStrat control for a while, this a real neat work, thanks guys :)

I have actually a bad issue: I didn't find anything on any of the GlobeControl managed code to be able to hide/show a layer when shapes are added; is there another way to solve this appart from deleting / repopulating the layer ?

Thanks all !

Coordinator
Jan 28, 2010 at 11:46 PM

That's really a Bing Maps 3D API question. Unfortunately I don't see any methods for controlling layer visibility either.  What you could try is keeping references to the geometry you create. When you want to hide a layer, loop through all the geometry you added to a particular layer and change the style properties to change the opacity to hide or show it.

Jan 29, 2010 at 1:23 PM

Actually I have been trying to change the alpha values on colors for shapes, but actually this is only updating when zooming on the map...

When removing shapes/layers, this is updating correctly, and I checked on Reflector for the RemoveGeometry method:

        layer.RemoveGeometry(geometry);
        this.QueueWork(WorkType.Remove, geometry);
        this.count--;

this is showing that an update is sent to the control to work on items to have the current render updated without having to zoom in/out.

So the only soultion I see is to keep points for a given shape aside, and then delete/recreate it on the map to have a correct render.

Cheers, Ben.