This Forum Has Moved! Visit the New Forums Platform Today!
MSDN Forums: Virtual Earth - Microsoft has created a new forums platform (MSDN, TechNet, Expression, and Microsoft) with increased performance, stability, and an improved user experience. The forum you previously accessed has been moved to this new platform. To help you with this move, we have created a Sandbox forum, where you can create threads and try out functionality, and a suggestions forum where you can give us your feedback. Please take some time to go to these new forums today and let us know what you think:
Thank you for your continued support!
View article..
Help with Virtual Earth Web Service please.
MSDN Forums: Virtual Earth -
Hi Folks,
I've got a paid MapPoint Web Service account. I've just received the email about the new WS upgrade - awesome.
One of things that i love is the: one-box search functionality. This is something that i've been dying to get.
So, I've jumped online and failed to figure out what i need to do. PHAIL. :( The docs talk about this new Token thingy and i think i've found some hints to the do what i want.. but nothing works.
So .. has anyone got any links/tutorials to setting up a new VS2008 project, connect to the web service (eg. Add Web Reference) and then how to get a friggin token (yes, i have a legit account and can log into my Virtual Earth Plaform Customer Service webpage and get my AccountID (and i know my password)) and how i can search for an address using this new 'one box search functionality'.. which i'm __assuming__ means i can give a single property the search address and i get back 0<->many results.
When i try to add web references for what i think is the token url ( https://staging.common.virtualearth.net/find-30/common.asmx) i get lots of errors.
When i try and an a web reference to the new WS (http://staging.dev.virtualearth.net/webservices/v1/geocodeservice/geocodeservice.svc) that works fine ... but the example says the that i need to create an instance of a GeocodeServiceClient class .. which does exist?!
what the :(
So .. i'd love some help and thoughts please folks. I found implimenting the earlier (older) version much easier and quicker .. even though it didn't do what we wanted .. while it sounds like this version does do what we want .. but it's lacking in solid tutorial steps, etc.
please help!
*beg SoulSolutions :) *
View article..
Forum Lockdown Notice
MSDN Forums: Virtual Earth - We are currently migrating this forum. Therefore we have disabled posting new threads and messages. Please be patient with us during this process. When migration is complete, this url will redirect to its new location.
View article..
VE errorin Good Code
MSDN Forums: Virtual Earth -
Hi,
I have recently started to experience problems with VE mapping, previously tried and tested code is throwing exceptions such as:
<script type="text/javascript" src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6">script>
<script type="text/javascript">
var map = null;
var selStyle = VEMapStyle.Road; //error here is ‘}’ expected
This error also occurs whith the VE SDK samples! I have found an article that suggests that this is caused by the speed at which the references to VE are returned to the page. How do I overcome this issue?
Regards,
JoeBo
View article..
Plot and save points for a walking trail
MSDN Forums: Virtual Earth -
Hey guys,
I apologize in advance for the lack of knowledge here... but I'm a complete noob to VE and I've been searching for hours for some code samples to get me in the right direction. What I'm trying to do is create a map where a user can plot points to create a walking trail and save the trail info to a database. (similar to this site http://mapmyfitness.ninemsn.com.au/default.asp) Then members who log in could view these maps. Can anyone please provide some code samples or point me in the right direction? I can handle the server side/database code, but I can't seem to get started on what seems to be an easy task using VE.
Thanks for your time and I'd REALLY appreciate any help at all!
BTW the site is using classic asp.
View article..
VEShapeLayer always returns 0 after ImportShapeLayerData
MSDN Forums: Virtual Earth -
I'm strill trying to load my GPX file. Loading directly in maps.live.com via Collections / Open your Collections / Import works fine, so I assume that the GPS file is OK.
Code Snippet
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html>
<head>
<title>Routetitle>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script type="text/javascript" src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2"> script>
<script type="text/javascript">
var map = null;
function GetMap()
{
map =
new VEMap('myMap');
map.LoadMap();
map.EnableShapeDisplayThreshold(
false);
var layer = new VEShapeLayer();
var layerSource = new VEShapeSourceSpecification(VEDataType.ImportXML, "file:///C:/data/Profiles/tligon/Personal/Personal/Sport/RouteGPX.xml", layer);
layerSource.MaxImportedShapes=1000;
map.ImportShapeLayerData(layerSource, onFeedLoad,
true);
layer.SetDescription(
"Route Layer");
layer.Show();
}
function onFeedLoad(feed)
{
alert(
'XML loaded. There are '+feed.GetShapeCount()+' items in this list.'+'\n'+
'Feed description: '+feed.GetDescription().toString());
}
script>
head>
<body onload="GetMap();">
<div id='myMap' style="position:relative; width:1000px; height:1000px;">div>
body>
html>
View article..
Problem:credentials are either invalid
MSDN Forums: Virtual Earth - Hi, I 'm a newbie. I have this exception with my code and I dont understand why. My credentials are correct and verified but when i execute the code I get this exception. This aplication is made for a pocket PC in visual stdio 2005
public void RequestImage()
{
try
{
string token = GetToken();
ImageryService.MapUriRequest mapUriRequest = new ImageryService.MapUriRequest();
mapUriRequest.Credentials = new ImageryService.Credentials();
mapUriRequest.Credentials.Token = token;
mapUriRequest.Center = new ImageryService.Location();
mapUriRequest.Center.Latitude = 47.65;
mapUriRequest.Center.Longitude = -122.24;
ImageryService.MapUriOptions mapUriOptions = new ImageryService.MapUriOptions();
mapUriOptions.Style = ImageryService.MapStyle.AerialWithLabels;
mapUriOptions.ZoomLevel = 10;
// Set the size of the requested image to match the size of the image control
mapUriOptions.ImageSize = new ImageryService.SizeOfint();
//mapUriOptions.ImageSize.Height = (int)Image1.Height.Value;
//mapUriOptions.ImageSize.Width = (int)Image1.Width.Value;
mapUriRequest.Options = mapUriOptions;
ImageryService.ImageryService imageryService = new ImageryService.ImageryService();
// Make the image request
ImageryService.MapUriResponse mapUriResponse = imageryService.GetMapUri(mapUriRequest);
string mapUri = mapUriResponse.Uri;
// Set the image control URL to the returned image URI
//Image1.ImageUrl = mapUri;
textBox1.Text = mapUri.ToString();
}
catch (Exception ex)
{
textBox1.Text = "An exception occurred: " + ex.Message;
}
}
// The GetToken function needs to be called once before any web service request is made. Once
// the token is retrieved, it can be cached for use in subsequent web service requests.
public string GetToken()
{
// Set Virtual Earth Platform Developer Account credentials to access the Token Service
Token.CommonService commonService = new Token.CommonService();
commonService.Url = "https://staging.common.virtualearth.net/find-30/common.asmx";
commonService.Credentials = new System.Net.NetworkCredential("user","pass");
// Set the token specification properties
Token.TokenSpecification tokenSpec = new Token.TokenSpecification();
tokenSpec.ClientIPAddress = "127.0.0.1";
tokenSpec.TokenValidityDurationMinutes = 60;
string token = "";
// Get a token
try
{
token = commonService.GetClientToken(tokenSpec);
}
catch (Exception ex)
{
throw ex;
}
return token;
View article..
Add Control error
MSDN Forums: Virtual Earth -
I get an exeception when I try to add a control to the map. In debug mode I can see that this code in the API is throwing the exception:
if(this.controls==null||this.controls=="undefined")throw new VEException("VEMap:AddControl","err_notinitialized",L_notinitialized_text)
Below is the code I use to add the control. I am calling this code from the onLoadMap function, so the map is already loaded, but looks like the controls collection is not. I am calling this from an IFrame if it makes a difference, but I don't see why it would.
//I am using an ASP .net extender control, so this._instance refers to the map control //show a loading label
createLoading: function() {
var el = document.createElement("div");
el.setAttribute('id', "VELoading");
el.style.border = "1px solid gray";
el.style.background = "#FFF8C6";
el.style.padding = "10px";
el.style.verticalAlign = "middle";
el.setAttribute("size_w", this._width);
el.setAttribute("size_h", this._height);
el.innerHTML = "
";
el.style.top = ((this._height - 100) / 2) + "px";
el.style.left = ((this._width - 100) / 2) + "px";
this._instance.AddControl(el);
},
View article..
Locale characters using reverse geocode
MSDN Forums: Virtual Earth - Hi, I'm using reverse geocode to get the name of the closest street to a lat/long. These streets are from Spain so they have special characters. It works ok in firefox but internet explorer 6. I have set the locale parameter when load de map (adding es-ES to the url) and the labels in the map are shown ok, but the name of the steets when they should be, since according to the api VEMap.Find returns the route directions in the neutral language of that culture. I also have set charset as utf-8 with no results. It seems to be a ie6 problem.
Any ideas to fix it???
Thanks in advace.
View article..
Donut Polygon; Exterior vs Interior
MSDN Forums: Virtual Earth -
On the VEDataType Enumeration page at http://msdn.microsoft.com/en-us/library/bb412442.aspx, it says that VE supports gml:exterior and gml:interior. But I cannot get the following GeoRSS to draw properly. The exterior polygon is ignored.
http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml">
Donut Polygon
test
Water Body Polygon
Puget Sound
50 -124 50 -121 47 -121 47 -124 50 -124
49 -123 49 -122 48 -122 48 -123 49 -123
If I flip the order between the exterior and interior, the interior is ignored.
View article..
PreviousNext