Google Maps support
This commit is contained in:
parent
c9e3b14a45
commit
d4c78ba156
|
|
@ -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",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue