Earth Engine is introducing
noncommercial quota tiers to safeguard shared compute resources and ensure reliable performance for everyone. All noncommercial projects will need to select a quota tier by
April 27, 2026 or will use the Community Tier by default. Tier quotas will take effect for all projects (regardless of tier selection date) on
April 27, 2026.
Learn more.
ui.Map
Stay organized with collections
Save and categorize content based on your preferences.
A Google map.
| Usage | Returns | ui.Map(center, onClick, style) | ui.Map |
| Argument | Type | Details | center | Object, optional | An object containing the latitude ('lat'), longitude ('lon') and optionally the zoom level ('zoom') for the map. |
onClick | Function, optional | A callback fired when the map is clicked. The callback is passed an object containing the coordinates of the clicked point on the map (with keys lon and lat) and the map widget itself. |
style | Object, optional | An object of allowed CSS styles with their values to be set for this map. See style() documentation. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[],["The `ui.Map` function creates a Google Map. It accepts optional arguments: `center` (latitude, longitude, and zoom), `onClick` (a function triggered on map clicks, providing click coordinates), and `style` (CSS styling object). The function returns a `ui.Map` object. Clicking the map triggers the `onClick` callback, delivering the clicked location's latitude and longitude, as well as the map itself.\n"]]