Override Google API keys

Smart Map has been replaced by Google Maps

Please install the Google Maps plugin instead. ➡️

As of February 2021, the Smart Map plugin has been completely rebuilt and replaced with the new Google Maps plugin for Craft CMS. For more details, see here...


The documentation below is for historical reference only.

There may be instances where you need to overwrite the Google API keys from a Twig template.

{# Override server key #}
{% do craft.smartMap.setServerKey('lorem') %}

{# Override browser key #}
{% do craft.smartMap.setBrowserKey('ipsum') %}