====== How to Use Google Maps in Map Suite Desktop (WPF) Edition ====== This guide helps you to create a google maps key and apply it in Map Suite. Google offers two types of API plans. One is [[https://developers.google.com/maps/documentation/static-maps/get-api-key#standard-auth|Standard Google Static Maps API]], the other one is [[https://developers.google.com/maps/documentation/static-maps/get-api-key#premium-auth|Google Maps APIs Premium Plan License]]. Each of them have two usages to make the https requests. This article will mainly cover Google Static Maps API. {{:googlemapsplan.png?850|Plan Options}} '' standard google static maps api'': you can either use API key or use API key and Signature to make the https requests. \\ '' google maps apis premium plan license'': you can either use API key and Signature or ClientId and Signature to make the https requests. \\ === How to Get API Key ( Notice: This key is only for developing/testing purpose. ) === - Go to the [[https://console.developers.google.com|Google Developer Console]]. - Login your Google account. ( Note: If you do not have one, create one then login. ) - Create or select the project that will be using the API. - Search for "Google Static Maps" and enable the API. - Go to Credentials page, click create a credential, and select API key. ( Note: if you have an existing unrestricted API key, or a key with browser restrictions, you may use that key. ) - Select Restrict key and restrict your API key ( Optional ) Read [[https://developers.google.com/maps/documentation/embed/get-api-key|more details]] about how to get a key. [[https://developers.google.com/maps/documentation/static-maps/|How to use API key to test]]. You can read more about [[https://developers.google.com/maps/documentation/static-maps/get-api-key#client-id|how to get ClientId and PrivateKey ]] or [[https://developers.google.com/maps/documentation/static-maps/get-api-key#detailed-guides-to-generating-a-digital-signature|how to get Signature]]. === How to Use Google Maps Key in Map Suite Desktop Edition === The GoogleMapsOverlay will work after assigning your Google Maps ClientId and PrivateKey to the properties GoogleMapsOverlay.ClientId and GoogleMapsOverlay.PrivateKey. Here below is how to do that in a sample. - Download [[source code link will be in here|Sample Source Code]] and open it in Visual Studio. - Open MainWindow.xaml.cs and replace the values in the appropriate fields. ( see the code sample below ) - Restore NuGet Packages, build and run the sample. === Code Usage === // Create a GoogleMapsOverlay and add it to wpfMap1 GoogleMapsOverlay googleMapsOverlay = new GoogleMapsOverlay(); googleMapsOverlay.MapType = GoogleMapsMapType.Satellite; googleMapsOverlay.ClientId = "Place Google Maps ClientId Here"; googleMapsOverlay.PrivateKey = "Place Google Maps PrivateKey Here"; wpfMap1.Overlays.Add(googleMapsOverlay); \\