I would like to insert the Google Map API inside an xhtml jsf page. The probleme is that when i insert the tag :
<script src="https://maps.googleapis.com/maps/api/js?key=MyAPIKey&libraries=visualization&callback=initMap" async defer></script>
The server give me the error :
Error Parsing /listUsers.xhtml: Error Traced[line: 21] Reference to the entity "libraries" must end with ';'.
The error happens specificaly when I add the src attribute in the script tag.
I'm sure that the script is the issue because the xhtml page is very simple :
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head>
<title>Google Map API on xhtml</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</h:head>
<h:body>
<script src="https://maps.googleapis.com/maps/api/js?key=MyAPIKey&libraries=visualization&callback=initMap" async defer></script>
</h:body>
</html>
I'm sure the script is working since i manage to display the Google Map on a regular html page.
What should I do to include the map wiithout having trouble ?