Articles in this section
Category / Section

How to use Google Maps API to show Google Maps in Xamarin.Forms SfMaps control

1 min read


This article describes how to use Google Maps API to show Google Maps using ImageryLayer of the Xamarin Maps(SfMaps) control.


You can show the Google Maps using the RequestTileUri event of ImageryLayer.

Step 1: Subscribe the RequestTileUri event of ImageryLayer as demonstrated in the following code example.


         <maps:ImageryLayer RequestTileUri="ImageryLayer_RequestTileUri">
                <maps:MapMarkerSetting MarkerIcon="Image" ImageSource="pin.png" IconSize="15"/>
                    <maps:MapMarker Latitude="38.8833" Longitude= "-77.0167"/>
                    <maps:MapMarker Latitude="-15.7833" Longitude= "-47.8667"/>
                    <maps:MapMarker  Latitude="21.0000" Longitude= "78.0000"/>
                    <maps:MapMarker Latitude="35.0000" Longitude= "103.0000" />
                    <maps:MapMarker Latitude="-4.0383" Longitude= "21.7586" />


Step 2: In the RequestTileUri event, assign the Google Maps API Uri link (or any tile maps provider) to corresponding x, y, and zoom level of the Uri property of TileUriArgs as demonstrated in the following code example.


/// <summary>
/// This event is used to pass the uri of desired maps tile provider.
/// </summary>
/// <param name="sender">The imagery layer</param>
/// <param name="e">The Tile uri arguments</param>
private void ImageryLayer_RequestTileUri(object sender, Syncfusion.SfMaps.XForms.TileUriArgs e)
            var link = "" + e.X.ToString() + "&y=" + e.Y.ToString() + "&z=" + e.ZoomLevel.ToString();
            e.Uri = link;


Google maps using xamarin SfMaps


You can download the demo sample from the following link

Did you find this information helpful?
Help us improve this page
Please provide feedback or comments
Please sign in to leave a comment