examples/google.html
--- layout: example.html title: Google Maps shortdesc: Map with tiles from Google Maps docs: > This example demonstrates how to display tiles from Google's Map Tiles API in a map. To use the Google Map Tiles API, you need to set up a Google Cloud project and create an API key for your application. See the Map Tiles API documentation for instructions.
The ol/source/Google source can be used with a tile layer and is configured by passing properties to the constructor that are used in creating the session token request for accessing the tiles. The mapType defaults to 'roadmap' and can be changed to any of the supported map types.
When using the Google source, please make sure you comply with the Google Map Tiles API Policies, by adding the Google logo in the bottom-left corner of the map. You can add the logo as a static image by using a custom OpenLayers control, as shown in the example below. tags: "google" ---
Your API key show map