Jayakrishnan
Jayakrishnan

Reputation: 4294

Map Control is not showing in Windows Phone 8.1 WinRT App

I am using Map control in my App.

I have followed the below steps to use Map control:

1) Generated Map service ApplicationID and Map service AuthenticationToken from the store.

2) Store the Map service ApplicationID in my package.manifest file.

3) Set MapServiceToken of Map control to Map service AuthenticationToken.

4) Set center property of Map using Geopoint.

After all these steps, still I cannot see map.

Below is the Xaml Code

<map:MapControl x:Name="myMapControl"
                        MapServiceToken="*********"
                        HorizontalAlignment="Center"
                        Margin="0,0,0,0" />

C# Code

void Test_Loaded(object sender, RoutedEventArgs e)
    {
        myMapControl.Center = new Geopoint(new BasicGeoposition()
        {
            Latitude = 47.604,
            Longitude = -122.329
        });
        myMapControl.ZoomLevel = 12;
        myMapControl.LandmarksVisible = true;
    }

Any help would be highly appreciated. Thanks

Upvotes: 1

Views: 252

Answers (1)

Jayakrishnan
Jayakrishnan

Reputation: 4294

The problem is with Height and Width of MapControl.

Setting Width and Height to my MapControl solved the issue.

By default it takes 0 height.

Thanks to DennisBakker71

Upvotes: 1

Related Questions