Search code examples
windows-phone-8

No pushpin when using MapsTask on WP8


I can't see the pushpin using MapsTask, the map is ok, but no pushpin on the map, anyone knows why? thank you!

        if (geo != null)
        {
            MapsTask mapsTask = new MapsTask();
            mapsTask.Center = geo;
            mapsTask.ZoomLevel = 15;
            mapsTask.Show();
        }

Solution

  • you can use mapTask.SearchTerm, the first result will show on the map with the pushpin.

    mapsTask has few APIs to do more works. If you want multiple pushpins or customize for more info,use map control and design it in xaml and .cs file.

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

    hopes it helps.