- Turn addresses into coordinates and coordinates into addresses
- Calculate routes, travel times, and distance matrices
- Search for places and businesses and show their details, hours, and ratings
- Show interactive or embedded maps with markers and address autocomplete, or static map images
- Validate addresses and snap GPS traces to roads
- Look up weather, air quality, pollen, and solar data for a location
- Use Aerial View, Geolocation, Elevation, Time Zone, Route Optimization, and Area Insights
Common use cases and example apps
These examples show what you can build with Google Maps Platform, each with a prompt to start from.How Google Maps Platform connections work
Google Maps Platform uses two API keys because some of its APIs run on the server and others in the browser:- The server key is private. Lovable’s connector gateway uses it to call server-side APIs such as Geocoding, Routes, Places, Weather, and Air Quality. It never reaches the browser.
- The browser key is public. Your app’s frontend uses it to load maps: the Maps JavaScript API for interactive maps, plus map embeds and static map images. The connection form marks it Public, and Lovable exposes it to your app’s frontend as the
VITE_LOVABLE_CONNECTOR_GOOGLE_MAPS_BROWSER_KEYenvironment variable, so it appears in your published app’s code.
REQUEST_DENIED if called from the browser.
Server-side requests through the gateway are limited to 6,000 requests per 24 hours per workspace for each connection type. A managed connection and a connection with your own credentials each get their own 6,000. Requests the browser makes to Google with the browser key do not count.
How to connect Google Maps Platform
Who can create Google Maps Platform connections depends on your plan and workspace settings. App + chat connectors are available by default on Free, Pro, and Business plans. On Enterprise plans, they are effectively disabled at first: Who can create connections and clients defaults to No one until an admin changes it in Connectors → Admin settings → App + chat connectors. When adding a connection, you choose between two options:- Managed by Lovable: Lovable provides and manages the credentials for you. No registration needed, not for production. Maps do not load on custom domains.
- Use your own credentials: connect your own server and browser API keys. Required for custom domains and for production apps.
- Managed by Lovable
- Use your own credentials
Open Google Maps Platform in Connectors
Add a connection
Name the connection
Google Maps Platform). This name is only used inside Lovable to identify the connection.Choose Managed by Lovable
Choose who can use this connection
Connect
Limitations
The Google Maps Platform connector cannot:- Load maps on a custom domain with the managed connection. The managed browser key is restricted to Lovable’s domains.
- Exceed 6,000 server-side gateway requests per 24 hours per workspace for each connection type.
- Call the legacy Directions, Distance Matrix, or original Places APIs. Google has deprecated them, and the gateway rejects those paths.
- Support per-end-user Google login. Each connection represents a single set of keys shared across all projects linked to it.
- Work from territories where Google prohibits Maps Platform: China, Cuba, Iran, North Korea, Syria, Vietnam, and Crimea and the other occupied regions of Ukraine. Lovable blocks connecting and gateway requests from those locations and points to Google’s list.
Troubleshooting
If maps or location requests fail, the sections below cover the most common errors and how to resolve them.Maps do not load and the browser console shows "RefererNotAllowedMapError"
Maps do not load and the browser console shows "RefererNotAllowedMapError"
Server-side requests fail with 403 "API_KEY_HTTP_REFERRER_BLOCKED"
Server-side requests fail with 403 "API_KEY_HTTP_REFERRER_BLOCKED"
Server-side requests fail with "REQUEST_DENIED" or 403 "API_KEY_SERVICE_BLOCKED"
Server-side requests fail with "REQUEST_DENIED" or 403 "API_KEY_SERVICE_BLOCKED"
Geocoding or routing fails when called from the browser
Geocoding or routing fails when called from the browser
Autocomplete, place details, or map pin clicks stop working while the map still loads
Autocomplete, place details, or map pin clicks stop working while the map still loads
Server-side requests fail with 429 "Too Many Requests"
Server-side requests fail with 429 "Too Many Requests"
Retry-After header. Ask Lovable to cache repeated lookups, debounce autocomplete, reduce call volume, and keep map loads on the browser key, which does not count toward the limit. A connection of the other type has its own separate 6,000.Manage your connection
Connections are managed from Connectors: select , then open the connection.- Unlink projects to remove access from specific projects while keeping the connection available for others. See Unlink projects from a connection for the steps.
- Delete the connection to remove it from the workspace entirely. Deleting is permanent. It removes the credentials from all linked projects, and app features that use stop working until a new connection is added. See Delete a connection for the steps and who can delete.