DonG2


It appears that the v5 directory (see below) of mapcontrol on the Virtual Earth server is missing! Thus, the script (mapcontrol.js) that the VE block tries to load is missing ... thus the VE block does not work, generating a "VEMap is undefined" error.

From the top of the VE block code...

if (!environment.designTime)
document.write("<script type='text/javascript' src='http://dev.virtualearth.net/mapcontrol/v5/mapcontrol.js'></"+"script>");

Users on the VE forum have reported the same problem.

Takaaki (thank you!) has been kind enough to duplicate the Virtual Earth block, changing the "v5" directory reference to "v4", which still exists on the VE server, here:

http://www.popfly.ms/search q=VirtualEarth_TempV4

We can use this block for testing purposes until the normal VE block comes back to life.





Re: Virtual Earth block is NOT working

DonG2


Popfly Team:

It looks like a line of code in the Virtual Earth block needs to be modified.

The following is from the Virtual Earth Forum Moderator (post: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=2268482&SiteID=1 ) ...

================================================

It has been found that the many Virtual Earth sites using V5 are now in error with "VEMAP is undefined"

The issue is the URL to access the VE API javascript changed from V4 to V5.

The correct way to reference the javascript is:

Code Block
<script type="text/javascript" src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx v=5"></script>

This method will not currently work:

http://dev.virtualearth.net/mapcontrol/v5/mapcontrol.js

I have sent emails to MSFT and am waiting for an answer.

John.





Re: Virtual Earth block is NOT working

DonG2

However, when I swap the old VE block for an updated one, the custom code Andy provided me for my Earth Explorer mashup results in "ERROR: 'virtualEarth' is undefined" <sigh>. Here is my Earth Explorer mashup: http://www.popfly.ms/users/DonG/EarthExplorer-Mashup.project .







Re: Virtual Earth block is NOT working

AndyS

This should now be fixed the VE team have reinstated the file at:

http://dev.virtualearth.net/mapcontrol/v5/mapcontrol.js

We'll be updating the VE block shortly :-).





Re: Virtual Earth block is NOT working

DonG2

Thanks Andy Smile.






Re: Virtual Earth block is NOT working

DonG2

Why would changing the call location in the VE block break custom code (advanced view) in a mashup, as described above A few weeks ago, you provided me with the following code for the VE block in my Earth Explorer mashup . . .

________________________________________________________

pendingCalls["Virtual Earth"] = 1;

if (data["GeoNames Worldwide"].latitude == "")
{
alert("The Place Name you entered was not found in the database.\n\nPlease enter another Place Name.");
userInput.value1 = "";
}

else
{
var result = virtualEarth.setMapView(data["GeoNames Worldwide"].latitude, data["GeoNames Worldwide"].longitude, data["User Input"].value2, "", "", "");
pendingCalls["Virtual Earth"]--;

if (pendingCalls["Virtual Earth"] == 0) environment.finish();
}

________________________________________________________

When I rip the VE block, change only the mapcontrol link code, save the block as VirtualEarth-NEW, replace the VE block in my Earth Explorer mashup with this new one, add the advanced mode code, and run it ... I get the "virtualEarth is undefined" error.

I've tried changing some of the values in the above code but still get the same error. What do I need to change

Thank you,