- Native .NET MAUI Map control supports Google Maps only on Android.
- Apple Maps is used on iOS/macOS, Bing Maps on Windows.
- This sample uses Google Maps Tile API with Syncfusion SfMaps to render Google Maps tiles across all platforms.
- Cross-platform Google Maps rendering using tile layers
- Session token caching for optimized API usage
- Custom zoom, pan, and center configuration
- Marker and tooltip support
- Optional integration with OpenAI for smart location search
- Syncfusion .NET MAUI Maps
- Google Maps Tile API Key
- Billing enabled in Google Cloud Console
- Create a project in Google Cloud Console
- Enable billing and Map Tiles API
- Generate an API key
API endpoint:
https://tile.googleapis.com/v1/createSession?key=YOUR_API_KEY
Use Preferences.Set and Preferences.Get to store and reuse session tokens until expiry.
Example XAML:
<maps:SfMaps x:Name="maps">
<maps:SfMaps.Layer>
<maps:MapTileLayer x:Name="layer" CanCacheTiles="True">
<maps:MapTileLayer.Center>
<maps:MapLatLng Latitude="37.0902" Longitude="-95.7129" />
</maps:MapTileLayer.Center>
<maps:MapTileLayer.ZoomPanBehavior>
<maps:MapZoomPanBehavior ZoomLevel="4" MinZoomLevel="4" MaxZoomLevel="18" EnableDoubleTapZooming="True" />
</maps:MapTileLayer.ZoomPanBehavior>
</maps:MapTileLayer>
</maps:SfMaps.Layer>
</maps:SfMaps>Set UrlTemplate dynamically:
https://tile.googleapis.com/v1/2dtiles/{z}/{x}/{y}?session=SESSION_TOKEN&key=API_KEY
Refer to Syncfusion blog on Smart Location Search in MAUI Maps. https://www.syncfusion.com/blogs/post/smart-location-search-in-maui-maps