-
Notifications
You must be signed in to change notification settings - Fork 514
Setting up Google Maps Integration
ChurchCRM uses Google Maps for two purposes:
- Geocoding - Converting addresses to latitude/longitude coordinates
- Map Rendering - Displaying interactive maps in the browser
- A Google Cloud Platform account
- A project in Google Cloud Console
- Billing enabled on the project (Google provides $200/month free credit)
You must enable both APIs in Google Cloud Console:
- Go to Google Cloud Console - API Library
- Search for and enable Geocoding API
- This is used server-side to look up coordinates from addresses
- Search for and enable Maps JavaScript API
- This is used client-side to render maps in the browser
Important: Both APIs must be enabled. If you only enable Geocoding API, address lookups will work but maps won't display. If you only enable Maps JavaScript API, maps will load but address geocoding will fail.
- Go to Google Cloud Console - Credentials
- Click Create Credentials → API Key
- Copy the generated API key
- (Recommended) Click Edit API key to add restrictions:
- Application restrictions: HTTP referrers (your ChurchCRM domain)
- API restrictions: Restrict to Geocoding API and Maps JavaScript API
- Log in to ChurchCRM as an administrator
- Go to Admin → System Settings
- Find the Map Settings section
- Enter your API key in both fields:
-
sGoogleMapsGeocodeKey- For address geocoding -
sGoogleMapsRenderKey- For map rendering
-
- Click Save Settings
Tip: You can use the same API key for both settings if both services are enabled on that key.
For maps to center correctly:
- Go to Admin → System Settings
- Find Church Information section
- Enter your church's address
- Set
iChurchLatitudeandiChurchLongitude(or use "Update All Family Coordinates" to auto-populate)
To geocode all family addresses:
- Go to People → Family Geographic Utilities (GeoPage.php)
- Click Update All Family Coordinates
- Families with valid addresses will have their lat/lng populated
- Cause: Maps JavaScript API is not enabled
- Solution: Enable "Maps JavaScript API" in Google Cloud Console
- Cause: Geocoding API is not enabled
- Solution: Enable "Geocoding API" in Google Cloud Console
- Cause: Geocoding API key is missing or invalid
-
Solution: Check
sGoogleMapsGeocodeKeyin System Settings
- Cause: API key restrictions don't include your domain
- Solution: Edit the API key in Google Cloud Console and add your production domain to HTTP referrer restrictions
- Cause: API restrictions are too narrow
- Solution: Ensure both Geocoding API and Maps JavaScript API are in the allowed APIs list
ChurchCRM also supports Bing Maps as an alternative geocoder:
- Get a Bing Maps API key from Bing Maps Portal
- In System Settings → Map Settings:
- Set
sGeoCoderProviderto "BingMaps" - Enter your key in
sBingMapKey
- Set
Note: Bing Maps is only supported for geocoding, not for map rendering. Map display still requires Google Maps JavaScript API.
Google Maps pricing (as of 2024):
- Geocoding API: $5.00 per 1,000 requests (first $200/month free)
- Maps JavaScript API: $7.00 per 1,000 loads (first $200/month free)
For a typical church:
- Family geocoding is one-time per family
- Map loads occur when users view map pages
- Most churches stay well within the free tier
Set up budget alerts to monitor usage.
| Setting | Description |
|---|---|
sGeoCoderProvider |
Choose GoogleMaps or BingMaps for geocoding |
sGoogleMapsGeocodeKey |
API key for address geocoding |
sGoogleMapsRenderKey |
API key for map rendering |
sBingMapKey |
Bing Maps API key (alternative geocoder) |
iChurchLatitude |
Church latitude for map centering |
iChurchLongitude |
Church longitude for map centering |
iMapZoom |
Default zoom level for maps |
sGMapIcons |
Marker icon names by classification |
- Installation Guide ← Start here!
- First Run Setup
- Features Overview
Day-to-day usage of ChurchCRM
- User Documentation
- People Management
- Groups & Events
- Tools
- Finances
Server management & configuration
- User Management
- System Maintenance
- Configuration
- Troubleshooting
- Localization
Contributing to ChurchCRM
- Quick Start
- Testing & CI/CD
- Code & Architecture
- Localization
- Release & Security