Google Maps support

This commit is contained in:
1002Studio 2015-02-18 02:30:00 +01:00
parent c9e3b14a45
commit d4c78ba156
1 changed files with 26 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/*global tarteaucitron, ga, Shareaholic, stLight, clicky, top*/ /*global tarteaucitron, ga, Shareaholic, stLight, clicky, top, google*/
/*jslint regexp: true, nomen: true*/ /*jslint regexp: true, nomen: true*/
// addthis // addthis
@ -326,6 +326,31 @@ tarteaucitron.services.analytics = {
} }
}; };
// google maps
tarteaucitron.services.googlemaps = {
"key": "googlemaps",
"type": "api",
"name": "Google Maps",
"uri": "http://www.google.com/ads/preferences/",
"needConsent": true,
"cookies": [],
"js": function () {
"use strict";
if (tarteaucitron.user.googlemapsApiKey === undefined) {
return;
}
tarteaucitron.addScript('//maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true&callback=tarteaucitron_googlemaps&key=' + tarteaucitron.user.googlemapsApiKey);
},
"fallback": function () {
"use strict";
var id = 'googlemaps';
if (document.getElementById('tac_map-canvas')) {
document.getElementById('tac_map-canvas').innerHTML = tarteaucitron.engage(id);
}
}
};
// jsapi // jsapi
tarteaucitron.services.jsapi = { tarteaucitron.services.jsapi = {
"key": "jsapi", "key": "jsapi",