Now due to daily request limit exceeded, I am planning to use API key while referencing the Google Map script, So I've now following 4 options and need help to figure out which option is most suitable
- Simply hard-code API key in all pages, but it will be time-consuming in future if I've to change the API key.
- Use of Hierarchy custom setting with API key field in it and as we can directly use "Hierarchy Custom Setting" in the Visualforce page, I have to change the API Key in only place. But I think use case of "Hierarchy Custom" setting is different, so using Hierarchy custom setting just because it is directly accessible in the Visualforce page seems wrong.
- I can use List custom setting but among multiple Visualforce pages, some pages don't have controller or extension class associated. As List custom setting is not directly accessible in the VF pages, we have to return the value from Apex class. Just to return API key from the List custom setting, creating controller or extension class is also seems unnecessary work.
- Use of custom label as it is directly accessible in the Visualforce pages.
Thank you in advance.