Ir ao conteúdo
  • Cadastre-se

tlima

Membro Júnior
  • Posts

    2
  • Cadastrado em

  • Última visita

Reputação

0
  1. Boa tarde pessoal, Sou novato em C# e estou encontrando um problema no código abaixo. O valor da classe MapRouteFinderResult está retornando como null e a mensagem diz "Invalid Credentials". A maioria dos forums diz que o problema pode ser no token mas o mesmo está correto. Alguém poderia me ajudar com o problema? MapIcon loja = new MapIcon(); loja.Location = new Geopoint(new BasicGeoposition() { Latitude = Double.Parse(oferta.loja.latitude, CultureInfo.InvariantCulture), Longitude = Double.Parse(oferta.loja.longitude, CultureInfo.InvariantCulture) }); loja.Title = oferta.loja.nome; loja.Image = RandomAccessStreamReference.CreateFromUri(new Uri("ms-appx:///Assets/ico_mapa.png")); var gl = new Geolocator() { DesiredAccuracy = PositionAccuracy.High }; var locationGeoPos = await gl.GetGeopositionAsync(TimeSpan.FromMinutes(5), TimeSpan.FromSeconds(5)); var location = locationGeoPos.Coordinate.Point; MapIcon local = new MapIcon(); local.Location = new Geopoint(new BasicGeoposition() { Latitude = location.Position.Latitude, Longitude = location.Position.Longitude }); local.Title = "voce esta aqui"; local.Image = RandomAccessStreamReference.CreateFromUri(new Uri("ms-appx:///Assets/ico_mapa.png")); MyMap.MapServiceToken = "xxxxxxxxxxxxxxxxxxx"; MapService.ServiceToken = "xxxxxxxxxxxxxxxxxxx"; MapRouteFinderResult routeResult = await MapRouteFinder.GetWalkingRouteAsync(local.Location, loja.Location); //ERRO MapRouteView rota = new MapRouteView(routeResult.Route);

Sobre o Clube do Hardware

No ar desde 1996, o Clube do Hardware é uma das maiores, mais antigas e mais respeitadas comunidades sobre tecnologia do Brasil. Leia mais

Direitos autorais

Não permitimos a cópia ou reprodução do conteúdo do nosso site, fórum, newsletters e redes sociais, mesmo citando-se a fonte. Leia mais

×
×
  • Criar novo...