Skip to content

Instantly share code, notes, and snippets.

@guilhermecarvalhocarneiro
Created March 6, 2014 23:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guilhermecarvalhocarneiro/9401632 to your computer and use it in GitHub Desktop.
Save guilhermecarvalhocarneiro/9401632 to your computer and use it in GitHub Desktop.
Chamando MapsDirectionTask
private void Address_Tap(object sender, System.Windows.Input.GestureEventArgs e)
{
try
{
MapsDirectionsTask mapsDirectionsTask = new MapsDirectionsTask();
GeoCoordinate CoordenadaFinal = new GeoCoordinate(LatItem, LngItem);
LabeledMapLocation EndPoint = new LabeledMapLocation(PanoramaDetailItem.Title.ToString(), CoordenadaFinal);
mapsDirectionsTask.End = EndPoint;
// If mapsDirectionsTask.Start is not set, the user's current location is used as the start point.
mapsDirectionsTask.Show();
}
catch (Exception erro)
{
MessageBox.Show(erro.ToString());
}
}
@guilhermecarvalhocarneiro
Copy link
Author

Message:

Type 'Newtonsoft.Json.Linq.JObject' with data contract name 'ArrayOfKeyValueOfstringJTokeneJCYCtcq:http://schemas.microsoft.com/2003/10/Serialization/Arrays' is not expected. Add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to DataContractSerializer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment