odoo.define('options.s_google_map_options', function (require) { 'use strict'; const {_t} = require('web.core'); const options = require('web_editor.snippets.options'); options.registry.GoogleMap = options.Class.extend({ //-------------------------------------------------------------------------- // Options //-------------------------------------------------------------------------- /** * @see this.selectClass for parameters */ resetMapColor(previewMode, widgetValue, params) { this.$target[0].dataset.mapColor = ''; }, /** * @see this.selectClass for parameters */ setFormattedAddress(previewMode, widgetValue, params) { this.$target[0].dataset.pinAddress = params.gmapPlace.formatted_address; }, /** * @see this.selectClass for parameters */ async showDescription(previewMode, widgetValue, params) { const descriptionEl = this.$target[0].querySelector('.description'); if (widgetValue && !descriptionEl) { this.$target.append($(`