Using Google Maps vector tiles in UWP MapControl

Ali Noshahi 26 Reputation points
2020-01-04T13:34:38.23+00:00

Hi there everyone.
I'm trying to create a Google Maps client for Windows 10.
I know that I can use Google Maps tiles using like this
http://mt1.google.com/vt/lyrs=r&hl=x-local&z={zoomlevel}&x={x}&y={y}
but using this way tiles are not in a vector style.
Isn't there any way to use vector google maps in MapControl for UWP?
Thank you.
Have a good year.

Universal Windows Platform (UWP)
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Richard Zhang-MSFT 6,936 Reputation points
    2020-01-06T02:07:54.723+00:00

    Hello,​

    Welcome to our Microsoft Q&A platform!

    In UWP, MapControl provides HttpMapTileDataSource to customize the map tile service.

    Here is the document about MapTileSource.

    For using Google Map service, you can consider using this method:

    public static void UseGoogleMaps(MapControl Map, string mapUri)  
    {  
        if (Map == null) return;  
        Map.Style = MapStyle.None;  
        Map.TileSources.Clear();  
        Map.TileSources.Add(  
            new MapTileSource(  
                new HttpMapTileDataSource(mapUri)  
                {  
                    AllowCaching = true  
                }  
            )  
        );  
    }  
    

    You can also try to search related content in Github, there should be similar functions implemented in the community

    Thanks.

    1 person found this answer helpful.

  2. rbrundritt 15,311 Reputation points Microsoft Employee
    2020-02-28T17:01:35.397+00:00

    Google Maps doesn't use the same type of vector tiles as the UWP map controls. Also, Google Maps uses a close schema, so no other map controls, other than their own can use them. I believe they also have a restriction on using the tiles outside of their controls as well.

    0 comments No comments