A Storyblok Google Maps custom Field. You can search for addresses via the google maps geocoding API. If you click on one of the search results, latitude and longitude of the address will be added.
- Partner Portal needed
- Google Maps apiKey for Geocode api
- yarn Package manager
- create a custom storyblok Field (Partner Portal required) with the name
google-map-locations
. You can checkout how this can be done here: - run
yarn && yarn build
from projects root. - copy generated code of
dist/export.js
into your custom field editor. - add
apiKey
as an option underInput
on your custom field - save & publish the custom field
- Add the custom field on one of your spaces
yarn
yarn dev
In the browser, you will see the white screen with the following error in the console:
[Vue warn]: Error in created hook: "SyntaxError: Failed to execute 'postMessage' on 'Window': Invalid target origin 'null//app.storyblok.com' in a call to 'postMessage'."
DOMException: Failed to execute 'postMessage' on 'Window': Invalid target origin 'null//app.storyblok.com' in a call to 'postMessage'.
But don't worry, this project is just a template and only works as part of the storyblok app. See: https://www.storyblok.com/docs/plugins/enable-local-dev-mode
yarn build
yarn lint