How to get a Google Maps API key
1. Create a Google Cloud Project
Go to the Google Cloud Console and create a new project or select an existing one.
2. Enable the Maps JavaScript API
In your project, navigate to "APIs & Services" > "Library" and search for "Maps JavaScript API". Click on it and press the "Enable" button.
3. Create API Key
Go to "APIs & Services" > "Credentials" and click "Create Credentials" > "API Key". Your new API key will be displayed.
4. Restrict Your API Key (Optional but Recommended)
For security, it's best to restrict your key. Click on your newly created API key and set up application restrictions and API restrictions as needed.
5. Use Your API Key with MapKit
Copy your API key and use it when setting up MapKit in your project. Remember to keep your API key secret and never share it publicly.