I found a strange problem in V5 when I try to create a Shape.

var shape = new VEShape(VEShapeType.Pushpin, point);

Sometimes it throws an exception:

message->"Shape is not initialized"
source->"VEShape:new VEShape"

What does it mean

Re: Shape is not initialized (V5)


Ok, I found and resolve the problem, I debug a little bit...

Try this:

var lat = "44.567";
var lng = "11.456";
var point = new VELatLong(lat,lng);

If I create VELatLong and pass in the constructor string and not double, no exception is throw;
But when I create the shape using this point

var shape = new VEShape(VEShapeType.Pushpin, point);

the exception is thrown.

I think it could be better if an exception is thrown in the statement in which I create the VELatLong object with string and not double; in version 3 of Virtual Earth no exception was thrown I think.