Files
odoo_source/addons/website_google_map/views/google_map_templates.xml
T
Nicolas Martinelli c82b65c855 [IMP] website, website_{*}: Google Maps API Key
As of June 22 2016, the use of API key is required to access the
following:
- Google Maps JavaScript API
- Google Static Maps API
- Google Street View Image API

https://developers.google.com/maps/pricing-and-plans/standard-plan-2016-update

For domains accessing the API before June 22, it will still work without
an API key. Since Google advises to use the API key, we hide the Maps if
no API key is defined.
2016-08-25 16:33:23 +02:00

29 lines
1.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="google_map">
&lt;!DOCTYPE html&gt;
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<title>World Map</title>
<link rel="stylesheet" type="text/css" href="/website_google_map/static/src/css/website_google_map.css" />
</head>
<body t-att-data-partner-url="partner_url or None">
<script>
var odoo_partner_data = <t t-raw="partner_data"/>;
</script>
<div id="odoo-google-map"></div>
<t t-if="google_maps_api_key">
<script t-attf-src="//maps.google.com/maps/api/js?key=#{google_maps_api_key}"></script>
</t>
<t t-else="1">
<script src="//maps.google.com/maps/api/js"></script>
</t>
<script type="text/javascript" src="/website_google_map/static/src/lib/markerclusterer.js"></script>
<script type="text/javascript" src="/website_google_map/static/src/js/website_google_map.js"></script>
</body>
</html>
</template>
</odoo>