What's missing in the VE5 SDK Docs?

So far here are some useful methods that I've found have not been documented in the SDK yet:

1) VEShape.Show() - Shows the shape
2) VEShape.Hide() - Hides the shape
3) VEMap.GetShapeLayerByIndex(index) - where index is an integer, you can now loops through all your shape layers to find out exactly what is stuck on the map. If you directly add shapes to the map without using layers, it is added to the first layer (index = 0)

I suspect these are supported methods that somehow slipped out of the documentation release as you notice that 1) and 2) are used under the "show/hide a shape" panel.

Also if your probably wondering how the "show/hide a shape" and "delete a shape" panel tracks its shapes, I looked behind at the javascript and its been using 3) to loop through all its layers and grab the shapes that are behind them.

Hope that helps everyone,

[910 byte] By [DerekChan] at [2008-1-4]
# 1
Thanks, Derek, for putting the list together, and our apologies for the inadvertent omissions. By the time we realized, it was too late to get them in for this release. We'll be putting out a revision to the docs in the next few weeks, and we'll be sure to get this fixed by then. In the meantime, the three methods that Derek mentioned are all supported, so don't hesitate to use them in your apps.

Hope that helps!

-Andy

AndyMcGovern-MSFT at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 2

Andy,

What about VEShape, the documentation does not tell anything about these two properties?

  • ShowDetailOnMouseOver
  • OnMouseOverCallback

Is there a way you can provide some samples for this, apparently the code which I have does not work and I still get the Detail bubble when I hover over the icon.

All I want to do is when the user hovers their mouse over the icon I do a ajax call and get the content for that icon on demand.

Thanks,

CSUN

CSUNRAE at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 3
Odd, there's an undocumented property called OnMouseOverCallback for shapes that is currently set to null. If I try to invoke a simple alert call nothing happens on my mouseover, but it fires when the map loads.
DerekChan at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 4
For those rolling tile servers, the GetTilePath method still exists, just hasn't been documented yet.

Usage:
tileSourceSpec.GetTilePath = function;

Thread that discusses this:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1548219&SiteID=1

DerekChan at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 5

hi all

i add a shape name is "MyShape" ;

and add a shape on it

Myshape.AddShape(shape);

var shapeID = shape.GetID();

and add a event onmapclick

if i click on shape then i catch the eventID that is diffreant from shape id that is

function onclickFunction(results)

if(shapeID == results.eventID)

its return false can any one explain me y ite false and how can i access that shape on shape click.

Regards

Nisheeth Tak

Niseeth at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 6
Niseeth,
You have to use VEMap.GetShapeByID. See thead about this: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1545963&SiteID=1

Derek,
here's my list: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1584670&SiteID=1

Jane

citygirl at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 7

Thank you very much

citygirl .....

i want to know one more thing..

is we add our own id into the shape ?

here if i give the id for the shape and get that shape by id then the shape is not returns can u give me the resion for that

Thanks

Nisheeth Tak

Niseeth at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 8
Niseeth - in VE 5, you can't assign an ID to the shape - VE assigns IDs to shapes automatically.

You can get the ID it assigned to a shape by calling VEShape.GetID() after creating it. And then compare it to map.GetShapeByID(e.elementID).GetID() that you get on a mouse event.

citygirl at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 9
When the feed is finished loading, the function VEMap.ImportShapeLayerData(shapeSource, callback, setBestView) calls callback with a single argument. The type of this argument isn't documented anywhere (except that it contains a length attribute), but it appears to be extremely rich, with 43 public methods:

AddAnnotation
AddEntityAnnotation
AddShape
ClearAnnotations
DeleteAllShapes
DeleteShape
GetBoundingBox
GetBoundingRectangle
GetChangeState
GetChangeType
GetDescription
GetId
GetMaxZoomLevel
GetMinZoomLevel
GetMsnId
GetName
GetShapeByID
GetShapeByIndex
GetShapeCount
GetTitle
GetType
GetVisibility
Hide
IsDuplicate
ReOrder
ResetOrder
RetrieveAnnotationById
SetBoundingBox
SetChangeState
SetChangeType
SetDescription
SetId
SetMaxZoomLevel
SetMinZoomLevel
SetMsnId
SetName
SetTitle
SetType
SetVisibility
Show
SwapShapes
UpdateBoundingBox
UpdateEntityAnnotation

But an MSDN search for "AddEntityAnnotation" returns no results.

Physicles at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 10
VEMap.AddShapeLayer(VEShape) isn't documented as a method of the VEMap class but many of the samples use it.
ReidWatkins at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 11
VEMap.AddShapeLayer(VEShape) documentation can be found here:

http://msdn2.microsoft.com/en-us/library/bb412479.aspx

DerekChan at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 12
Physicles,

All those methods you mentioned are used by the API (but their obfuscated, and bound to change with each new release of VE) but the only supported ones by Microsoft are the ones that are revealed through the Interactive SDK at:

http://dev.live.com/virtualearth/sdk/

Infact, you will be surprised to notice hundreds and hundreds of undocumented methods just by looking at the "window" javascript keyword.

DerekChan at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...
# 14
ShowDetailOnMouseOver doesn't seem to work for me when I set it to false. The best way to avoid having a the "detail" or info box pop up is to do a VEShapes.Notes = null. This prevents the info box from popping up.
beerthirty7 at 2007-10-3 > top of Msdn Tech,Windows Live Developer Forums,Virtual Earth: Map Control Development...

Windows Live Developer Forums

Site Classified