Places UI Kit: A ready-to-use library that provides room for customization and low-code development. Try it out, and share yourinput on your UI Kit experience.

Add a map using HTML

The following example shows how to add a 3d map using only HTML and CSS, notrequiring any JavaScript.

CSS

/* * Always set the map height explicitly to define the size of the div element * that contains the map. */html,gmp-map-3d{height:100%;}html,body{height:100%;margin:0;padding:0;}

HTML

<html>    <head>        <title>Map</title>        <link rel="stylesheet" type="text/css" href="./style.css" />    </head>    <body>        <gmp-map-3d            center="37.7704,-122.3985,500"            tilt="67.5"            mode="hybrid"></gmp-map-3d>        <script            async            src="https://maps.googleapis.com/maps/api/js?key=AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8&v=beta&libraries=maps3d"></script>    </body></html>

Try Sample

Clone Sample

Git and Node.js are required to run this sample locally. Follow theseinstructionsto install Node.js and NPM. The following commands clone, install dependencies and start the sample application.

gitclonehttps://github.com/googlemaps-samples/js-api-samples.gitcdsamples/3d-simple-map-declarativenpminpmstart

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-18 UTC.