From da6b132f488b45a06140c0346ead1f2fb821ff0f Mon Sep 17 00:00:00 2001 From: Ricci Dorian Date: Sat, 2 Jun 2018 23:19:51 +0200 Subject: [PATCH] Added iframe google maps with search query --- tarteaucitron.services.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 50f07dc..35a6c05 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -937,6 +937,38 @@ tarteaucitron.services.googlemaps = { } }; +// googlemaps search +tarteaucitron.services.googlemapssearch = { + "key": "googlemapssearch", + "type": "api", + "name": "Google Maps Seard API", + "uri": "http://www.google.com/ads/preferences/", + "needConsent": true, + "cookies": ['nid'], + "js": function () { + "use strict"; + tarteaucitron.fallback(['googlemapssearch'], function (x) { + var width = x.getAttribute("width"), + height = x.getAttribute("height"), + // url = x.getAttribute("data-url"); + query = escape(x.getAttribute("data-search")), + key = x.getAttribute("data-api-key"); + + // return ''; + return ' ' + }); + }, + "fallback": function () { + "use strict"; + var id = 'googlemapssearch'; + tarteaucitron.fallback(['googlemapssearch'], function (elem) { + elem.style.width = elem.getAttribute('width') + 'px'; + elem.style.height = elem.getAttribute('height') + 'px'; + return tarteaucitron.engage(id); + }); + } +}; + // google tag manager tarteaucitron.services.googletagmanager = { "key": "googletagmanager",