Announcement: All noncommercial projects registered to use Earth Engine before
April 15, 2025 must
verify noncommercial eligibility to maintain access. If you have not verified by September 26, 2025, your access may be on hold.
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"]]