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,
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
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
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.
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
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 - 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.
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.
VEMap.AddShapeLayer(VEShape) isn't documented as a method of the VEMap class but many of the samples use it.
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.
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.