简体   繁体   English

在Windows Phone 8应用中使用地图

[英]Working with maps in Windows Phone 8 app

I am creating an app for Windows Phone 8 that continuously tracks a users location. 我正在为Windows Phone 8创建一个持续跟踪用户位置的应用程序。 When the app finishes tracking the location, the activity of the user is displayed on the map using a polyline. 当应用完成跟踪位置时,用户的活动会使用折线显示在地图上。 I would now like to show some places of interest on the map as well as the polyline. 我现在想在地图上显示某些景点以及折线。 I have tried the follwing code: 我已经尝试了以下代码:

MapsTask mapsTask = new MapsTask();
mapsTask.SearchTerm = "hotel";
mapsTask.ZoomLevel = 2;
mapsTask.Show();

However this displays a new map. 但是,这将显示一个新地图。 I need the places of interest to be on the same map as the polyline. 我需要将景点与多义线放在同一张地图上。 Can anyone give me any help with this? 谁能帮我这个忙吗?

Thanks 谢谢

there're few things you can do with MapsTask. 您可以使用MapsTask做几件事。

MapControl may something you are looing for. 您可能正在寻找MapControl。 you can draw lines, make pushpins, add tap event on it. 您可以画线,制作图钉,在上面添加点击事件。 etc.. 等等..

here are some reference may help you : 这里有一些参考可以帮助您:

http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj207045(v=vs.105).aspx http://msdn.microsoft.com/zh-CN/library/windowsphone/develop/jj207045(v=vs.105).aspx

http://www.geekchamp.com/articles/windows-phone-drawing-custom-pushpins-on-the-map-control-what-options-do-we-have http://www.geekchamp.com/articles/windows-phone-drawing-custom-pushpins-on-the-map-control-what-options-do-we-have

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM