AI OnAI Off
There is a setting in episerver section googleMapsApiV3Url you need enter your value to make it works. Something like below:
<episerver> <applicationSettings httpCacheability="Public" pageValidateTemplate="false" uiShowGlobalizationUserInterface="true" uiUrl="~/EPiServer/CMS/" urlRebaseKind="ToRootRelative" uiEditorCssPaths="~/Static/css/Editor.css" uiSafeHtmlTags="b,i,u,br,em,strong,p,a,img,ol,ul,li" googleMapsApiV3Url="https://maps.googleapis.com/maps/api/js?libraries=places&key=YOUR_KEY" />
Rememeber to register map service in Google Cloud, enable mapjs and places apis then get your key to put on the url above.
Hi Dac,
Thanks for that, seems to solve the problem!
However is there any chance we can modify that value within code, such as with an Initailization Module? We have both the URL and API key already as seperate values within our web.config and would be nice if we could reuse those values?
Thanks
The package is opensource, feel free to modify and build the package yourself. You should modify the method GetExtraResources in AddressesElementBlock.
Hi guys,
I've noticed there's lack of documentation regarding the Forms Samples package, especially the Address element which I only noticed was part of the package after going through the Git repo.
When implementing the Address element block into a form container I receive a console error mentioning that the maps.google script is being requested over HTTP rather than HTTPS and thus breaking the script and not rendering the element as expected. I may have missed some setup/configuration but not quite sure due to the lack of documentation as mentioned, any help would be appreciated!
Many thanks,
David