Shape is not initialized (V5)

Hello,
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"
name->"err_notinitialized"
source->"VEShape:new VEShape"

What does it mean?
Thanks
Marco

[399 byte] By [mabello81Urbania] at [2008-1-4]
# 1
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.
Marco

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

Windows Live Developer Forums

Site Classified