KBAISE/ for lovable
Library
Docs

Connect your app to Google Maps Platform

about 10 minBuildingchecked 4d agoOfficial page
The short version

Connect Google Maps Platform to your Lovable app to display interactive maps, search addresses, and calculate routes. You can start immediately with Lovable's managed connection for testing, or use your own Google Cloud keys for production apps and custom domains.

Anyone who needs interactive maps, location searches, store locators, or driving directions in their app.

Do this, in order

  1. 1

    Open the Connectors page in your Lovable dashboard and select Google Maps Platform.

    This is where you set up workspace connections to external services.

  2. 2

    Click Connect, enter a display name, and choose whether to use "Managed by Lovable" or "Use your own credentials".

    The managed option lets you prototype instantly without Google credentials, while your own credentials are required for custom domains and live production apps.

  3. 3

    If using your own credentials, create one server API key with API restrictions and one browser API key with website restrictions in Google Cloud.

    Google Maps splits security between public frontend map displays and private backend requests like geocoding and routing.

  4. 4

    Paste your server key and browser key into the form (if using your own credentials) and click Connect.

    This securely saves your credentials in Lovable so your app can make authorized map requests.

  5. 5

    Open your project chat and ask Lovable to link to Google Maps Platform and build your map feature.

    Connecting to the workspace does not automatically build the map into your app until you prompt Lovable to use it.

Paste this into your project

Use Google Maps Platform and build an interactive store locator where visitors can search their address with autocomplete, see nearby locations on a map with pins, and click any pin to view store details and opening hours.

Words decoded

API key
A unique code that works like a digital password to allow your app to talk to a service like Google Maps.
Geocoding
Turning a written address into map coordinates (latitude and longitude), or turning coordinates into a physical address.
Custom domain
Your own branded website address (such as myapp.com) rather than Lovable's default web address.

Where people get stuck

  • Maps will fail to load on custom domains if you use the 'Managed by Lovable' option; you must provide your own API keys for custom domains.
  • Never add a website restriction to your server API key in Google Cloud, or all backend lookups like geocoding and routing will be blocked.
  • Do not allow your browser key to call server-side APIs like Places, Geocoding, or Routes directly from the browser, as they will be rejected.
  • Server-side map requests are limited to 6,000 requests per 24 hours per workspace on each connection type.

The short version, steps, decoder and prompt on this page are written automatically from Lovable's own documentation and can lag or misread it. The official page is always the authority.